From 0040aca8416f247daf4de7c113c96c7e80bf6c4f Mon Sep 17 00:00:00 2001 From: tamaina Date: Thu, 4 May 2023 10:57:55 +0000 Subject: [PATCH] fix --- packages/misskey-js/src/schemas.ts | 4 ++-- packages/misskey-js/src/schemas/antenna.ts | 2 +- packages/misskey-js/src/schemas/note.ts | 28 +++++++++++----------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/packages/misskey-js/src/schemas.ts b/packages/misskey-js/src/schemas.ts index b0ebc289b..0142e24bf 100644 --- a/packages/misskey-js/src/schemas.ts +++ b/packages/misskey-js/src/schemas.ts @@ -73,9 +73,9 @@ export type References = [ ...UnionToArray ]; -export type Packed> = GetDef; +export type Packed> = GetDef; export type Def> = GetDef; export type PackedNote = Packed<'Note'>; -export type DefNote = Def<'https://misskey-dev.net/api/'>; +export type DefNote = Def<'https://misskey-hub.net/api/schemas/Note'>; let renote: PackedNote['reply']; diff --git a/packages/misskey-js/src/schemas/antenna.ts b/packages/misskey-js/src/schemas/antenna.ts index dd5e314ae..63fec7e00 100644 --- a/packages/misskey-js/src/schemas/antenna.ts +++ b/packages/misskey-js/src/schemas/antenna.ts @@ -5,7 +5,7 @@ export const packedAntennaSchema = { type: 'object', properties: { - id: { $ref: '/schemas/Id' }, + id: { $ref: 'https://misskey-hub.net/api/schemas/Id' }, createdAt: { type: 'string', format: 'date-time', diff --git a/packages/misskey-js/src/schemas/note.ts b/packages/misskey-js/src/schemas/note.ts index 44574c26d..dd8621a34 100644 --- a/packages/misskey-js/src/schemas/note.ts +++ b/packages/misskey-js/src/schemas/note.ts @@ -1,11 +1,11 @@ import type { JSONSchema7 } from 'schema-type'; export const packedNoteSchema = { - $id: 'https://misskey-hub.net/api/schemas/schemas/Note', + $id: 'https://misskey-hub.net/api/schemas/Note', type: 'object', properties: { - id: { $ref: 'https://misskey-hub.net/api/schemas/schemas/Id' }, + id: { $ref: 'https://misskey-hub.net/api/schemas/Id' }, createdAt: { type: 'string', format: 'date-time', @@ -23,22 +23,22 @@ export const packedNoteSchema = { oneOf: [{ type: 'string' }, { type: 'null' }], }, userId: { - $ref: 'https://misskey-hub.net/api/schemas/schemas/Id', + $ref: 'https://misskey-hub.net/api/schemas/Id', }, user: { - $ref: 'https://misskey-hub.net/api/schemas/schemas/UserLite', + $ref: 'https://misskey-hub.net/api/schemas/UserLite', }, replyId: { - oneOf: [{ $ref: 'https://misskey-hub.net/api/schemas/schemas/Id' }, { type: 'null' }], + oneOf: [{ $ref: 'https://misskey-hub.net/api/schemas/Id' }, { type: 'null' }], }, renoteId: { - oneOf: [{ $ref: 'https://misskey-hub.net/api/schemas/schemas/Id' }, { type: 'null' }], + oneOf: [{ $ref: 'https://misskey-hub.net/api/schemas/Id' }, { type: 'null' }], }, reply: { - oneOf: [{ $ref: 'https://misskey-hub.net/api/schemas/schemas/Note' }, { type: 'null' }], + oneOf: [{ $ref: 'https://misskey-hub.net/api/schemas/Note' }, { type: 'null' }], }, renote: { - oneOf: [{ $ref: 'https://misskey-hub.net/api/schemas/schemas/Note' }, { type: 'null' }], + oneOf: [{ $ref: 'https://misskey-hub.net/api/schemas/Note' }, { type: 'null' }], }, isHidden: { type: 'boolean', @@ -48,29 +48,29 @@ export const packedNoteSchema = { }, mentions: { type: 'array', - items: { $ref: 'https://misskey-hub.net/api/schemas/schemas/Id' }, + items: { $ref: 'https://misskey-hub.net/api/schemas/Id' }, }, visibleUserIds: { type: 'array', - items: { $ref: 'https://misskey-hub.net/api/schemas/schemas/Id' }, + items: { $ref: 'https://misskey-hub.net/api/schemas/Id' }, }, fileIds: { type: 'array', - items: { $ref: 'https://misskey-hub.net/api/schemas/schemas/Id' }, + items: { $ref: 'https://misskey-hub.net/api/schemas/Id' }, }, files: { type: 'array', - items: { $ref: 'https://misskey-hub.net/api/schemas/schemas/DriveFile' }, + items: { $ref: 'https://misskey-hub.net/api/schemas/DriveFile' }, }, tags: { type: 'array', items: { type: 'string' }, }, poll: { - oneOf: [{ $ref: 'https://misskey-hub.net/api/schemas/schemas/Poll' }, { type: 'null' }], + oneOf: [{ $ref: 'https://misskey-hub.net/api/schemas/Poll' }, { type: 'null' }], }, channelId: { - oneOf: [{ $ref: 'https://misskey-hub.net/api/schemas/schemas/Id' }, { type: 'null' }], + oneOf: [{ $ref: 'https://misskey-hub.net/api/schemas/Id' }, { type: 'null' }], }, channel: { oneOf: [{