diff --git a/packages/datadirect/package.json b/packages/datadirect/package.json index ccc5456..5931147 100644 --- a/packages/datadirect/package.json +++ b/packages/datadirect/package.json @@ -30,6 +30,7 @@ }, "prettier": "@battis/prettier-config", "devDependencies": { + "@battis/descriptive-types": "^0.1.0", "@battis/typescript-tricks": "^0.6.1", "@tsconfig/node20": "^20.1.4", "@types/node": "^22.10.2", diff --git a/packages/datadirect/src/api/Assignment2/AssignmentCenterCourseListGet/Payload.ts b/packages/datadirect/src/api/Assignment2/AssignmentCenterCourseListGet/Payload.ts index d4e44e5..bc398fb 100644 --- a/packages/datadirect/src/api/Assignment2/AssignmentCenterCourseListGet/Payload.ts +++ b/packages/datadirect/src/api/Assignment2/AssignmentCenterCourseListGet/Payload.ts @@ -1,3 +1,5 @@ +import { NumericString } from '@battis/descriptive-types'; + type DropDownItem = { Value: number; Display: string; diff --git a/packages/datadirect/src/api/Assignment2/AssignmentCenterCourseListGet/Response.ts b/packages/datadirect/src/api/Assignment2/AssignmentCenterCourseListGet/Response.ts index 15ba83c..83f4c09 100644 --- a/packages/datadirect/src/api/Assignment2/AssignmentCenterCourseListGet/Response.ts +++ b/packages/datadirect/src/api/Assignment2/AssignmentCenterCourseListGet/Response.ts @@ -1,3 +1,9 @@ +import { + DateTimeString, + HTMLString, + NumericString +} from '@battis/descriptive-types'; + type Assignment = { AssignmentId: number; AssignmentIndexId: number; diff --git a/packages/datadirect/src/api/Assignment2/SecureGet/Response.ts b/packages/datadirect/src/api/Assignment2/SecureGet/Response.ts index 7054ecc..459ed50 100644 --- a/packages/datadirect/src/api/Assignment2/SecureGet/Response.ts +++ b/packages/datadirect/src/api/Assignment2/SecureGet/Response.ts @@ -1,3 +1,12 @@ +import { + DateString, + DateTimeString, + HTMLString, + NumericBoolean, + TimeString, + URLString +} from '@battis/descriptive-types'; + type Duration = { DurationId: number; SortOrder: number; diff --git a/packages/datadirect/src/api/Assignment2/UserAssignmentDetailsGetAllData/Response.ts b/packages/datadirect/src/api/Assignment2/UserAssignmentDetailsGetAllData/Response.ts index 64c8f3f..1c8fe41 100644 --- a/packages/datadirect/src/api/Assignment2/UserAssignmentDetailsGetAllData/Response.ts +++ b/packages/datadirect/src/api/Assignment2/UserAssignmentDetailsGetAllData/Response.ts @@ -1,3 +1,9 @@ +import { + DateTimeString, + HTMLString, + URLString +} from '@battis/descriptive-types'; + type LinkItem = { Url: URLString; ShortDescription: string; diff --git a/packages/datadirect/src/api/DataDirect/GradeBookMarkingPeriodList/Response.ts b/packages/datadirect/src/api/DataDirect/GradeBookMarkingPeriodList/Response.ts index 8e25c03..2f0b495 100644 --- a/packages/datadirect/src/api/DataDirect/GradeBookMarkingPeriodList/Response.ts +++ b/packages/datadirect/src/api/DataDirect/GradeBookMarkingPeriodList/Response.ts @@ -1,3 +1,5 @@ +import { NumericBoolean } from '@battis/descriptive-types'; + export type Item = { MarkingPeriodId: number; MarkingPeriodDescription: string; diff --git a/packages/datadirect/src/api/DataDirect/ImportAssignmentsGet/Response.ts b/packages/datadirect/src/api/DataDirect/ImportAssignmentsGet/Response.ts index 713cecb..c449f1f 100644 --- a/packages/datadirect/src/api/DataDirect/ImportAssignmentsGet/Response.ts +++ b/packages/datadirect/src/api/DataDirect/ImportAssignmentsGet/Response.ts @@ -1,3 +1,5 @@ +import { DateTimeString, HTMLString } from '@battis/descriptive-types'; + export type Item = { assignment_id: number; assignment_index_id: number; diff --git a/packages/datadirect/src/api/DataDirect/SectionInfoView/Response.ts b/packages/datadirect/src/api/DataDirect/SectionInfoView/Response.ts index 5728a75..14f8eb9 100644 --- a/packages/datadirect/src/api/DataDirect/SectionInfoView/Response.ts +++ b/packages/datadirect/src/api/DataDirect/SectionInfoView/Response.ts @@ -1,3 +1,9 @@ +import { + DateString, + NumericBoolean, + NumericTimestamp +} from '@battis/descriptive-types'; + export type Item = { AssociationId: number; Block: string; diff --git a/packages/datadirect/src/api/DataDirect/common/ContentItem/Announcement.ts b/packages/datadirect/src/api/DataDirect/common/ContentItem/Announcement.ts index d9075d8..57e8af4 100644 --- a/packages/datadirect/src/api/DataDirect/common/ContentItem/Announcement.ts +++ b/packages/datadirect/src/api/DataDirect/common/ContentItem/Announcement.ts @@ -1,3 +1,9 @@ +import { + DateString, + DateTimeString, + HTMLString +} from '@battis/descriptive-types'; + export type Announcement = { Name: string; Author: string; diff --git a/packages/datadirect/src/api/DataDirect/common/ContentItem/Assignment.ts b/packages/datadirect/src/api/DataDirect/common/ContentItem/Assignment.ts index f431726..76f2388 100644 --- a/packages/datadirect/src/api/DataDirect/common/ContentItem/Assignment.ts +++ b/packages/datadirect/src/api/DataDirect/common/ContentItem/Assignment.ts @@ -1,3 +1,5 @@ +import { DateTimeString, TimeString } from '@battis/descriptive-types'; + export type Assignment = { AssignmentId: number; AssignmentTypeId: number; diff --git a/packages/datadirect/src/api/DataDirect/common/ContentItem/DiscussionThread.ts b/packages/datadirect/src/api/DataDirect/common/ContentItem/DiscussionThread.ts index 2f9650e..9170fc0 100644 --- a/packages/datadirect/src/api/DataDirect/common/ContentItem/DiscussionThread.ts +++ b/packages/datadirect/src/api/DataDirect/common/ContentItem/DiscussionThread.ts @@ -1,3 +1,9 @@ +import { + DateTimeString, + HTMLString, + NumericTimestamp +} from '@battis/descriptive-types'; + export type Message = { MessageId: number; UserId: number; diff --git a/packages/datadirect/src/api/DataDirect/common/ContentItem/Download.ts b/packages/datadirect/src/api/DataDirect/common/ContentItem/Download.ts index 28ff2b9..e598197 100644 --- a/packages/datadirect/src/api/DataDirect/common/ContentItem/Download.ts +++ b/packages/datadirect/src/api/DataDirect/common/ContentItem/Download.ts @@ -1,3 +1,10 @@ +import { + DateString, + DateTimeString, + HTMLString, + URLString +} from '@battis/descriptive-types'; + export type Download = { DownloadID: number; ItemID: number; diff --git a/packages/datadirect/src/api/DataDirect/common/ContentItem/Events.ts b/packages/datadirect/src/api/DataDirect/common/ContentItem/Events.ts index 502f7bd..604b46c 100644 --- a/packages/datadirect/src/api/DataDirect/common/ContentItem/Events.ts +++ b/packages/datadirect/src/api/DataDirect/common/ContentItem/Events.ts @@ -1,3 +1,12 @@ +import { + DateString, + DateTimeString, + EmailString, + HTMLString, + NumericString, + TimeString +} from '@battis/descriptive-types'; + export type Event = { Id: number; StartDate: DateTimeString; diff --git a/packages/datadirect/src/api/DataDirect/common/ContentItem/Expectations.ts b/packages/datadirect/src/api/DataDirect/common/ContentItem/Expectations.ts index fffd87c..787b38c 100644 --- a/packages/datadirect/src/api/DataDirect/common/ContentItem/Expectations.ts +++ b/packages/datadirect/src/api/DataDirect/common/ContentItem/Expectations.ts @@ -1,3 +1,5 @@ +import { DateTimeString, HTMLString } from '@battis/descriptive-types'; + // TODO DataDirect/common/ContentItem/Expectations identical to Syllabus, GradingRubric export type Expectations = { Id: number; diff --git a/packages/datadirect/src/api/DataDirect/common/ContentItem/GradingRubric.ts b/packages/datadirect/src/api/DataDirect/common/ContentItem/GradingRubric.ts index 6a79483..ef3a121 100644 --- a/packages/datadirect/src/api/DataDirect/common/ContentItem/GradingRubric.ts +++ b/packages/datadirect/src/api/DataDirect/common/ContentItem/GradingRubric.ts @@ -1,3 +1,5 @@ +import { DateTimeString, URLString } from '@battis/descriptive-types'; + // TODO DataDirect/common/ContentItem/Expectations identical to Syllabus, GradingRubric export type GradingRubric = { Id: number; diff --git a/packages/datadirect/src/api/DataDirect/common/ContentItem/Links.ts b/packages/datadirect/src/api/DataDirect/common/ContentItem/Links.ts index c961ef8..253c9a5 100644 --- a/packages/datadirect/src/api/DataDirect/common/ContentItem/Links.ts +++ b/packages/datadirect/src/api/DataDirect/common/ContentItem/Links.ts @@ -1,3 +1,10 @@ +import { + DateString, + DateTimeString, + HTMLString, + URLString +} from '@battis/descriptive-types'; + export type Link = { Url: URLString; ShortDescription: string; diff --git a/packages/datadirect/src/api/DataDirect/common/ContentItem/Media.ts b/packages/datadirect/src/api/DataDirect/common/ContentItem/Media.ts index e02d1eb..4a5d7d6 100644 --- a/packages/datadirect/src/api/DataDirect/common/ContentItem/Media.ts +++ b/packages/datadirect/src/api/DataDirect/common/ContentItem/Media.ts @@ -1,3 +1,11 @@ +import { + DateString, + DateTimeString, + HTMLString, + NumericString, + URLString +} from '@battis/descriptive-types'; + export type Media = { AlbumId: number; AlbumName: string; diff --git a/packages/datadirect/src/api/DataDirect/common/ContentItem/News.ts b/packages/datadirect/src/api/DataDirect/common/ContentItem/News.ts index 6fc46a0..659cfe4 100644 --- a/packages/datadirect/src/api/DataDirect/common/ContentItem/News.ts +++ b/packages/datadirect/src/api/DataDirect/common/ContentItem/News.ts @@ -1,3 +1,9 @@ +import { + DateString, + DateTimeString, + URLString +} from '@battis/descriptive-types'; + export type Group = { GroupId: number; AssociationId: number; diff --git a/packages/datadirect/src/api/DataDirect/common/ContentItem/Payload.ts b/packages/datadirect/src/api/DataDirect/common/ContentItem/Payload.ts index f7cb345..afed21f 100644 --- a/packages/datadirect/src/api/DataDirect/common/ContentItem/Payload.ts +++ b/packages/datadirect/src/api/DataDirect/common/ContentItem/Payload.ts @@ -1,3 +1,5 @@ +import { DateString } from "@battis/descriptive-types"; + export type Payload = { id?: number; // Assignment leadSectionId?: number; // Assignment diff --git a/packages/datadirect/src/api/DataDirect/common/ContentItem/RSSReader.ts b/packages/datadirect/src/api/DataDirect/common/ContentItem/RSSReader.ts index e7ead5d..b045441 100644 --- a/packages/datadirect/src/api/DataDirect/common/ContentItem/RSSReader.ts +++ b/packages/datadirect/src/api/DataDirect/common/ContentItem/RSSReader.ts @@ -1,3 +1,5 @@ +import { URLString } from '@battis/descriptive-types'; + export type Content = { ContextLabelId: number; ContextValue: number; diff --git a/packages/datadirect/src/api/DataDirect/common/ContentItem/Response.ts b/packages/datadirect/src/api/DataDirect/common/ContentItem/Response.ts index 4fc7269..f60dc2d 100644 --- a/packages/datadirect/src/api/DataDirect/common/ContentItem/Response.ts +++ b/packages/datadirect/src/api/DataDirect/common/ContentItem/Response.ts @@ -1,3 +1,11 @@ +import { + DateString, + DateTimeString, + HTMLString, + NumericBoolean, + URLString +} from '@battis/descriptive-types'; + export type Container = { ContentId: number; }; diff --git a/packages/datadirect/src/api/DataDirect/common/ContentItem/Syllabus.ts b/packages/datadirect/src/api/DataDirect/common/ContentItem/Syllabus.ts index 3d01b47..c577ed4 100644 --- a/packages/datadirect/src/api/DataDirect/common/ContentItem/Syllabus.ts +++ b/packages/datadirect/src/api/DataDirect/common/ContentItem/Syllabus.ts @@ -1,3 +1,5 @@ +import { DateTimeString, HTMLString } from '@battis/descriptive-types'; + // TODO DataDirect/common/ContentItem/Expectations identical to Syllabus, GradingRubric export type Syllabus = { Id: number; diff --git a/packages/datadirect/src/api/DataDirect/common/ContentItem/Text.ts b/packages/datadirect/src/api/DataDirect/common/ContentItem/Text.ts index a3c540d..8b81d51 100644 --- a/packages/datadirect/src/api/DataDirect/common/ContentItem/Text.ts +++ b/packages/datadirect/src/api/DataDirect/common/ContentItem/Text.ts @@ -1,3 +1,5 @@ +import { DateTimeString, HTMLString } from '@battis/descriptive-types'; + export type Text = { Description: string; LongText: HTMLString; diff --git a/packages/datadirect/src/api/DataDirect/common/ContentItem/Widget.ts b/packages/datadirect/src/api/DataDirect/common/ContentItem/Widget.ts index 06f8c21..3186a03 100644 --- a/packages/datadirect/src/api/DataDirect/common/ContentItem/Widget.ts +++ b/packages/datadirect/src/api/DataDirect/common/ContentItem/Widget.ts @@ -1,3 +1,5 @@ +import { HTMLString } from '@battis/descriptive-types'; + export type Widget = { WidgetId: number; ShortDescription: string; diff --git a/packages/datadirect/src/api/DataDirect/sectionrosterget/Response.ts b/packages/datadirect/src/api/DataDirect/sectionrosterget/Response.ts index 73ffe15..7be5f17 100644 --- a/packages/datadirect/src/api/DataDirect/sectionrosterget/Response.ts +++ b/packages/datadirect/src/api/DataDirect/sectionrosterget/Response.ts @@ -1,3 +1,5 @@ +import { EmailString, NumericString } from '@battis/descriptive-types'; + export type Item = { Id: number; name: string; diff --git a/packages/datadirect/src/api/DataDirect/sectiontopicsget/Response.ts b/packages/datadirect/src/api/DataDirect/sectiontopicsget/Response.ts index 7e16efd..2dab560 100644 --- a/packages/datadirect/src/api/DataDirect/sectiontopicsget/Response.ts +++ b/packages/datadirect/src/api/DataDirect/sectiontopicsget/Response.ts @@ -1,3 +1,9 @@ +import { + DateString, + NumericBoolean, + NumericTimestamp +} from '@battis/descriptive-types'; + export type Item = { AllowCopy: boolean; AllowEdit: boolean; diff --git a/packages/datadirect/src/api/LtiTool/Edit/Payload.ts b/packages/datadirect/src/api/LtiTool/Edit/Payload.ts index d40400c..e9c7f4d 100644 --- a/packages/datadirect/src/api/LtiTool/Edit/Payload.ts +++ b/packages/datadirect/src/api/LtiTool/Edit/Payload.ts @@ -1,3 +1,5 @@ +import { NumericString, URLString } from '@battis/descriptive-types'; + // TODO LtiTool/Edit/Payload types export type Payload = { ToolTitle: string; diff --git a/packages/datadirect/src/api/LtiTool/ProviderList/Response.ts b/packages/datadirect/src/api/LtiTool/ProviderList/Response.ts index 62cee7e..72a2e3e 100644 --- a/packages/datadirect/src/api/LtiTool/ProviderList/Response.ts +++ b/packages/datadirect/src/api/LtiTool/ProviderList/Response.ts @@ -1,3 +1,5 @@ +import { DateTimeString, URLString } from '@battis/descriptive-types'; + export type Item = { ProviderId: number; GalleryId: number; diff --git a/packages/datadirect/src/api/assessment/AssessmentGetSpa/Response.ts b/packages/datadirect/src/api/assessment/AssessmentGetSpa/Response.ts index e6cc01d..222fb7c 100644 --- a/packages/datadirect/src/api/assessment/AssessmentGetSpa/Response.ts +++ b/packages/datadirect/src/api/assessment/AssessmentGetSpa/Response.ts @@ -1,3 +1,9 @@ +import { + DateTimeString, + HTMLString, + URLString +} from '@battis/descriptive-types'; + type MultipleChoiceAnswer = { AssessmentQuestionAnswerId: number; AssessmentQuestionId: number; diff --git a/packages/datadirect/src/api/gradebook/hydrategradebook/Response.ts b/packages/datadirect/src/api/gradebook/hydrategradebook/Response.ts index ac1d16b..bdaaed2 100644 --- a/packages/datadirect/src/api/gradebook/hydrategradebook/Response.ts +++ b/packages/datadirect/src/api/gradebook/hydrategradebook/Response.ts @@ -1,3 +1,10 @@ +import { + DateString, + DateTimeString, + EmailString, + NumericString +} from '@battis/descriptive-types'; + // TODO DataDirect/GradeBookMarkingPeriodList.DisplayOptions many probably inaccurate null properties export type DisplayOptions = { Orderby: string; diff --git a/packages/datadirect/src/api/schoolinfo/schoolparams/Response.ts b/packages/datadirect/src/api/schoolinfo/schoolparams/Response.ts index a74b757..622c10b 100644 --- a/packages/datadirect/src/api/schoolinfo/schoolparams/Response.ts +++ b/packages/datadirect/src/api/schoolinfo/schoolparams/Response.ts @@ -1,3 +1,11 @@ +import { + DateTimeString, + EmailString, + NumericBoolean, + NumericString, + URLString +} from '@battis/descriptive-types'; + export type Response = { SchoolId: number; SchoolName: string; diff --git a/packages/datadirect/src/api/topic/topicassignmentsget/Response.ts b/packages/datadirect/src/api/topic/topicassignmentsget/Response.ts index 2962ef2..ed5764b 100644 --- a/packages/datadirect/src/api/topic/topicassignmentsget/Response.ts +++ b/packages/datadirect/src/api/topic/topicassignmentsget/Response.ts @@ -1,3 +1,9 @@ +import { + DateTimeString, + HTMLString, + TimeString +} from '@battis/descriptive-types'; + export type Item = { AssignmentId: number; AssignmentTypeId: number; diff --git a/packages/datadirect/src/descriptiveTypes.d.ts b/packages/datadirect/src/descriptiveTypes.d.ts deleted file mode 100644 index cac37f6..0000000 --- a/packages/datadirect/src/descriptiveTypes.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -declare type NumericBoolean = 1 | 0; -declare type DateString = string; -declare type DateTimeString = string; -declare type NumericTimestamp = number; -declare type UUIDString = string; -declare type EmailString = string; -declare type NumericDuration = number; -declare type URLString = string; -declare type HTMLString = string; -declare type NumericString = string; -declare type TimeString = string;