diff --git a/packages/misskey-js/package.json b/packages/misskey-js/package.json index f8c6c93b02..a0fd72e947 100644 --- a/packages/misskey-js/package.json +++ b/packages/misskey-js/package.json @@ -4,6 +4,7 @@ "description": "Misskey SDK for JavaScript", "main": "./built/index.js", "types": "./built/index.d.ts", + "type": "module", "scripts": { "build": "tsc", "dev": "tsc -w", diff --git a/packages/misskey-js/src/api.types.ts b/packages/misskey-js/src/api.types.ts index 458a999cfe..9f94f3d1cb 100644 --- a/packages/misskey-js/src/api.types.ts +++ b/packages/misskey-js/src/api.types.ts @@ -2,7 +2,7 @@ import type { Ad, Announcement, Antenna, App, AuthSession, Blocking, Channel, Clip, DateString, DetailedInstanceMetadata, DriveFile, DriveFolder, Following, FollowingFolloweePopulated, FollowingFollowerPopulated, FollowRequest, GalleryPost, Instance, LiteInstanceMetadata, MeDetailed, - Note, NoteFavorite, OriginType, Page, ServerInfo, Stats, User, UserDetailed, MeSignup, UserGroup, UserList, UserSorting, Notification, NoteReaction, Signin, MessagingMessage, + Note, NoteFavorite, OriginType, Page, ServerInfo, Stats, User, UserDetailed, MeSignup, UserList, UserSorting, Notification, NoteReaction, Signin, } from './entities.js'; type TODO = Record | null; diff --git a/packages/misskey-js/src/endpoints.ts b/packages/misskey-js/src/endpoints.ts index 1f208864ab..0f92176133 100644 --- a/packages/misskey-js/src/endpoints.ts +++ b/packages/misskey-js/src/endpoints.ts @@ -1,8 +1,8 @@ import type { JSONSchema7 } from 'schema-type'; -import { IEndpointMeta } from './endpoints.types'; -import { localUsernameSchema, passwordSchema } from './schemas/user'; +import { IEndpointMeta } from './endpoints.types.js'; +import { localUsernameSchema, passwordSchema } from './schemas/user.js'; import ms from 'ms'; -import { chartSchemaToJSONSchema } from './schemas'; +import { chartSchemaToJSONSchema } from './schemas.js'; import { chartsSchemas } from './schemas/charts.js'; export const endpoints = { diff --git a/packages/misskey-js/src/endpoints.types.ts b/packages/misskey-js/src/endpoints.types.ts index 38ecdd2e74..1553d94a42 100644 --- a/packages/misskey-js/src/endpoints.types.ts +++ b/packages/misskey-js/src/endpoints.types.ts @@ -1,6 +1,6 @@ import type { JSONSchema7, SchemaType } from 'schema-type'; -import type { References } from './schemas'; -import type { endpoints } from './endpoints'; +import type { References } from './schemas.js'; +import type { endpoints } from './endpoints.js'; import type { DeepOmit } from 'ts-essentials'; export type RolePolicies = { diff --git a/packages/misskey-js/src/entities.ts b/packages/misskey-js/src/entities.ts index 282955e870..568f0828cf 100644 --- a/packages/misskey-js/src/entities.ts +++ b/packages/misskey-js/src/entities.ts @@ -1,4 +1,4 @@ -import { Packed } from "./schemas"; +import { Packed } from "./schemas.js"; export type ID = Packed<'Id'>; export type DateString = string; @@ -175,3 +175,5 @@ export type UserSorting = | '+updatedAt' | '-updatedAt'; export type OriginType = 'combined' | 'local' | 'remote'; + +export type MeSignup = TODO; diff --git a/packages/misskey-js/src/schemas/charts.ts b/packages/misskey-js/src/schemas/charts.ts index 2e4e2aa51f..6c97721f3c 100644 --- a/packages/misskey-js/src/schemas/charts.ts +++ b/packages/misskey-js/src/schemas/charts.ts @@ -1,4 +1,4 @@ -import { ChartSchema } from "../schemas"; +import { ChartSchema } from "../schemas.js"; export const chartsSchemas = { 'activeUsers': { diff --git a/packages/misskey-js/src/schemas/notification.ts b/packages/misskey-js/src/schemas/notification.ts index 5af92b3e9e..7e8261fec4 100644 --- a/packages/misskey-js/src/schemas/notification.ts +++ b/packages/misskey-js/src/schemas/notification.ts @@ -1,5 +1,5 @@ import type { JSONSchema7Definition } from 'schema-type'; -import { ACHIEVEMENT_TYPES, notificationTypes } from '../consts'; +import { ACHIEVEMENT_TYPES, notificationTypes } from '../consts.js'; export const notificationTypeSchema = { $id: 'https://misskey-hub.net/api/schemas/NotificationTypes',