-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.ts
34 lines (28 loc) · 869 Bytes
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* eslint-disable eslint-comments/disable-enable-pair */
/* eslint-disable @typescript-eslint/indent */
import type { GreenButtonJson } from '@cityssm/green-button-parser/types/entryTypes.js'
export type IsoDateString =
`${string}-${string}-${string}T${string}:${string}:${string}Z`
export type DateOrIsoDateString = Date | IsoDateString
export interface DateTimeFilters {
publishedMin?: DateOrIsoDateString
publishedMax?: DateOrIsoDateString
updatedMin?: DateOrIsoDateString
updatedMax?: DateOrIsoDateString
}
export interface GreenButtonSubscriberConfiguration {
baseUrl: `https://${string}/`
oauthUrl?: `https://${string}`
clientId?: string
clientSecret?: string
accessToken?: string
}
export type GreenButtonResponse =
| {
status: 200
json: GreenButtonJson
}
| {
status: number
json?: GreenButtonJson
}