@swishapp/api-client 0.5.0 → 0.5.2

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,41 +7,42 @@ export declare class SwishClient {
7
7
  private readonly options;
8
8
  constructor(options: SwishClientOptions);
9
9
  readonly items: {
10
- list: (query?: ItemControllerFindData["query"]) => Promise<(import("./client").PaginatedResponse & {
11
- data?: Array<import("./client").Item>;
10
+ list: (query?: ItemControllerFindData["query"]) => Promise<(import(".").PaginatedResponse & {
11
+ data?: Array<import(".").Item>;
12
12
  }) | undefined>;
13
- create: (items: CreateItemInput) => Promise<(import("./client").Response & {
14
- data?: import("./client").Item;
13
+ create: (items: CreateItemInput) => Promise<(import(".").Response & {
14
+ data?: import(".").Item;
15
15
  }) | undefined>;
16
16
  delete: (items: DeleteItemsInput["items"]) => Promise<void | undefined>;
17
17
  deleteById: (itemId: string) => Promise<void | undefined>;
18
- updateById: (itemId: string, body: UpdateItemInput) => Promise<(import("./client").Response & {
19
- data?: import("./client").Item;
18
+ updateById: (itemId: string, body: UpdateItemInput) => Promise<(import(".").Response & {
19
+ data?: import(".").Item;
20
20
  }) | undefined>;
21
21
  };
22
22
  readonly lists: {
23
- list: (query?: ListControllerFindData["query"]) => Promise<(import("./client").PaginatedResponse & {
24
- data?: Array<import("./client").List>;
23
+ list: (query?: ListControllerFindData["query"]) => Promise<(import(".").PaginatedResponse & {
24
+ data?: Array<import(".").List>;
25
25
  }) | undefined>;
26
- findById: (listId: string) => Promise<(import("./client").Response & {
27
- data?: import("./client").List;
26
+ findById: (listId: string) => Promise<(import(".").Response & {
27
+ data?: import(".").List;
28
28
  }) | undefined>;
29
- create: (list: CreateListInput) => Promise<(import("./client").Response & {
30
- data?: import("./client").List;
29
+ create: (list: CreateListInput) => Promise<(import(".").Response & {
30
+ data?: import(".").List;
31
31
  }) | undefined>;
32
32
  deleteById: (listId: string) => Promise<void | undefined>;
33
- updateById: (listId: string, body: UpdateListInput) => Promise<(import("./client").Response & {
34
- data?: import("./client").List;
33
+ updateById: (listId: string, body: UpdateListInput) => Promise<(import(".").Response & {
34
+ data?: import(".").List;
35
35
  }) | undefined>;
36
36
  };
37
37
  readonly profiles: {
38
- createToken: (body: CreateProfileTokenInput) => Promise<(import("./client").Response & {
39
- data?: import("./client").CreateProfileTokenResponse;
38
+ createToken: (body?: CreateProfileTokenInput) => Promise<(import(".").Response & {
39
+ data?: import(".").CreateProfileTokenResponse;
40
40
  }) | undefined>;
41
- identifyProfile: (body: IdentifyProfileInput) => Promise<(import("./client").Response & {
42
- data?: import("./client").IdentifyProfileResponse;
41
+ identifyProfile: (body: IdentifyProfileInput) => Promise<(import(".").Response & {
42
+ data?: import(".").IdentifyProfileResponse;
43
43
  }) | undefined>;
44
44
  };
45
45
  private readonly addHeaders;
46
46
  private readonly handleRequest;
47
47
  }
48
+ export * from "./client/types.gen";
package/dist/index.js CHANGED
@@ -19,7 +19,7 @@ export class SwishClient {
19
19
  updateById: (listId, body) => this.handleRequest(listControllerUpdateById(this.addHeaders({ body, path: { listId } }))),
20
20
  };
21
21
  this.profiles = {
22
- createToken: (body) => this.handleRequest(profileControllerCreateToken(this.addHeaders({ body }))),
22
+ createToken: (body = {}) => this.handleRequest(profileControllerCreateToken(this.addHeaders({ body }))),
23
23
  identifyProfile: (body) => this.handleRequest(profileControllerIdentifyProfile(this.addHeaders({ body }))),
24
24
  };
25
25
  this.addHeaders = (options) => ({
@@ -41,3 +41,4 @@ export class SwishClient {
41
41
  this.options = options;
42
42
  }
43
43
  }
44
+ export * from "./client/types.gen";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swishapp/api-client",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "API client for the Swish API",
5
5
  "website": "https://swish.app",
6
6
  "type": "module",