artifacts-api-client 1.3.0 → 1.4.0

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.
@@ -1,5 +1,5 @@
1
1
  import { ArtifactsHttpClient } from '../http-client/artifacts.http-client';
2
- import { CreateCharacterApiBody, CreateCharacterApiResult, GetAllCharactersApiQuery, GetAllCharactersApiResult, GetCharacterApiResult } from './types/api-schema-bindings.types';
2
+ import { CreateCharacterApiBody, CreateCharacterApiResult, DeleteCharacterApiBody, DeleteCharacterApiResult, GetAllCharactersApiQuery, GetAllCharactersApiResult, GetCharacterApiResult } from './types/api-schema-bindings.types';
3
3
  export declare class ArtifactsCharactersApi {
4
4
  private readonly httpClient;
5
5
  constructor(httpClient: ArtifactsHttpClient);
@@ -9,4 +9,6 @@ export declare class ArtifactsCharactersApi {
9
9
  getAll(params?: GetAllCharactersApiQuery): Promise<GetAllCharactersApiResult>;
10
10
  /** Fetch characters details. */
11
11
  get(name: string): Promise<GetCharacterApiResult>;
12
+ /** Delete character on your account. */
13
+ delete(body: DeleteCharacterApiBody): Promise<DeleteCharacterApiResult>;
12
14
  }
@@ -23,5 +23,12 @@ class ArtifactsCharactersApi {
23
23
  get(name) {
24
24
  return this.httpClient.get(`/characters/${name}`);
25
25
  }
26
+ /** Delete character on your account. */
27
+ delete(body) {
28
+ return this.httpClient.post('/characters/delete', {
29
+ body,
30
+ isSecure: true,
31
+ });
32
+ }
26
33
  }
27
34
  exports.ArtifactsCharactersApi = ArtifactsCharactersApi;
@@ -62,3 +62,5 @@ export type GetAllResourcesApiQuery = paths['/resources/']['get']['parameters'][
62
62
  export type GetAllResourcesApiResult = paths['/resources/']['get']['responses'][200]['content']['application/json'];
63
63
  export type GetResourceApiResult = paths['/resources/{code}']['get']['responses'][200]['content']['application/json'];
64
64
  export type GenerateTokenResult = paths['/token/']['post']['responses'][200]['content']['application/json'];
65
+ export type DeleteCharacterApiBody = paths['/characters/delete']['post']['requestBody']['content']['application/json'];
66
+ export type DeleteCharacterApiResult = paths['/characters/delete']['post']['responses'][200]['content']['application/json'];
@@ -463,6 +463,26 @@ export interface paths {
463
463
  patch?: never;
464
464
  trace?: never;
465
465
  };
466
+ '/characters/delete': {
467
+ parameters: {
468
+ query?: never;
469
+ header?: never;
470
+ path?: never;
471
+ cookie?: never;
472
+ };
473
+ get?: never;
474
+ put?: never;
475
+ /**
476
+ * Delete Character
477
+ * @description Delete character on your account.
478
+ */
479
+ post: operations['delete_character_characters_delete_post'];
480
+ delete?: never;
481
+ options?: never;
482
+ head?: never;
483
+ patch?: never;
484
+ trace?: never;
485
+ };
466
486
  '/characters/': {
467
487
  parameters: {
468
488
  query?: never;
@@ -938,7 +958,7 @@ export interface components {
938
958
  /** @description Cooldown details */
939
959
  cooldown: components['schemas']['CooldownSchema'];
940
960
  /** @description Destination details. */
941
- destination: components['schemas']['DestinationResponseSchema'];
961
+ destination: components['schemas']['MapSchema'];
942
962
  /** @description Character details. */
943
963
  character: components['schemas']['CharacterSchema'];
944
964
  };
@@ -1494,6 +1514,14 @@ export interface components {
1494
1514
  /** Pages */
1495
1515
  pages?: number | null;
1496
1516
  };
1517
+ /** DeleteCharacterSchema */
1518
+ DeleteCharacterSchema: {
1519
+ /**
1520
+ * Name
1521
+ * @description Character name.
1522
+ */
1523
+ name: string;
1524
+ };
1497
1525
  /** DeleteItemResponseSchema */
1498
1526
  DeleteItemResponseSchema: {
1499
1527
  data: components['schemas']['DeleteItemSchema'];
@@ -1515,29 +1543,6 @@ export interface components {
1515
1543
  */
1516
1544
  quantity: number;
1517
1545
  };
1518
- /** DestinationResponseSchema */
1519
- DestinationResponseSchema: {
1520
- /**
1521
- * Name
1522
- * @description The name of the destination.
1523
- */
1524
- name: string;
1525
- /**
1526
- * X
1527
- * @description The x coordinate of the destination.
1528
- */
1529
- x: number;
1530
- /**
1531
- * Y
1532
- * @description The y coordinate of the destination.
1533
- */
1534
- y: number;
1535
- /**
1536
- * Content
1537
- * @description Content of the destination.
1538
- */
1539
- content: unknown;
1540
- };
1541
1546
  /** DestinationSchema */
1542
1547
  DestinationSchema: {
1543
1548
  /**
@@ -3645,6 +3650,37 @@ export interface operations {
3645
3650
  };
3646
3651
  };
3647
3652
  };
3653
+ delete_character_characters_delete_post: {
3654
+ parameters: {
3655
+ query?: never;
3656
+ header?: never;
3657
+ path?: never;
3658
+ cookie?: never;
3659
+ };
3660
+ requestBody: {
3661
+ content: {
3662
+ 'application/json': components['schemas']['DeleteCharacterSchema'];
3663
+ };
3664
+ };
3665
+ responses: {
3666
+ /** @description Successfully deleted character. */
3667
+ 200: {
3668
+ headers: {
3669
+ [name: string]: unknown;
3670
+ };
3671
+ content: {
3672
+ 'application/json': components['schemas']['CharacterResponseSchema'];
3673
+ };
3674
+ };
3675
+ /** @description Character not found. */
3676
+ 498: {
3677
+ headers: {
3678
+ [name: string]: unknown;
3679
+ };
3680
+ content?: never;
3681
+ };
3682
+ };
3683
+ };
3648
3684
  get_all_characters_characters__get: {
3649
3685
  parameters: {
3650
3686
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "artifacts-api-client",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "Api client for https://artifactsmmo.com",
5
5
  "main": "dist/index.js",
6
6
  "repository": "https://github.com/siranweb/artifacts-api-client.git",