@caido/sdk-backend 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caido/sdk-backend",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Typing for the Caido Backend SDK",
5
5
  "author": "Caido Labs Inc. <dev@caido.io>",
6
6
  "license": "MIT",
package/src/index.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- /// <reference path="types/typing.d.ts" />
2
- /// <reference path="types/common.d.ts" />
3
- /// <reference path="types/runtime.d.ts" />
1
+ export * from "caido:common";
2
+ export * from "./types/typing";
@@ -1,47 +1,43 @@
1
1
  import { MaybePromise, FindingsSDK, RequestsSDK } from "caido:common";
2
2
 
3
- declare module "@caido/sdk-backend" {
4
- export * from "caido:common";
5
-
3
+ /**
4
+ * The SDK for the API RPC service.
5
+ */
6
+ export type APISDK = {
6
7
  /**
7
- * The SDK for the API RPC service.
8
+ * Registers a new backend function for the RPC.
9
+ *
10
+ * @example
11
+ * sdk.api.register("multiply", (a: number, b: number) => {
12
+ * return a * b;
13
+ * });
8
14
  */
9
- export type APISDK = {
10
- /**
11
- * Registers a new backend function for the RPC.
12
- *
13
- * @example
14
- * sdk.api.register("multiply", (a: number, b: number) => {
15
- * return a * b;
16
- * });
17
- */
18
- register(
19
- name: string,
20
- callback: (...args: unknown[]) => MaybePromise<unknown>,
21
- ): void;
22
- };
15
+ register(
16
+ name: string,
17
+ callback: (...args: unknown[]) => MaybePromise<unknown>,
18
+ ): void;
19
+ };
23
20
 
21
+ /**
22
+ * The SDK object available to all scripts.
23
+ */
24
+ export type SDK = {
24
25
  /**
25
- * The SDK object available to all scripts.
26
+ * The console.
27
+ *
28
+ * This is currently the same as the global `console`.
29
+ */
30
+ console: Console;
31
+ /**
32
+ * The SDK for the Findings service.
33
+ */
34
+ findings: FindingsSDK;
35
+ /**
36
+ * The SDK for the Requests services
37
+ */
38
+ requests: RequestsSDK;
39
+ /**
40
+ * The SDK for the API RPC service.
26
41
  */
27
- export type SDK = {
28
- /**
29
- * The console.
30
- *
31
- * This is currently the same as the global `console`.
32
- */
33
- console: Console;
34
- /**
35
- * The SDK for the Findings service.
36
- */
37
- findings: FindingsSDK;
38
- /**
39
- * The SDK for the Requests services
40
- */
41
- requests: RequestsSDK;
42
- /**
43
- * The SDK for the API RPC service.
44
- */
45
- api: APISDK;
46
- };
47
- }
42
+ api: APISDK;
43
+ };