jdalrymple/gitbeaker

Missing field in the DiscussionNotePositionTextSchema

harjotgill opened this issue ยท 2 comments

Description

Missing line_range field in the position schema for DiscussionNotePositionTextSchema.

  • Node.js version: N/A
  • Gitbeaker version: 40.0.2
  • Gitbeaker release (cli, rest, core, requester-utils): 40.0.2
  • OS & version: N/A

Steps to reproduce

Expected behaviour

Actual behaviour

Possible fixes

Checklist

  • I have checked that this is not a duplicate issue.
  • I have read the documentation.

This is what I came up with based on what I see in the Webhook event for the DiffNote:

export interface DiscussionNotePositionTextLineSchema {
  line_code?: string;
  type?: 'new' | 'old';
  old_line?: number;
  new_line?: number;
}

export interface DiscussionNotePositionLineRangeSchema {
  start?: DiscussionNotePositionTextLineSchema;
  end?: DiscussionNotePositionTextLineSchema;
}

export type DiscussionNotePositionTextSchema = DiscussionNotePositionBaseSchema & {
  position_type: 'text';
  new_line?: string;
  old_line?: string;
  line_range?: DiscussionNotePositionLineRangeSchema;
};

๐Ÿš€ Issue was released in 40.0.3 ๐Ÿš€