khoros-aurora-sdk 26.3.0 → 26.3.2

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.
@@ -21,8 +21,13 @@ jobs:
21
21
  registry-url: https://registry.npmjs.org/
22
22
  - name: Publish to npm
23
23
  run: |
24
+ VERSION=$(npm pkg get version | tr -d '"')
25
+ LATEST=$(npm view khoros-aurora-sdk dist-tags.latest)
24
26
  if [[ "${{ github.event.release.prerelease }}" == "true" ]]; then
25
- npm publish --access public --tag pre
27
+ tag=pre
28
+ elif npx semver -r ">$LATEST" $VERSION; then
29
+ tag=latest
26
30
  else
27
- npm publish --access public
31
+ tag=hotfix
28
32
  fi
33
+ npm publish --access public --tag $tag
package/build-hash.txt CHANGED
@@ -1 +1 @@
1
- 5f02757
1
+ 7d3ff26
@@ -3662,6 +3662,8 @@ input MessageConstraints {
3662
3662
  hasVideos: BooleanConstraint
3663
3663
  "Filters by whether the message has images."
3664
3664
  hasImages: BooleanConstraint
3665
+ "Filters by whether the message has an attached poll."
3666
+ hasPoll: BooleanConstraint
3665
3667
  }
3666
3668
 
3667
3669
  """
@@ -5844,3 +5846,14 @@ input OccasionTypeConstraint {
5844
5846
  "not equals to"
5845
5847
  neq: OccasionType
5846
5848
  }
5849
+
5850
+ # ============================================================================
5851
+ # AI auto-reply rendering metadata (KCOMM-1339).
5852
+ # The writer + tblia_message_ai_metadata side-table ship server-side only;
5853
+ # the GraphQL exposure (Message.aiMetadata + AiMetadata / AiCitation /
5854
+ # SuggestedExpert types, AiMetadataInput, plus their DataLoader / schema
5855
+ # wiring) is intentionally deferred until a real consumer needs it (admin
5856
+ # views, email digests, audit). The frontend reads chrome data from the v2
5857
+ # body envelope JSON via AiReplyContainer.parseV2 — re-introducing the
5858
+ # GraphQL field here would be unused surface area. KCOMM-1339 review H6 / Q5(c).
5859
+ # ============================================================================
@@ -2155,9 +2155,10 @@ extend type Query {
2155
2155
  }
2156
2156
 
2157
2157
  # Client-facing audit query to be added later when backend is ready.
2158
- # Message-level AI/Akismet fields are exposed on concrete message types for codegen compatibility.
2158
+ # KCOMM-1310: Message-level AI/Akismet fields are declared on the Message interface
2159
+ # (and its descendant interfaces TopicMessage/ReplyMessage/Article) plus each concrete
2160
+ # implementer — see the `extend interface`/`extend type` blocks below.
2159
2161
 
2160
- # Reintroduce fields on concrete message types (codegen-friendly; avoids interface extension)
2161
2162
  """
2162
2163
  A single moderation setting entry from the settings snapshot captured at post creation time.
2163
2164
  """
@@ -2205,6 +2206,43 @@ type ModerationAuditTrailEntry {
2205
2206
  createdAt: Long!
2206
2207
  }
2207
2208
 
2209
+ # KCOMM-1310: Interface declarations let fragments select these fields on `Message` directly — collapses static query complexity ~250 → ~25. Descendant interfaces and concrete types must redeclare per GraphQL SDL (see kudoSchema/revisionSchema).
2210
+ extend interface Message {
2211
+ aiProcessingStatus: AIModerationProcessingStatus
2212
+ aiModerationResult: AIModerationResult
2213
+ akismetModerationResult: AkismetModerationResult
2214
+ moderationAudit: [ModerationAuditEntry!]
2215
+ moderationSettingsSnapshot: ModerationSettingsSnapshot @complexity(value: 0)
2216
+ moderationAuditTrail: [ModerationAuditTrailEntry!] @complexity(value: 0)
2217
+ }
2218
+
2219
+ extend interface TopicMessage {
2220
+ aiProcessingStatus: AIModerationProcessingStatus
2221
+ aiModerationResult: AIModerationResult
2222
+ akismetModerationResult: AkismetModerationResult
2223
+ moderationAudit: [ModerationAuditEntry!]
2224
+ moderationSettingsSnapshot: ModerationSettingsSnapshot @complexity(value: 0)
2225
+ moderationAuditTrail: [ModerationAuditTrailEntry!] @complexity(value: 0)
2226
+ }
2227
+
2228
+ extend interface ReplyMessage {
2229
+ aiProcessingStatus: AIModerationProcessingStatus
2230
+ aiModerationResult: AIModerationResult
2231
+ akismetModerationResult: AkismetModerationResult
2232
+ moderationAudit: [ModerationAuditEntry!]
2233
+ moderationSettingsSnapshot: ModerationSettingsSnapshot @complexity(value: 0)
2234
+ moderationAuditTrail: [ModerationAuditTrailEntry!] @complexity(value: 0)
2235
+ }
2236
+
2237
+ extend interface Article {
2238
+ aiProcessingStatus: AIModerationProcessingStatus
2239
+ aiModerationResult: AIModerationResult
2240
+ akismetModerationResult: AkismetModerationResult
2241
+ moderationAudit: [ModerationAuditEntry!]
2242
+ moderationSettingsSnapshot: ModerationSettingsSnapshot @complexity(value: 0)
2243
+ moderationAuditTrail: [ModerationAuditTrailEntry!] @complexity(value: 0)
2244
+ }
2245
+
2208
2246
  extend type ForumTopicMessage {
2209
2247
  aiProcessingStatus: AIModerationProcessingStatus
2210
2248
  aiModerationResult: AIModerationResult
@@ -63,12 +63,10 @@ type Poll {
63
63
  isEditable: Boolean!
64
64
  "Whether the current user is the poll creator."
65
65
  isCreator: Boolean!
66
- "Whether the current user can export poll results (admin only)."
66
+ "Whether the current user can export poll results (admin or poll creator)."
67
67
  canExport: Boolean!
68
68
  "Number of times the poll has been viewed (FEED-06 view tracking)."
69
69
  viewCount: Int
70
- "Whether sign-in is required to vote on this poll."
71
- requireSignInToVote: Boolean!
72
70
  }
73
71
 
74
72
  "An option within a poll that users can vote for."
@@ -195,7 +193,7 @@ union ClosePollResponse = ClosePollResult | PollNotFoundError | PollPermissionDe
195
193
  type ExportPollResultsResult {
196
194
  "The poll ID that was exported."
197
195
  pollId: String!
198
- "CSV content of poll results. Empty until Phase 5 implements full export."
196
+ "CSV content of poll results."
199
197
  csvContent: String!
200
198
  }
201
199
 
@@ -345,6 +343,8 @@ type PollHistoryEntry {
345
343
  boardTitle: String!
346
344
  "Message UID for navigation link."
347
345
  messageUid: String!
346
+ "Canonical Aurora URL for the parent topic message."
347
+ messageViewHref: String!
348
348
  "Total votes on this poll."
349
349
  totalVotes: Int!
350
350
  "Option text the user voted for (null for 'created' filter)."
@@ -384,7 +384,7 @@ extend type Mutation {
384
384
  "Close a poll early (creator or admin only)."
385
385
  closePoll(collectionId: String!): ClosePollResponse!
386
386
 
387
- "Exports poll results as CSV data. Admin only."
387
+ "Exports poll results as CSV data. Admin or poll creator."
388
388
  exportPollResults(pollId: String!): ExportPollResultsResponse!
389
389
 
390
390
  "Exports community-wide poll statistics as CSV. Admin only."
@@ -420,10 +420,6 @@ type PollSettings implements Settings {
420
420
  memberCanOverrideResultsVisibility: InheritableBooleanSetting
421
421
  "Default setting for showing results before voting."
422
422
  defaultShowResultsBeforeVote: InheritableBooleanSetting
423
- "Whether polls require moderator approval before publishing."
424
- requireModeratorApproval: InheritableBooleanSetting
425
- "Whether sign-in is required to vote on polls."
426
- requireSignInToVote: InheritableBooleanSetting
427
423
  "Default setting for allowing vote changes."
428
424
  defaultAllowVoteChange: InheritableBooleanSetting
429
425
  "Minimum duration for a poll in hours."
@@ -468,10 +464,6 @@ input PollSettingsInput @validationDefaults(prefix: "poll") {
468
464
  memberCanOverrideResultsVisibility: Boolean @validation(key: "member_can_override_results_visibility")
469
465
  "Default setting for showing results before voting."
470
466
  defaultShowResultsBeforeVote: Boolean @validation(key: "default_show_results_before_vote")
471
- "Whether polls require moderator approval before publishing."
472
- requireModeratorApproval: Boolean @validation(key: "require_moderator_approval")
473
- "Whether sign-in is required to vote on polls."
474
- requireSignInToVote: Boolean @validation(key: "require_sign_in_to_vote")
475
467
  "Default setting for allowing vote changes."
476
468
  defaultAllowVoteChange: Boolean @validation(key: "default_allow_vote_change")
477
469
  "Minimum duration for a poll in hours."
@@ -24,6 +24,20 @@ extend type Mutation {
24
24
 
25
25
  "Update survey"
26
26
  updateSurvey(input: UpdateSurveyInput!): UpdateSurveyResponse!
27
+
28
+ "Track survey prompt display activity"
29
+ trackSurveyPromptDisplay(
30
+ "The node ID from where the response is being submitted."
31
+ nodeId: ID!
32
+ ): TrackSurveyResponse
33
+
34
+ "Track survey prompt response activity"
35
+ trackSurveyPromptResponse(
36
+ "The node ID from where the response is being submitted."
37
+ nodeId: ID!
38
+ "Whether the user accepted or denied to take the survey"
39
+ optIn: Boolean!
40
+ ): TrackSurveyResponse
27
41
  }
28
42
 
29
43
  input UpdateSurveyInput @validationDefaults(prefix: "valuesurveys") {
@@ -231,6 +245,14 @@ type CreateSurveyResponseResponse {
231
245
  errors: [CreateSurveyResponseError!]
232
246
  }
233
247
 
248
+ "Response returned by the trackSurveyPromptDisplay and trackSurveyPromptResponse mutations."
249
+ type TrackSurveyResponse {
250
+ "True when the request was accepted and processed to completion by the server (including any configured flag or policy gates). False only when a server-side error payload is present in `errors`. Note: `true` does not guarantee an event was emitted — when feature flags or eligibility policies short-circuit the operation, the server still returns `true` and `errors: null` because no error reached lia."
251
+ result: Boolean
252
+ "Any Error that occurred when trying to track a survey event."
253
+ errors: [CreateSurveyResponseError!]
254
+ }
255
+
234
256
  type SurveysNotEnabledError implements Error {
235
257
  "The localized message of the error."
236
258
  message: String!
@@ -238,8 +260,16 @@ type SurveysNotEnabledError implements Error {
238
260
  fields: [String]!
239
261
  }
240
262
 
241
- "A known error that can be returned by the createSurveyResponse mutation."
242
- union CreateSurveyResponseError = SurveysNotEnabledError | CoreNodeNotFoundError | InvalidInputError
263
+ "Returned when the client-declared expected user identity (via x-khoros-expected-user-id header) does not match the principal the server resolved from the request's session. Indicates the client's authUser context has drifted from the server-side session (typically a silently-expired JWT). Callers should treat this as 'session expired' and prompt re-authentication."
264
+ type SessionIdentityMismatchError implements Error {
265
+ "The localized message of the error."
266
+ message: String!
267
+ "Fields to map this error to."
268
+ fields: [String]!
269
+ }
270
+
271
+ "A known error union returned by any KCOMM-493 survey mutation that exposes an errors field — createSurveyResponse, trackSurveyPromptDisplay, and trackSurveyPromptResponse (via TrackSurveyResponse.errors)."
272
+ union CreateSurveyResponseError = SurveysNotEnabledError | CoreNodeNotFoundError | InvalidInputError | SessionIdentityMismatchError
243
273
 
244
274
  extend type UserPolicies {
245
275
  "Whether the calling user can take the value survey."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "khoros-aurora-sdk",
3
- "version": "26.3.0",
3
+ "version": "26.3.2",
4
4
  "author": "Khoros, LLC",
5
5
  "keywords": [
6
6
  "Khoros_Aurora_SDK",
@@ -28,7 +28,7 @@
28
28
  "gen": "node ./scripts/generateCli.js"
29
29
  },
30
30
  "dependencies": {
31
- "@apollo/client": "~3.11.10",
31
+ "@apollo/client": "3.11.10",
32
32
  "@babel/cli": "^7.0.0",
33
33
  "@babel/core": "^7.24.5",
34
34
  "@babel/plugin-transform-modules-commonjs": "^7.24.1",
@@ -66,12 +66,9 @@
66
66
  "eslint": "~8.57.1",
67
67
  "eslint-config-airbnb": "~19.0.4",
68
68
  "eslint-config-airbnb-typescript": "~17.1.0",
69
- "eslint-config-next": "15.1.11",
70
69
  "eslint-config-prettier": "~9.0.0",
71
- "eslint-import-resolver-typescript": "3.8.1",
72
70
  "eslint-import-resolver-webpack": "~0.13.7",
73
71
  "eslint-plugin-file-progress": "~1.3.0",
74
- "eslint-plugin-import": "2.32.0",
75
72
  "eslint-plugin-jsx-a11y": "~6.7.1",
76
73
  "eslint-plugin-node": "~11.1.0",
77
74
  "eslint-plugin-promise": "~6.1.1",
@@ -116,12 +113,12 @@
116
113
  "yaml": "^2.8.0",
117
114
  "yargs": "^17.7.2"
118
115
  },
116
+ "peerDependencies": {
117
+ "eslint-import-resolver-typescript": "3.6.1"
118
+ },
119
119
  "engines": {
120
120
  "node": ">=18"
121
121
  },
122
- "overrides": {
123
- "eslint-import-resolver-typescript": "3.8.1"
124
- },
125
122
  "publishConfig": {
126
123
  "access": "public"
127
124
  }