diff --git a/CHANGELOG.md b/CHANGELOG.md index 7541e62b..ba1d11e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ 2.2.0 / 2022/02/XX =================== - Added support for the (for now experimental) `view` parameter to the dataset items endpoints +- For TypeScript users, the type for the fields that end in `At` (ex.: `createdAt`) have been correctly typed as a Date object instead of a string 2.1.0 / 2022/01/26 =================== diff --git a/src/resource_clients/actor.ts b/src/resource_clients/actor.ts index 97f917e0..a5c92097 100644 --- a/src/resource_clients/actor.ts +++ b/src/resource_clients/actor.ts @@ -220,8 +220,8 @@ export interface Actor { restartOnError?: boolean; isPublic: boolean; isAnonymouslyRunnable?: boolean; - createdAt: string; - modifiedAt: string; + createdAt: Date; + modifiedAt: Date; stats: ActorStats; versions: ActorVersion[]; defaultRunOptions: ActorDefaultRunOptions; @@ -240,7 +240,7 @@ export interface ActorStats { totalUsers30Days: number; totalUsers90Days: number; totalMetamorphs: number; - lastRunStartedAt: string; + lastRunStartedAt: Date; } export interface ActorDefaultRunOptions { @@ -261,7 +261,7 @@ export interface ActorTaggedBuilds { export interface ActorTaggedBuild { buildId?: string; buildNumber?: string; - finishedAt?: string; + finishedAt?: Date; } export type ActorUpdateOptions = Pick @@ -313,8 +313,8 @@ export interface ActorRun { actId: string; userId: string; actorTaskId?: string; - startedAt: string; - finishedAt: string; + startedAt: Date; + finishedAt: Date; status: typeof ACT_JOB_TERMINAL_STATUSES[number]; meta: ActorRunMeta; stats: ActorRunStats; diff --git a/src/resource_clients/actor_collection.ts b/src/resource_clients/actor_collection.ts index 6a10b982..c408a2c3 100644 --- a/src/resource_clients/actor_collection.ts +++ b/src/resource_clients/actor_collection.ts @@ -49,8 +49,8 @@ export interface ActorCollectionListOptions { export interface ActorCollectionListItem { id: string; - createdAt: string; - modifiedAt: string; + createdAt: Date; + modifiedAt: Date; name: string; username: string; } diff --git a/src/resource_clients/build.ts b/src/resource_clients/build.ts index 95c1268e..250f13b8 100644 --- a/src/resource_clients/build.ts +++ b/src/resource_clients/build.ts @@ -86,8 +86,8 @@ export interface Build { id: string; actId: string; userId: string; - startedAt: string; - finishedAt?: string; + startedAt: Date; + finishedAt?: Date; status: typeof ACT_JOB_TERMINAL_STATUSES[number]; meta: BuildMeta; stats?: BuildStats; diff --git a/src/resource_clients/dataset.ts b/src/resource_clients/dataset.ts index a6b932c1..7c16ffb5 100644 --- a/src/resource_clients/dataset.ts +++ b/src/resource_clients/dataset.ts @@ -144,9 +144,9 @@ export interface Dataset { id: string; name?: string; userId: string; - createdAt: string; - modifiedAt: string; - accessedAt: string; + createdAt: Date; + modifiedAt: Date; + accessedAt: Date; itemCount: number; cleanItemCount: number; actId?: string; diff --git a/src/resource_clients/key_value_store.ts b/src/resource_clients/key_value_store.ts index 4a5bce97..13545bac 100644 --- a/src/resource_clients/key_value_store.ts +++ b/src/resource_clients/key_value_store.ts @@ -183,9 +183,9 @@ export interface KeyValueStore { id: string; name?: string; userId: string; - createdAt: string; - modifiedAt: string; - accessedAt: string; + createdAt: Date; + modifiedAt: Date; + accessedAt: Date; actId?: string; actRunId?: string; stats?: KeyValueStoreStats; diff --git a/src/resource_clients/request_queue.ts b/src/resource_clients/request_queue.ts index 4c18e869..5a4ba6a7 100644 --- a/src/resource_clients/request_queue.ts +++ b/src/resource_clients/request_queue.ts @@ -274,9 +274,9 @@ export interface RequestQueue { id: string; name?: string; userId: string; - createdAt: string; - modifiedAt: string; - accessedAt: string; + createdAt: Date; + modifiedAt: Date; + accessedAt: Date; expireAt?: string; totalRequestCount: number; handledRequestCount: number; @@ -305,7 +305,7 @@ export interface RequestQueueClientListHeadOptions { export interface RequestQueueClientListHeadResult { limit: number; - queueModifiedAt: string; + queueModifiedAt: Date; hadMultipleClients: boolean; items: RequestQueueClientListItem[]; } diff --git a/src/resource_clients/schedule.ts b/src/resource_clients/schedule.ts index 8486c53e..825d3a89 100644 --- a/src/resource_clients/schedule.ts +++ b/src/resource_clients/schedule.ts @@ -73,8 +73,8 @@ export interface Schedule { isEnabled: boolean; isExclusive: boolean; description?: string; - createdAt: string; - modifiedAt: string; + createdAt: Date; + modifiedAt: Date; nextRunAt: string; lastRunAt: string; actions: ScheduleAction[]; diff --git a/src/resource_clients/task.ts b/src/resource_clients/task.ts index d6dc3a20..c44e5255 100644 --- a/src/resource_clients/task.ts +++ b/src/resource_clients/task.ts @@ -189,8 +189,8 @@ export interface Task { name: string; description?: string; username?: string; - createdAt: string; - modifiedAt: string; + createdAt: Date; + modifiedAt: Date; stats: TaskStats; options?: TaskOptions; input?: Dictionary | Dictionary[]; diff --git a/src/resource_clients/webhook.ts b/src/resource_clients/webhook.ts index 00ff5856..f9d86e99 100644 --- a/src/resource_clients/webhook.ts +++ b/src/resource_clients/webhook.ts @@ -80,8 +80,8 @@ export class WebhookClient extends ResourceClient { export interface Webhook { id: string; userId: string; - createdAt: string; - modifiedAt: string; + createdAt: Date; + modifiedAt: Date; isAdHoc: boolean; eventTypes: WebhookEventType[]; condition: WebhookCondition; diff --git a/src/resource_clients/webhook_dispatch.ts b/src/resource_clients/webhook_dispatch.ts index c67240be..9556bb8c 100644 --- a/src/resource_clients/webhook_dispatch.ts +++ b/src/resource_clients/webhook_dispatch.ts @@ -25,7 +25,7 @@ export interface WebhookDispatch { id: string; userId: string; webhookId: string; - createdAt: string; + createdAt: Date; status: WebhookDispatchStatus; eventType: WebhookEventType; calls: WebhookDispatchCall[]; @@ -39,8 +39,8 @@ export enum WebhookDispatchStatus { } export interface WebhookDispatchCall { - startedAt: string; - finishedAt: string; + startedAt: Date; + finishedAt: Date; errorMessage: string | null; responseStatus: number | null; responseBody: string | null;