Skip to content

Commit

Permalink
Merge pull request #75 from EscolaLMS/hotfix/bad-import-place
Browse files Browse the repository at this point in the history
badimport place
  • Loading branch information
mtmotyka authored Mar 18, 2022
2 parents b07f9cb + 9167251 commit cbb0cc5
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 47 deletions.
6 changes: 2 additions & 4 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import "@escolalms/ts-models";

declare module "@escolalms/sdk" {


}
declare module "@escolalms/sdk" {}
97 changes: 54 additions & 43 deletions src/types/api.ts
Original file line number Diff line number Diff line change
@@ -1,42 +1,41 @@
import '@escolalms/ts-models';
import { API } from '..';
import { API } from "..";

export enum TopicType {
Unselected = '',
RichText = 'EscolaLms\\TopicTypes\\Models\\TopicContent\\RichText',
OEmbed = 'EscolaLms\\TopicTypes\\Models\\TopicContent\\OEmbed',
Audio = 'EscolaLms\\TopicTypes\\Models\\TopicContent\\Audio',
Video = 'EscolaLms\\TopicTypes\\Models\\TopicContent\\Video',
H5P = 'EscolaLms\\TopicTypes\\Models\\TopicContent\\H5P',
Image = 'EscolaLms\\TopicTypes\\Models\\TopicContent\\Image',
Pdf = 'EscolaLms\\TopicTypes\\Models\\TopicContent\\PDF',
Scorm = 'EscolaLms\\TopicTypes\\Models\\TopicContent\\ScormSco',
Unselected = "",
RichText = "EscolaLms\\TopicTypes\\Models\\TopicContent\\RichText",
OEmbed = "EscolaLms\\TopicTypes\\Models\\TopicContent\\OEmbed",
Audio = "EscolaLms\\TopicTypes\\Models\\TopicContent\\Audio",
Video = "EscolaLms\\TopicTypes\\Models\\TopicContent\\Video",
H5P = "EscolaLms\\TopicTypes\\Models\\TopicContent\\H5P",
Image = "EscolaLms\\TopicTypes\\Models\\TopicContent\\Image",
Pdf = "EscolaLms\\TopicTypes\\Models\\TopicContent\\PDF",
Scorm = "EscolaLms\\TopicTypes\\Models\\TopicContent\\ScormSco",
}

export enum PaymentStatusType {
NEW = 'new',
PAID = 'paid',
NEW = "new",
PAID = "paid",
}

export type IEvent =
| 'http://adlnet.gov/expapi/verbs/experienced'
| 'http://adlnet.gov/expapi/verbs/attended'
| 'http://adlnet.gov/expapi/verbs/attempted'
| 'http://adlnet.gov/expapi/verbs/completed'
| 'http://adlnet.gov/expapi/verbs/passed'
| 'http://adlnet.gov/expapi/verbs/failed'
| 'http://adlnet.gov/expapi/verbs/answered'
| 'http://adlnet.gov/expapi/verbs/interacted'
| 'http://adlnet.gov/expapi/verbs/imported'
| 'http://adlnet.gov/expapi/verbs/created'
| 'http://adlnet.gov/expapi/verbs/shared'
| 'http://adlnet.gov/expapi/verbs/voided'
| 'http://activitystrea.ms/schema/1.0/consume'
| 'http://adlnet.gov/expapi/verbs/mastered';
| "http://adlnet.gov/expapi/verbs/experienced"
| "http://adlnet.gov/expapi/verbs/attended"
| "http://adlnet.gov/expapi/verbs/attempted"
| "http://adlnet.gov/expapi/verbs/completed"
| "http://adlnet.gov/expapi/verbs/passed"
| "http://adlnet.gov/expapi/verbs/failed"
| "http://adlnet.gov/expapi/verbs/answered"
| "http://adlnet.gov/expapi/verbs/interacted"
| "http://adlnet.gov/expapi/verbs/imported"
| "http://adlnet.gov/expapi/verbs/created"
| "http://adlnet.gov/expapi/verbs/shared"
| "http://adlnet.gov/expapi/verbs/voided"
| "http://activitystrea.ms/schema/1.0/consume"
| "http://adlnet.gov/expapi/verbs/mastered";

export type IStatementCategory = {
id: string;
objectType: 'string';
objectType: "string";
};

export type IScore = {
Expand Down Expand Up @@ -66,7 +65,10 @@ export type IStatement = {
verb: { id: IEvent };
};

export type IEventException = 'GuessTheAnswer' | 'Questionnaire' | 'QuestionSet';
export type IEventException =
| "GuessTheAnswer"
| "Questionnaire"
| "QuestionSet";

export type Category = {
id: number;
Expand Down Expand Up @@ -187,9 +189,13 @@ export type DefaultResponseError = {
};
};

export type DefaultResponse<Model> = DefaultResponseSuccess<Model> | DefaultResponseError;
export type DefaultResponse<Model> =
| DefaultResponseSuccess<Model>
| DefaultResponseError;

export type DataResponse<Model> = DataResponseSuccess<Model> | DefaultResponseError;
export type DataResponse<Model> =
| DataResponseSuccess<Model>
| DefaultResponseError;

type DefaultMetaResponse<Model> =
| (PaginatedMetaList<Model> & {
Expand Down Expand Up @@ -266,7 +272,7 @@ export type StationaryEventsList = DefaultMetaResponse<StationaryEvent>;

export type PaginationParams = {
order_by?: string;
order?: 'ASC' | 'DESC';
order?: "ASC" | "DESC";
page?: number;
per_page?: number;
};
Expand All @@ -292,7 +298,8 @@ export type ConsultationParams = PageParams &
base_price?: number;
};

export type WebinarParams = PageParams & PaginationParams & { name?: string; product?: Product };
export type WebinarParams = PageParams &
PaginationParams & { name?: string; product?: Product };

export type StationaryEventsParams = PageParams &
PaginationParams & {
Expand All @@ -308,7 +315,10 @@ export type LoginRequest = {
password: string;
};

export type LoginResponse = DefaultResponse<{ token: string; expires_at: string }>;
export type LoginResponse = DefaultResponse<{
token: string;
expires_at: string;
}>;

export type RegisterRequest = {
email: string;
Expand Down Expand Up @@ -593,16 +603,17 @@ export type AppCurrency = {
enum: string[];
};

export type StationaryEvent = EscolaLms.StationaryEvents.Models.StationaryEvent & {
date?: string;
title?: string;
};
export type StationaryEvent =
EscolaLms.StationaryEvents.Models.StationaryEvent & {
date?: string;
title?: string;
};

export type SCORM = {
id: number;
resource_type: null;
resource_id: number;
version: 'scorm_12' | 'scorm_2004';
version: "scorm_12" | "scorm_2004";
hash_name: string;
origin_file: string;
origin_file_mime: string;
Expand Down Expand Up @@ -677,7 +688,7 @@ export type Order = {
options: string;
created_at: string;
updated_at: string;
},
}
];
total: string;
subtotal: string;
Expand Down Expand Up @@ -728,8 +739,8 @@ export type UserGroupsParams = {
};

export enum EventTypes {
OrderPaid = 'EscolaLms\\Cart\\Events\\OrderPaid',
UserLogged = 'EscolaLms\\Auth\\Events\\UserLogged',
OrderPaid = "EscolaLms\\Cart\\Events\\OrderPaid",
UserLogged = "EscolaLms\\Auth\\Events\\UserLogged",
}

export type Notification = {
Expand Down Expand Up @@ -875,7 +886,7 @@ export type H5PObject = {
contentUserData: [
{
state: object;
},
}
];
}
>;
Expand Down

0 comments on commit cbb0cc5

Please sign in to comment.