shogun-relay-sdk 1.2.10 → 1.2.11

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/dist/index.d.ts CHANGED
@@ -7,7 +7,9 @@ import { DealsModule } from "./modules/deals";
7
7
  import { RegistryModule } from "./modules/registry";
8
8
  import { UploadsModule } from "./modules/uploads";
9
9
  import { BridgeModule } from "./modules/bridge";
10
+ import { AnnasArchiveModule } from "./modules/annas-archive";
10
11
  export * from "./types";
12
+ export * from "./modules/annas-archive";
11
13
  export declare class ShogunRelaySDK {
12
14
  private client;
13
15
  system: SystemModule;
@@ -18,6 +20,7 @@ export declare class ShogunRelaySDK {
18
20
  registry: RegistryModule;
19
21
  uploads: UploadsModule;
20
22
  bridge: BridgeModule;
23
+ annasArchive: AnnasArchiveModule;
21
24
  constructor(config: ApiClientConfig);
22
25
  setToken(token: string): void;
23
26
  }
package/dist/index.js CHANGED
@@ -24,8 +24,10 @@ const deals_1 = require("./modules/deals");
24
24
  const registry_1 = require("./modules/registry");
25
25
  const uploads_1 = require("./modules/uploads");
26
26
  const bridge_1 = require("./modules/bridge");
27
+ const annas_archive_1 = require("./modules/annas-archive");
27
28
  // Export types
28
29
  __exportStar(require("./types"), exports);
30
+ __exportStar(require("./modules/annas-archive"), exports);
29
31
  class ShogunRelaySDK {
30
32
  constructor(config) {
31
33
  this.client = new client_1.ApiClient(config);
@@ -37,6 +39,7 @@ class ShogunRelaySDK {
37
39
  this.registry = new registry_1.RegistryModule(this.client);
38
40
  this.uploads = new uploads_1.UploadsModule(this.client);
39
41
  this.bridge = new bridge_1.BridgeModule(this.client);
42
+ this.annasArchive = new annas_archive_1.AnnasArchiveModule(this.client);
40
43
  }
41
44
  setToken(token) {
42
45
  this.client.setToken(token);
@@ -0,0 +1,35 @@
1
+ import { ApiClient } from "../client";
2
+ export interface AnnasArchiveStatus {
3
+ enabled: boolean;
4
+ activeTorrents: number;
5
+ downloadSpeed: number;
6
+ uploadSpeed: number;
7
+ ratio: number;
8
+ torrents: {
9
+ infoHash: string;
10
+ name: string;
11
+ progress: number;
12
+ downloadSpeed: number;
13
+ uploadSpeed: number;
14
+ peers: number;
15
+ }[];
16
+ }
17
+ export declare class AnnasArchiveModule {
18
+ private client;
19
+ constructor(client: ApiClient);
20
+ /**
21
+ * Get Anna's Archive integration status
22
+ */
23
+ getStatus(): Promise<{
24
+ success: boolean;
25
+ data: AnnasArchiveStatus;
26
+ }>;
27
+ /**
28
+ * Add a manual torrent
29
+ * @param magnet Magnet link or URL
30
+ */
31
+ addTorrent(magnet: string): Promise<{
32
+ success: boolean;
33
+ message: string;
34
+ }>;
35
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AnnasArchiveModule = void 0;
4
+ class AnnasArchiveModule {
5
+ constructor(client) {
6
+ this.client = client;
7
+ }
8
+ /**
9
+ * Get Anna's Archive integration status
10
+ */
11
+ async getStatus() {
12
+ return this.client.get("/api/v1/annas-archive/status");
13
+ }
14
+ /**
15
+ * Add a manual torrent
16
+ * @param magnet Magnet link or URL
17
+ */
18
+ async addTorrent(magnet) {
19
+ return this.client.post("/api/v1/annas-archive/add", { magnet });
20
+ }
21
+ }
22
+ exports.AnnasArchiveModule = AnnasArchiveModule;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shogun-relay-sdk",
3
- "version": "1.2.10",
3
+ "version": "1.2.11",
4
4
  "description": "SDK for interacting with Shogun Relay API - HTTP client for IPFS, deals, registry, and network operations",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",