@faable/auth-sdk 1.0.12 → 1.0.14

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,4 +1,5 @@
1
1
  import { AxiosInstance } from "axios";
2
+ import { TeamCreate } from "./types";
2
3
  import { FaablePaginator } from "./paginator";
3
4
  export declare class FaableAuthApi {
4
5
  client: AxiosInstance;
@@ -83,6 +84,19 @@ export declare class FaableAuthApi {
83
84
  createdAt: string;
84
85
  updatedAt?: string;
85
86
  }>;
87
+ createTeam(data: TeamCreate): Promise<{
88
+ id: string;
89
+ name: string;
90
+ slug: string;
91
+ description: string;
92
+ logo_url: string;
93
+ metadata: {
94
+ [key: string]: unknown;
95
+ };
96
+ account: string;
97
+ createdAt: string;
98
+ updatedAt?: string;
99
+ }>;
86
100
  listTeams(params?: {
87
101
  user_id?: string;
88
102
  }): {
@@ -44,6 +44,9 @@ class FaableAuthApi {
44
44
  async getTeam(team_id) {
45
45
  return await handleError(this.client.get(`/team/${team_id}`));
46
46
  }
47
+ async createTeam(data) {
48
+ return handleError(this.client.post(`/team`, data));
49
+ }
47
50
  listTeams(params) {
48
51
  return this.paginator.paginate({ url: "/team", params });
49
52
  }