Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

revolt-api

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

revolt-api - npm Package Compare versions

Comparing version 0.5.2-alpha.1 to 0.5.2-alpha.2

2

package.json
{
"name": "revolt-api",
"version": "0.5.2-alpha.1",
"version": "0.5.2-alpha.2",
"description": "Revolt API typings",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -19,2 +19,10 @@ import { OpenAPIV3 } from "openapi-types";

export async function noContent(description: string): Promise<{ responses: OpenAPIV3.ResponsesObject }> {
const response: OpenAPIV3.ResponseObject = {
description
};
return { responses: { "204": response } };
}
export async function body(description: string, json: Promise<OpenAPIV3.MediaTypeObject> | OpenAPIV3.MediaTypeObject | OpenAPIV3.ReferenceObject): Promise<{ requestBody: OpenAPIV3.RequestBodyObject }> {

@@ -21,0 +29,0 @@ return {

@@ -1,2 +0,2 @@

import { body, parameter, ref, success } from "../openapi/generators.js";
import { body, noContent, parameter, ref, success } from "../openapi/generators.js";
import { group, resource, routeAuthenticated, tag } from "../openapi/paths.js";

@@ -103,3 +103,3 @@ import { schema } from "../typescript.js";

`),
...await success("Succesfully changed bot object.")
...await noContent("Succesfully changed bot object.")
}

@@ -112,3 +112,3 @@ ),

...botParams,
...await success("Deleted bot.")
...await noContent("Deleted bot.")
}

@@ -150,3 +150,3 @@ )

`),
...await success("Added bot to server / group.")
...await noContent("Added bot to server / group.")
}

@@ -153,0 +153,0 @@ )

@@ -1,2 +0,2 @@

import { body, parameter, ref, success } from "../openapi/generators.js";
import { body, noContent, parameter, ref, success } from "../openapi/generators.js";
import { group, resource, routeAuthenticated, tag } from "../openapi/paths.js";

@@ -55,2 +55,7 @@ import { schema } from "../typescript.js";

/**
* Whether this channel is not safe for work
*/
nsfw?: boolean;
/**
* Field to remove from channel object

@@ -61,3 +66,3 @@ */

`),
...await success("Succesfully changed channel object.")
...await noContent("Succesfully changed channel object.")
}

@@ -70,3 +75,3 @@ ),

...channelParams,
...await success("Deleted Channel")
...await noContent("Deleted Channel")
}

@@ -122,3 +127,3 @@ )

...channelPermissions,
...await success("Successfully updated permissions.")
...await noContent("Successfully updated permissions.")
}

@@ -135,3 +140,3 @@ )

...channelPermissions,
...await success("Successfully updated permissions.")
...await noContent("Successfully updated permissions.")
}

@@ -201,3 +206,3 @@ )

mention: boolean;
}
}[]
}

@@ -290,3 +295,3 @@ `),

`),
...await success("Message was changed.")
...await noContent("Message was changed.")
}

@@ -299,3 +304,3 @@ ),

...messageParams,
...await success("Message was deleted.")
...await noContent("Message was deleted.")
}

@@ -402,3 +407,3 @@ )

...messageParams,
...await success("Acknowledged message.")
...await noContent("Acknowledged message.")
}

@@ -445,2 +450,7 @@ )

users?: string[];
/**
* Whether this group is not safe for work
*/
nsfw?: boolean;
}

@@ -470,3 +480,3 @@ `),

...messageParams,
...await success("User was added to the group.")
...await noContent("User was added to the group.")
}

@@ -479,3 +489,3 @@ ),

...messageParams,
...await success("User was removed from the group.")
...await noContent("User was removed from the group.")
}

@@ -482,0 +492,0 @@ )

import { group, resource, route, routeAuthenticated, tag } from "../openapi/paths.js";
import { body, ref, success } from "../openapi/generators.js";
import { body, noContent, ref, success } from "../openapi/generators.js";
import { schema } from "../typescript.js";

@@ -50,5 +50,5 @@

`),
...await success("Successfully set username")
...await noContent("Successfully set username")
}
)
});

@@ -1,2 +0,2 @@

import { body, parameter, ref, success } from "../openapi/generators.js";
import { body, noContent, parameter, ref, success } from "../openapi/generators.js";
import { group, resource, route, routeAuthenticated, tag } from "../openapi/paths.js";

@@ -47,3 +47,3 @@ import { schema } from "../typescript.js";

...inviteParams,
...await success("Deleted invite.")
...await noContent("Deleted invite.")
}

@@ -97,3 +97,3 @@ ),

`),
...await success("Successfully synced data.")
...await noContent("Successfully synced data.")
}

@@ -107,3 +107,9 @@ )

"Fetch information about unread state on channels.",
await success("Unreads Data", ref("ChannelUnread"))
await success(
"Array of Unreads Data",
schema`
import type { ChannelUnread } from "./Sync";
type ${'FetchUnreads'} = ChannelUnread[];
`
)
)

@@ -122,3 +128,3 @@ });

...await body("Web Push Subscription", ref("WebPushSubscription")),
...await success("Subscribed successfully.")
...await noContent("Subscribed successfully.")
}

@@ -132,5 +138,5 @@ )

"Remove the Web Push subscription associated with the current session.",
await success("Unsubscribed successfully.")
await noContent("Unsubscribed successfully.")
)
});
//#endregion
//#endregion

@@ -1,2 +0,2 @@

import { body, parameter, ref, success } from "../openapi/generators.js";
import { body, noContent, parameter, ref, success } from "../openapi/generators.js";
import { group, resource, route, routeAuthenticated, tag } from "../openapi/paths.js";

@@ -67,2 +67,7 @@ import { schema } from "../typescript.js";

/**
* Whether this server is not safe for work
*/
nsfw?: boolean;
/**
* Field to remove from channel object

@@ -73,3 +78,3 @@ */

`),
...await success("Succesfully changed channel object.")
...await noContent("Succesfully changed channel object.")
}

@@ -82,3 +87,3 @@ ),

...serverParams,
...await success("Deleted Server")
...await noContent("Deleted Server")
}

@@ -98,3 +103,3 @@ )

/**
* Group name
* Server name
* @minLength 1

@@ -106,3 +111,3 @@ * @maxLength 32

/**
* Group description
* Server description
* @minLength 0

@@ -113,2 +118,7 @@ * @maxLength 1024

/**
* Whether this server is not safe for work
*/
nsfw?: boolean;
nonce: Nonce;

@@ -151,2 +161,7 @@ }

/**
* Whether this channel is not safe for work
*/
nsfw?: boolean;
nonce: Nonce;

@@ -196,3 +211,3 @@ }

...serverParams,
...await success("Marked as read.")
...await noContent("Marked as read.")
}

@@ -254,3 +269,3 @@ ),

`),
...await success("Succesfully changed member object.")
...await noContent("Succesfully changed member object.")
}

@@ -261,3 +276,3 @@ ),

"Removes a member from the server.",
await success("Removed Member")
await noContent("Removed Member")
)

@@ -304,3 +319,3 @@ });

`),
...await success("Banned user.")
...await noContent("Banned user.")
}

@@ -313,3 +328,3 @@ ),

...memberParams,
...await success("Unbanned user.")
...await noContent("Unbanned user.")
}

@@ -388,3 +403,3 @@ )

...serverPermissions,
...await success("Successfully updated permissions.")
...await noContent("Successfully updated permissions.")
}

@@ -401,3 +416,3 @@ )

...serverPermissions,
...await success("Successfully updated permissions.")
...await noContent("Successfully updated permissions.")
}

@@ -456,3 +471,3 @@ )

`),
...await success("Succesfully changed role object.")
...await noContent("Succesfully changed role object.")
}

@@ -465,3 +480,3 @@ ),

...roleParams,
...await success("Successfully deleted role.")
...await noContent("Successfully deleted role.")
}

@@ -468,0 +483,0 @@ )

@@ -1,2 +0,2 @@

import { body, parameter, ref, success } from "../openapi/generators.js";
import { body, noContent, parameter, ref, success } from "../openapi/generators.js";
import { group, resource, route, routeAuthenticated, tag } from "../openapi/paths.js";

@@ -63,3 +63,3 @@ import { schema } from "../typescript.js";

`),
...await success("Succesfully changed user object.")
...await noContent("Succesfully changed user object.")
}

@@ -92,3 +92,3 @@ )

`),
...await success("Succesfully changed user object.")
...await noContent("Succesfully changed user object.")
}

@@ -95,0 +95,0 @@ )

@@ -61,3 +61,3 @@ import type { Attachment } from "./Autumn"

last_message: LastMessage
last_message?: LastMessage
}

@@ -93,3 +93,3 @@

last_message: LastMessage,
last_message?: LastMessage,

@@ -105,2 +105,7 @@ /**

permissions?: number
/**
* Whether this channel is marked as not safe for work
*/
nsfw?: boolean
}

@@ -127,3 +132,3 @@

*/
description: string
description?: string

@@ -143,2 +148,7 @@ icon?: Attachment

}
/**
* Whether this channel is marked as not safe for work
*/
nsfw?: boolean
}

@@ -149,3 +159,3 @@

last_message: string
last_message?: string
}

@@ -152,0 +162,0 @@

@@ -62,3 +62,3 @@ /**

color?: string
colour?: string
} | ({

@@ -65,0 +65,0 @@ type: 'Image'

@@ -141,2 +141,4 @@ import type { Attachment } from './Autumn';

* Default permissions for all members
*
* This is a tuple consisting of server and channel permissions in that order.
*/

@@ -154,2 +156,7 @@ default_permissions: PermissionTuple

banner?: Attachment
/**
* Whether this server is marked as not safe for work
*/
nsfw?: boolean
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc