@smartytalent/openai-tools 0.1.33-dev.24 → 0.1.33-dev.25

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 +198 -63
  2. package/package.json +1 -1
package/dist/tools.json CHANGED
@@ -11000,6 +11000,7 @@
11000
11000
  "attributes": {
11001
11001
  "title": "ChatAttributesSchema",
11002
11002
  "type": "object",
11003
+ "description": "Cross-protocol chat message attributes. One row per direction:\ninbound and outbound replies on the same conversation are separate\nrows, joined by relationships.conversation. `protocol` is the wire\nformat (sms/whatsapp/teams/googlechat/webapp). `fromIdentifier`\nand `toIdentifier` are protocol-native handles (E.164 phone for\nSMS/WhatsApp, Teams AAD object id, Google Chat user id, etc.) so\nthe row carries the literal sender/receiver without joins. The\nresolved principals (candidate / talent / user) live in\nrelationships - direction tells you which side of the\nconversation each principal is on (inbound: from-side is the\nexternal party; outbound: to-side is the external party, plus an\noptional user relationship for the boe agent that signed it).\n`body` is a multilingual dict {locale: text} mirroring the email\npattern - the chat AI step function translates user-facing\ncontent into the tenant's active locales for admin display.",
11003
11004
  "properties": {
11004
11005
  "direction": {
11005
11006
  "type": "string",
@@ -11007,41 +11008,81 @@
11007
11008
  "inbound",
11008
11009
  "outbound"
11009
11010
  ],
11010
- "description": "Message direction"
11011
+ "description": "Message direction relative to boe (inbound from external, outbound to external)."
11011
11012
  },
11012
- "senderNumber": {
11013
+ "protocol": {
11013
11014
  "type": "string",
11014
- "description": "Sender phone number in E.164 format"
11015
+ "enum": [
11016
+ "sms",
11017
+ "whatsapp",
11018
+ "teams",
11019
+ "googlechat",
11020
+ "webapp"
11021
+ ],
11022
+ "description": "Wire protocol. Adapter Lambdas set this on write so downstream code can branch on rendering / status callback handling."
11015
11023
  },
11016
- "recipientNumber": {
11024
+ "fromIdentifier": {
11017
11025
  "type": "string",
11018
- "description": "Recipient phone number in E.164 format"
11026
+ "description": "Sender's protocol-native handle (E.164 phone for SMS/WhatsApp, AAD object id for Teams, etc.)."
11019
11027
  },
11020
- "messageSid": {
11028
+ "fromName": {
11021
11029
  "type": "string",
11022
- "description": "Twilio message SID"
11030
+ "description": "Display name of the sender at write time. Denormalised from the resolved principal."
11023
11031
  },
11024
- "body": {
11032
+ "fromType": {
11025
11033
  "type": "string",
11026
- "description": "SMS message body"
11034
+ "enum": [
11035
+ "user",
11036
+ "candidate",
11037
+ "talent",
11038
+ "guest"
11039
+ ],
11040
+ "description": "Principal type of the sender. Maps the platform's principal tables. `guest` for unknown senders (typically rejected by the inbound gate)."
11027
11041
  },
11028
- "aiResponse": {
11042
+ "toIdentifier": {
11029
11043
  "type": "string",
11030
- "description": "AI-generated response text"
11044
+ "description": "Recipient's protocol-native handle."
11031
11045
  },
11032
- "shortCode": {
11046
+ "toName": {
11033
11047
  "type": "string",
11034
- "description": "Unique short identifier"
11048
+ "description": "Display name of the recipient at write time."
11049
+ },
11050
+ "toType": {
11051
+ "type": "string",
11052
+ "enum": [
11053
+ "user",
11054
+ "candidate",
11055
+ "talent",
11056
+ "guest"
11057
+ ],
11058
+ "description": "Principal type of the recipient."
11059
+ },
11060
+ "body": {
11061
+ "type": "object",
11062
+ "description": "Multilingual message body keyed by BCP 47 locale (e.g. {`en-US`: `Hi`, `pl-PL`: `Cześć`}). Inbound writers stamp a single locale; the chat AI step function fills the rest.",
11063
+ "additionalProperties": {
11064
+ "type": "string"
11065
+ }
11035
11066
  },
11036
11067
  "status": {
11037
11068
  "type": "string",
11038
11069
  "enum": [
11039
- "active",
11040
- "pending",
11041
- "archived",
11042
- "failed"
11070
+ "received",
11071
+ "queued",
11072
+ "sent",
11073
+ "delivered",
11074
+ "failed",
11075
+ "archived"
11043
11076
  ],
11044
- "description": "Current status"
11077
+ "description": "Lifecycle state. Inbound rows go straight to `received`. Outbound progresses queued -> sent -> delivered (or failed). `archived` is a terminal soft-delete for both directions."
11078
+ },
11079
+ "languageCode": {
11080
+ "type": "string",
11081
+ "description": "BCP 47 locale of the original message (the locale key initially populated in `body`). Detected at the inbound gate, set by the writer on outbound."
11082
+ },
11083
+ "shortCode": {
11084
+ "type": "string",
11085
+ "description": "Unique short identifier (provider/lookup correlation)."
11045
11086
  },
11046
11087
  "timestamps": {
11047
11088
  "title": "ResourceTimestampsSchema",
@@ -11062,45 +11103,98 @@
11062
11103
  "relationships": {
11063
11104
  "title": "ChatRelationshipsSchema",
11064
11105
  "type": "object",
11106
+ "description": "Relationship slots for a chat row. All to-one. Direction +\nattributes.fromType / toType tell you which side of the\nconversation each principal is on - we don't duplicate that\ninto directional relationship names. For boe-mediated flows\nat most two of {user, candidate, talent} are populated per\nrow: the external party (candidate or talent) and, on outbound,\nthe boe user that signed the message.",
11065
11107
  "properties": {
11066
- "translations": {
11067
- "title": "ChatRelationshipsTranslationsSchema",
11108
+ "conversation": {
11109
+ "title": "ChatRelationshipsConversationSchema",
11110
+ "description": "Thread the chat row belongs to. SMS replies on the same boe\nnumber share a conversation; the workflow engine parks runs\non the conversation's meta and reads parkedRunContext to\nresume on inbound. The conversation id is denormalised onto\nthe chat row's internal `conversationId` attribute (indexed\nby ConversationIdIndex) for cheap per-thread history queries\n- API consumers should read it from this relationship, not\nfrom attributes.",
11068
11111
  "type": "object",
11069
11112
  "properties": {
11070
11113
  "data": {
11071
- "type": "array",
11072
- "items": {
11073
- "title": "ChatRelationshipsTranslationsDataSchema",
11074
- "type": "object",
11075
- "properties": {
11076
- "type": {
11077
- "type": "string"
11078
- },
11079
- "id": {
11080
- "type": "string"
11081
- }
11114
+ "title": "ChatRelationshipsConversationDataSchema",
11115
+ "type": "object",
11116
+ "properties": {
11117
+ "type": {
11118
+ "type": "string"
11119
+ },
11120
+ "id": {
11121
+ "type": "string"
11082
11122
  }
11083
11123
  }
11084
11124
  }
11085
11125
  }
11086
11126
  },
11087
- "conversations": {
11088
- "title": "ChatRelationshipsConversationsSchema",
11089
- "description": "Thread the chat row belongs to. SMS replies on the same boe\nnumber share a conversation; the workflow engine parks runs\non the conversation's meta and reads parkedRunContext to\nresume on inbound. Mirror of EmailRelationshipsConversations.\nThe conversation id is also denormalised onto the chat row's\ninternal `conversationId` attribute (indexed by\nConversationIdIndex) for cheap per-thread history queries -\nAPI consumers should read it from this relationship, not\nfrom attributes.",
11127
+ "candidate": {
11128
+ "title": "ChatRelationshipsCandidateSchema",
11129
+ "description": "External candidate principal. Set when fromType=candidate (inbound) or toType=candidate (outbound).",
11090
11130
  "type": "object",
11091
11131
  "properties": {
11092
11132
  "data": {
11093
- "type": "array",
11094
- "items": {
11095
- "title": "ChatRelationshipsConversationsDataSchema",
11096
- "type": "object",
11097
- "properties": {
11098
- "type": {
11099
- "type": "string"
11100
- },
11101
- "id": {
11102
- "type": "string"
11103
- }
11133
+ "title": "ChatRelationshipsCandidateDataSchema",
11134
+ "type": "object",
11135
+ "properties": {
11136
+ "type": {
11137
+ "type": "string"
11138
+ },
11139
+ "id": {
11140
+ "type": "string"
11141
+ }
11142
+ }
11143
+ }
11144
+ }
11145
+ },
11146
+ "talent": {
11147
+ "title": "ChatRelationshipsTalentSchema",
11148
+ "description": "External talent principal. Set when fromType=talent (inbound) or toType=talent (outbound).",
11149
+ "type": "object",
11150
+ "properties": {
11151
+ "data": {
11152
+ "title": "ChatRelationshipsTalentDataSchema",
11153
+ "type": "object",
11154
+ "properties": {
11155
+ "type": {
11156
+ "type": "string"
11157
+ },
11158
+ "id": {
11159
+ "type": "string"
11160
+ }
11161
+ }
11162
+ }
11163
+ }
11164
+ },
11165
+ "user": {
11166
+ "title": "ChatRelationshipsUserSchema",
11167
+ "description": "Internal human user (employee). Reserved for user-to-user webapp/Teams chat counterparties. Today this is typically null - boe-signed outbound rows put the boe AI in `boeUser`, not here.",
11168
+ "type": "object",
11169
+ "properties": {
11170
+ "data": {
11171
+ "title": "ChatRelationshipsUserDataSchema",
11172
+ "type": "object",
11173
+ "properties": {
11174
+ "type": {
11175
+ "type": "string"
11176
+ },
11177
+ "id": {
11178
+ "type": "string"
11179
+ }
11180
+ }
11181
+ }
11182
+ }
11183
+ },
11184
+ "boeUser": {
11185
+ "title": "ChatRelationshipsBoeUserSchema",
11186
+ "description": "Boe AI agent involved in this message. Mirror of tenant.relationships.boeUser - always populated when boe is on either side of the conversation (today: every row). Splitting this from the generic `user` slot keeps the semantics clean: `user` is for human counterparties, `boeUser` is the AI agent.",
11187
+ "type": "object",
11188
+ "properties": {
11189
+ "data": {
11190
+ "title": "ChatRelationshipsBoeUserDataSchema",
11191
+ "type": "object",
11192
+ "properties": {
11193
+ "type": {
11194
+ "type": "string"
11195
+ },
11196
+ "id": {
11197
+ "type": "string"
11104
11198
  }
11105
11199
  }
11106
11200
  }
@@ -11173,6 +11267,7 @@
11173
11267
  "attributes": {
11174
11268
  "title": "ChatAttributesSchema",
11175
11269
  "type": "object",
11270
+ "description": "Cross-protocol chat message attributes. One row per direction:\ninbound and outbound replies on the same conversation are separate\nrows, joined by relationships.conversation. `protocol` is the wire\nformat (sms/whatsapp/teams/googlechat/webapp). `fromIdentifier`\nand `toIdentifier` are protocol-native handles (E.164 phone for\nSMS/WhatsApp, Teams AAD object id, Google Chat user id, etc.) so\nthe row carries the literal sender/receiver without joins. The\nresolved principals (candidate / talent / user) live in\nrelationships - direction tells you which side of the\nconversation each principal is on (inbound: from-side is the\nexternal party; outbound: to-side is the external party, plus an\noptional user relationship for the boe agent that signed it).\n`body` is a multilingual dict {locale: text} mirroring the email\npattern - the chat AI step function translates user-facing\ncontent into the tenant's active locales for admin display.",
11176
11271
  "properties": {
11177
11272
  "direction": {
11178
11273
  "type": "string",
@@ -11180,41 +11275,81 @@
11180
11275
  "inbound",
11181
11276
  "outbound"
11182
11277
  ],
11183
- "description": "Message direction"
11278
+ "description": "Message direction relative to boe (inbound from external, outbound to external)."
11184
11279
  },
11185
- "senderNumber": {
11280
+ "protocol": {
11186
11281
  "type": "string",
11187
- "description": "Sender phone number in E.164 format"
11282
+ "enum": [
11283
+ "sms",
11284
+ "whatsapp",
11285
+ "teams",
11286
+ "googlechat",
11287
+ "webapp"
11288
+ ],
11289
+ "description": "Wire protocol. Adapter Lambdas set this on write so downstream code can branch on rendering / status callback handling."
11188
11290
  },
11189
- "recipientNumber": {
11291
+ "fromIdentifier": {
11190
11292
  "type": "string",
11191
- "description": "Recipient phone number in E.164 format"
11293
+ "description": "Sender's protocol-native handle (E.164 phone for SMS/WhatsApp, AAD object id for Teams, etc.)."
11192
11294
  },
11193
- "messageSid": {
11295
+ "fromName": {
11194
11296
  "type": "string",
11195
- "description": "Twilio message SID"
11297
+ "description": "Display name of the sender at write time. Denormalised from the resolved principal."
11196
11298
  },
11197
- "body": {
11299
+ "fromType": {
11198
11300
  "type": "string",
11199
- "description": "SMS message body"
11301
+ "enum": [
11302
+ "user",
11303
+ "candidate",
11304
+ "talent",
11305
+ "guest"
11306
+ ],
11307
+ "description": "Principal type of the sender. Maps the platform's principal tables. `guest` for unknown senders (typically rejected by the inbound gate)."
11200
11308
  },
11201
- "aiResponse": {
11309
+ "toIdentifier": {
11202
11310
  "type": "string",
11203
- "description": "AI-generated response text"
11311
+ "description": "Recipient's protocol-native handle."
11204
11312
  },
11205
- "shortCode": {
11313
+ "toName": {
11206
11314
  "type": "string",
11207
- "description": "Unique short identifier"
11315
+ "description": "Display name of the recipient at write time."
11316
+ },
11317
+ "toType": {
11318
+ "type": "string",
11319
+ "enum": [
11320
+ "user",
11321
+ "candidate",
11322
+ "talent",
11323
+ "guest"
11324
+ ],
11325
+ "description": "Principal type of the recipient."
11326
+ },
11327
+ "body": {
11328
+ "type": "object",
11329
+ "description": "Multilingual message body keyed by BCP 47 locale (e.g. {`en-US`: `Hi`, `pl-PL`: `Cześć`}). Inbound writers stamp a single locale; the chat AI step function fills the rest.",
11330
+ "additionalProperties": {
11331
+ "type": "string"
11332
+ }
11208
11333
  },
11209
11334
  "status": {
11210
11335
  "type": "string",
11211
11336
  "enum": [
11212
- "active",
11213
- "pending",
11214
- "archived",
11215
- "failed"
11337
+ "received",
11338
+ "queued",
11339
+ "sent",
11340
+ "delivered",
11341
+ "failed",
11342
+ "archived"
11216
11343
  ],
11217
- "description": "Current status"
11344
+ "description": "Lifecycle state. Inbound rows go straight to `received`. Outbound progresses queued -> sent -> delivered (or failed). `archived` is a terminal soft-delete for both directions."
11345
+ },
11346
+ "languageCode": {
11347
+ "type": "string",
11348
+ "description": "BCP 47 locale of the original message (the locale key initially populated in `body`). Detected at the inbound gate, set by the writer on outbound."
11349
+ },
11350
+ "shortCode": {
11351
+ "type": "string",
11352
+ "description": "Unique short identifier (provider/lookup correlation)."
11218
11353
  },
11219
11354
  "timestamps": {
11220
11355
  "title": "ResourceTimestampsSchema",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartytalent/openai-tools",
3
- "version": "0.1.33-dev.24",
3
+ "version": "0.1.33-dev.25",
4
4
  "description": "OpenAI function/tool definitions for SmartyTalent API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",