Skip to content

Commit

Permalink
refactor: externalize @battis/descriptive-types
Browse files Browse the repository at this point in the history
  • Loading branch information
Seth Battis committed Dec 31, 2024
1 parent e66ac2e commit 7af327f
Show file tree
Hide file tree
Showing 33 changed files with 146 additions and 11 deletions.
1 change: 1 addition & 0 deletions packages/datadirect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { NumericString } from '@battis/descriptive-types';

type DropDownItem = {
Value: number;
Display: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import {
DateTimeString,
HTMLString,
NumericString
} from '@battis/descriptive-types';

type Assignment = {
AssignmentId: number;
AssignmentIndexId: number;
Expand Down
9 changes: 9 additions & 0 deletions packages/datadirect/src/api/Assignment2/SecureGet/Response.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
import {
DateString,
DateTimeString,
HTMLString,
NumericBoolean,
TimeString,
URLString
} from '@battis/descriptive-types';

type Duration = {
DurationId: number;
SortOrder: number;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import {
DateTimeString,
HTMLString,
URLString
} from '@battis/descriptive-types';

type LinkItem = {
Url: URLString;
ShortDescription: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { NumericBoolean } from '@battis/descriptive-types';

export type Item = {
MarkingPeriodId: number;
MarkingPeriodDescription: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { DateTimeString, HTMLString } from '@battis/descriptive-types';

export type Item = {
assignment_id: number;
assignment_index_id: number;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import {
DateString,
NumericBoolean,
NumericTimestamp
} from '@battis/descriptive-types';

export type Item = {
AssociationId: number;
Block: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import {
DateString,
DateTimeString,
HTMLString
} from '@battis/descriptive-types';

export type Announcement = {
Name: string;
Author: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { DateTimeString, TimeString } from '@battis/descriptive-types';

export type Assignment = {
AssignmentId: number;
AssignmentTypeId: number;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import {
DateTimeString,
HTMLString,
NumericTimestamp
} from '@battis/descriptive-types';

export type Message = {
MessageId: number;
UserId: number;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
import {
DateString,
DateTimeString,
HTMLString,
URLString
} from '@battis/descriptive-types';

export type Download = {
DownloadID: number;
ItemID: number;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
import {
DateString,
DateTimeString,
EmailString,
HTMLString,
NumericString,
TimeString
} from '@battis/descriptive-types';

export type Event = {
Id: number;
StartDate: DateTimeString;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
import {
DateString,
DateTimeString,
HTMLString,
URLString
} from '@battis/descriptive-types';

export type Link = {
Url: URLString;
ShortDescription: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
import {
DateString,
DateTimeString,
HTMLString,
NumericString,
URLString
} from '@battis/descriptive-types';

export type Media = {
AlbumId: number;
AlbumName: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import {
DateString,
DateTimeString,
URLString
} from '@battis/descriptive-types';

export type Group = {
GroupId: number;
AssociationId: number;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { DateString } from "@battis/descriptive-types";

export type Payload = {
id?: number; // Assignment
leadSectionId?: number; // Assignment
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { URLString } from '@battis/descriptive-types';

export type Content = {
ContextLabelId: number;
ContextValue: number;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
import {
DateString,
DateTimeString,
HTMLString,
NumericBoolean,
URLString
} from '@battis/descriptive-types';

export type Container = {
ContentId: number;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { DateTimeString, HTMLString } from '@battis/descriptive-types';

export type Text = {
Description: string;
LongText: HTMLString;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { HTMLString } from '@battis/descriptive-types';

export type Widget = {
WidgetId: number;
ShortDescription: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { EmailString, NumericString } from '@battis/descriptive-types';

export type Item = {
Id: number;
name: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import {
DateString,
NumericBoolean,
NumericTimestamp
} from '@battis/descriptive-types';

export type Item = {
AllowCopy: boolean;
AllowEdit: boolean;
Expand Down
2 changes: 2 additions & 0 deletions packages/datadirect/src/api/LtiTool/Edit/Payload.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { NumericString, URLString } from '@battis/descriptive-types';

// TODO LtiTool/Edit/Payload types
export type Payload = {
ToolTitle: string;
Expand Down
2 changes: 2 additions & 0 deletions packages/datadirect/src/api/LtiTool/ProviderList/Response.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { DateTimeString, URLString } from '@battis/descriptive-types';

export type Item = {
ProviderId: number;
GalleryId: number;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import {
DateTimeString,
HTMLString,
URLString
} from '@battis/descriptive-types';

type MultipleChoiceAnswer = {
AssessmentQuestionAnswerId: number;
AssessmentQuestionId: number;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
import {
DateTimeString,
EmailString,
NumericBoolean,
NumericString,
URLString
} from '@battis/descriptive-types';

export type Response = {
SchoolId: number;
SchoolName: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import {
DateTimeString,
HTMLString,
TimeString
} from '@battis/descriptive-types';

export type Item = {
AssignmentId: number;
AssignmentTypeId: number;
Expand Down
11 changes: 0 additions & 11 deletions packages/datadirect/src/descriptiveTypes.d.ts

This file was deleted.

0 comments on commit 7af327f

Please sign in to comment.