diff --git a/.changeset/quiet-melons-jump.md b/.changeset/quiet-melons-jump.md new file mode 100644 index 00000000..173be175 --- /dev/null +++ b/.changeset/quiet-melons-jump.md @@ -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. diff --git a/src/v1/models/asyncContentBody.ts b/src/v1/models/asyncContentBody.ts index 3cde9475..7c370d0e 100644 --- a/src/v1/models/asyncContentBody.ts +++ b/src/v1/models/asyncContentBody.ts @@ -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; diff --git a/src/v2/models/accessByEmail.ts b/src/v2/models/accessByEmail.ts index aec7cd42..59a04088 100644 --- a/src/v2/models/accessByEmail.ts +++ b/src/v2/models/accessByEmail.ts @@ -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; diff --git a/src/v2/models/inlineCommentProperties.ts b/src/v2/models/inlineCommentProperties.ts index a57e9262..59a5d1ce 100644 --- a/src/v2/models/inlineCommentProperties.ts +++ b/src/v2/models/inlineCommentProperties.ts @@ -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; diff --git a/src/v2/models/optionalFieldMeta.ts b/src/v2/models/optionalFieldMeta.ts index 7d0915b1..2cf764b8 100644 --- a/src/v2/models/optionalFieldMeta.ts +++ b/src/v2/models/optionalFieldMeta.ts @@ -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; diff --git a/src/v2/models/version.ts b/src/v2/models/version.ts index b0d3a587..f538a759 100644 --- a/src/v2/models/version.ts +++ b/src/v2/models/version.ts @@ -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;