Skip to content

Commit

Permalink
fix: Make first_id and last_id nullable in list endpoints in openai_dart
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmigloz committed Nov 29, 2024
1 parent 9f8fe44 commit 6e58151
Show file tree
Hide file tree
Showing 10 changed files with 379 additions and 330 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ class ListAssistantsResponse with _$ListAssistantsResponse {
required List<AssistantObject> data,

/// The ID of the first assistant in the list.
@JsonKey(name: 'first_id') required String firstId,
@JsonKey(name: 'first_id', includeIfNull: false) String? firstId,

/// The ID of the last assistant in the list.
@JsonKey(name: 'last_id') required String lastId,
@JsonKey(name: 'last_id', includeIfNull: false) String? lastId,

/// Whether there are more assistants to retrieve.
@JsonKey(name: 'has_more') required bool hasMore,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ class ListMessagesResponse with _$ListMessagesResponse {
required List<MessageObject> data,

/// The ID of the first message in the list.
@JsonKey(name: 'first_id') required String firstId,
@JsonKey(name: 'first_id', includeIfNull: false) String? firstId,

/// The ID of the last message in the list.
@JsonKey(name: 'last_id') required String lastId,
@JsonKey(name: 'last_id', includeIfNull: false) String? lastId,

/// Whether there are more messages to retrieve.
@JsonKey(name: 'has_more') required bool hasMore,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ class ListRunStepsResponse with _$ListRunStepsResponse {
required List<RunStepObject> data,

/// The ID of the first run step in the list.
@JsonKey(name: 'first_id') required String firstId,
@JsonKey(name: 'first_id', includeIfNull: false) String? firstId,

/// The ID of the last run step in the list.
@JsonKey(name: 'last_id') required String lastId,
@JsonKey(name: 'last_id', includeIfNull: false) String? lastId,

/// Whether there are more run steps to retrieve.
@JsonKey(name: 'has_more') required bool hasMore,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ class ListRunsResponse with _$ListRunsResponse {
required List<RunObject> data,

/// The ID of the first run in the list.
@JsonKey(name: 'first_id') required String firstId,
@JsonKey(name: 'first_id', includeIfNull: false) String? firstId,

/// The ID of the last run in the list.
@JsonKey(name: 'last_id') required String lastId,
@JsonKey(name: 'last_id', includeIfNull: false) String? lastId,

/// Whether there are more runs to retrieve.
@JsonKey(name: 'has_more') required bool hasMore,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ class ListThreadsResponse with _$ListThreadsResponse {
required List<ThreadObject> data,

/// The ID of the first thread in the list.
@JsonKey(name: 'first_id') required String firstId,
@JsonKey(name: 'first_id', includeIfNull: false) String? firstId,

/// The ID of the last thread in the list.
@JsonKey(name: 'last_id') required String lastId,
@JsonKey(name: 'last_id', includeIfNull: false) String? lastId,

/// Whether there are more threads to retrieve.
@JsonKey(name: 'has_more') required bool hasMore,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ class ListVectorStoreFilesResponse with _$ListVectorStoreFilesResponse {
required List<VectorStoreFileObject> data,

/// The ID of the first message file in the list.
@JsonKey(name: 'first_id') required String firstId,
@JsonKey(name: 'first_id', includeIfNull: false) String? firstId,

/// The ID of the last message file in the list.
@JsonKey(name: 'last_id') required String lastId,
@JsonKey(name: 'last_id', includeIfNull: false) String? lastId,

/// Whether there are more message files available.
@JsonKey(name: 'has_more') required bool hasMore,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ class ListVectorStoresResponse with _$ListVectorStoresResponse {
required List<VectorStoreObject> data,

/// The ID of the first assistant file in the list.
@JsonKey(name: 'first_id') required String? firstId,
@JsonKey(name: 'first_id', includeIfNull: false) String? firstId,

/// The ID of the last assistant file in the list.
@JsonKey(name: 'last_id') required String? lastId,
@JsonKey(name: 'last_id', includeIfNull: false) String? lastId,

/// Whether there are more assistant files available.
@JsonKey(name: 'has_more') required bool hasMore,
Expand Down
Loading

0 comments on commit 6e58151

Please sign in to comment.