Skip to content
13 changes: 13 additions & 0 deletions .changeset/quiet-melons-jump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
'confluence.js': patch
---

Describe the last fields the schema audit found undocumented.

Closes the tail left after the previous release: `comment` and `attachment` on a version returned inside a
`versions` collection, the `count` on a like collection's meta, the hyphenated `inline-marker-ref` /
`inline-original-selection` inline-comment property keys, the async content-body's `content`, and `noAccessEmails` on
the check-access-by-email response. The schema audit now reports no drift at all.

As before, every addition is optional and additive: nothing that used to type-check stops doing so, runtime validation
is unchanged, and no field is renamed or removed — the types simply describe more of what Confluence already returns.
1 change: 1 addition & 0 deletions src/v1/models/asyncContentBody.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export const AsyncContentBodySchema = apiObject({
mediaToken: z.string().optional(),
}).optional(),
_links: GenericLinksSchema.optional(),
content: z.unknown().optional(),
});

export type AsyncContentBody = z.infer<typeof AsyncContentBodySchema>;
2 changes: 2 additions & 0 deletions src/v2/models/accessByEmail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ export const AccessByEmailSchema = apiObject({
emailsWithoutAccess: z.array(z.string()).optional(),
/** List of invalid emails provided in the request. */
invalidEmails: z.array(z.string()).optional(),
/** Emails from the request that have no access to the site. */
noAccessEmails: z.array(z.unknown()).optional(),
});

export type AccessByEmail = z.infer<typeof AccessByEmailSchema>;
2 changes: 2 additions & 0 deletions src/v2/models/inlineCommentProperties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ export const InlineCommentPropertiesSchema = apiObject({
inlineMarkerRef: z.string().optional(),
/** Text that is highlighted. */
inlineOriginalSelection: z.string().optional(),
'inline-marker-ref': z.string().optional(),
'inline-original-selection': z.string().optional(),
});

export type InlineCommentProperties = z.infer<typeof InlineCommentPropertiesSchema>;
2 changes: 2 additions & 0 deletions src/v2/models/optionalFieldMeta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export const OptionalFieldMetaSchema = apiObject({
* next set of results.
*/
cursor: z.string().optional(),
/** Number of items in the collection. */
count: z.number().optional(),
});

export type OptionalFieldMeta = z.infer<typeof OptionalFieldMetaSchema>;
2 changes: 2 additions & 0 deletions src/v2/models/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export const VersionSchema = apiObject({
ncsStepVersion: z.string().nullish(),
/** Account ids of everyone who has contributed to the content. */
contributorIds: z.array(z.unknown()).optional(),
comment: z.record(z.string(), z.any()).optional(),
attachment: z.record(z.string(), z.any()).optional(),
});

export type Version = z.infer<typeof VersionSchema>;