From ed75d007cd3c8ab9a4e9fa831e09b1664edbac02 Mon Sep 17 00:00:00 2001 From: Paul Makles Date: Sun, 17 Apr 2022 11:07:33 +0100 Subject: [PATCH] chore: bump version --- OpenAPI.json | 20 ++++++-------------- package.json | 4 ++-- src/index.ts | 2 +- src/schema.ts | 22 ++++++++++++++-------- src/types.ts | 3 +-- yarn.lock | 8 ++++---- 6 files changed, 28 insertions(+), 31 deletions(-) diff --git a/OpenAPI.json b/OpenAPI.json index 5c5039b..04a58bf 100644 --- a/OpenAPI.json +++ b/OpenAPI.json @@ -363,7 +363,7 @@ "Direct Messaging" ], "summary": "Open Direct Message", - "description": "Open a DM with another user.", + "description": "Open a DM with another user.\n\nIf the target is oneself, a saved messages channel is returned.", "operationId": "open_dm_req", "parameters": [ { @@ -5922,7 +5922,7 @@ "description": "Time at which this message was last edited", "allOf": [ { - "$ref": "#/components/schemas/DateTimeContainer" + "$ref": "#/components/schemas/ISO8601 Timestamp" } ], "nullable": true @@ -6176,18 +6176,10 @@ } ] }, - "DateTimeContainer": { - "description": "Container so we can apply this within Option<>s.", - "allOf": [ - { - "$ref": "#/components/schemas/DateTime" - } - ] - }, - "DateTime": { - "description": "Local definition of DateTime from Bson", - "type": "integer", - "format": "int64" + "ISO8601 Timestamp": { + "description": "ISO8601 formatted timestamp", + "type": "string", + "example": "1970-01-01T00:00:00Z" }, "Embed": { "oneOf": [ diff --git a/package.json b/package.json index 4bc64e8..748920b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "revolt-api", - "version": "0.5.3-rc.10", + "version": "0.5.3-rc.11", "description": "Revolt API Library", "main": "dist/index.js", "homepage": "https://developers.revolt.chat", @@ -18,7 +18,7 @@ "typescript": "^4.6.2" }, "dependencies": { - "@insertish/oapi": "0.1.13", + "@insertish/oapi": "0.1.14", "axios": "^0.26.1", "lodash.defaultsdeep": "^4.6.1" }, diff --git a/src/index.ts b/src/index.ts index a58a990..ff0814c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -185,7 +185,7 @@ export class API { } /** - * Send HTTP GET request. + * Send HTTP PATCH request. * @param path Path * @param params Body or Query Parameters * @param config Axios configuration diff --git a/src/schema.ts b/src/schema.ts index 5d43b18..0361766 100644 --- a/src/schema.ts +++ b/src/schema.ts @@ -39,7 +39,11 @@ export interface paths { get: operations["fetch_dms_req"]; }; "/users/{target}/dm": { - /** Open a DM with another user. */ + /** + * Open a DM with another user. + * + * If the target is oneself, a saved messages channel is returned. + */ get: operations["open_dm_req"]; }; "/users/{target}/mutual": { @@ -1028,7 +1032,7 @@ export interface components { /** @description Array of attachments */ attachments?: components["schemas"]["File"][] | null; /** @description Time at which this message was last edited */ - edited?: components["schemas"]["DateTimeContainer"] | null; + edited?: components["schemas"]["ISO8601 Timestamp"] | null; /** @description Attached embeds to this message */ embeds?: components["schemas"]["Embed"][] | null; /** @description Array of user ids mentioned in this message */ @@ -1095,13 +1099,11 @@ export interface components { type: "channel_icon_changed"; by: string; }; - /** @description Container so we can apply this within Option<>s. */ - DateTimeContainer: components["schemas"]["DateTime"]; /** - * Format: int64 - * @description Local definition of DateTime from Bson + * @description ISO8601 formatted timestamp + * @example 1970-01-01T00:00:00Z */ - DateTime: number; + "ISO8601 Timestamp": string; Embed: | { /** @enum {string} */ @@ -1956,7 +1958,11 @@ export interface operations { }; }; }; - /** Open a DM with another user. */ + /** + * Open a DM with another user. + * + * If the target is oneself, a saved messages channel is returned. + */ open_dm_req: { parameters: { path: { diff --git a/src/types.ts b/src/types.ts index 0f92f18..de5dcc1 100644 --- a/src/types.ts +++ b/src/types.ts @@ -39,8 +39,7 @@ export type Invite = components['schemas']['Invite']; export type Message = components['schemas']['Message']; export type Content = components['schemas']['Content']; export type SystemMessage = components['schemas']['SystemMessage']; -export type DateTimeContainer = components['schemas']['DateTimeContainer']; -export type DateTime = components['schemas']['DateTime']; +export type ISO8601_Timestamp = components['schemas']['ISO8601 Timestamp']; export type Embed = components['schemas']['Embed']; export type Special = components['schemas']['Special']; export type TwitchType = components['schemas']['TwitchType']; diff --git a/yarn.lock b/yarn.lock index 0b8907f..4593aa6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@insertish/oapi@0.1.13": - version "0.1.13" - resolved "https://registry.yarnpkg.com/@insertish/oapi/-/oapi-0.1.13.tgz#92579172bd6896152e9b68ef5bafcf8cc2048492" - integrity sha512-yj1Jk3VlNCjp0hNOsknevyR7PwVzSzc5pbUTuyhtyPlbuHRTv1b9DWs8Ki7xbF/mrIy2DzkHoUu4Ik/Q4oS93w== +"@insertish/oapi@0.1.14": + version "0.1.14" + resolved "https://registry.yarnpkg.com/@insertish/oapi/-/oapi-0.1.14.tgz#0eb78530990a03bd8f3bbb7e9f4ee598b5cd5d6f" + integrity sha512-9GW6tCo/aEG8VG4ICX1s+lN0bmJibEHuEn8Ij58N9VbbJpsQl0sWzCLJVIKHOK4UxKY/25fb08CoMqqgUTDfow== dependencies: typescript "^4.6.2" optionalDependencies: