Skip to content

Commit a50c45f

Browse files
authored
Merge pull request #63 from ems-press/feat/books-ahead-of-time-publication
add `books.cover_date` and `books.cover_date_precision`
2 parents c814dee + 8f64019 commit a50c45f

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
node: ['16', '18', '20']
10+
node: ['18', '20', '22', '24']
1111
name: 'Build and test on node ${{ matrix.node }}'
1212
steps:
1313
- uses: actions/checkout@v3

src/resources/books.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@ export type Attributes = {
7070
licenseCode?: string
7171
licenseUrl?: string
7272
languageCode?: string
73-
}
73+
} & (
74+
| { coverDate: Date; coverDatePrecision: DatePrecision }
75+
| { coverDate: undefined; coverDatePrecision: undefined }
76+
)
7477

7578
export type Relationships = {
7679
bookSeries: { type: BookSeries.Type; cardinality: null | '1' }
@@ -89,6 +92,7 @@ export type SortField =
8992
| 'createdAt'
9093
| 'updatedAt'
9194
| 'publishedAt'
95+
| 'coverDate'
9296
| 'title'
9397
| 'pages'
9498
| 'bookSeriesVolume'

0 commit comments

Comments
 (0)