@meowinc/meow-sdk 0.8.0 → 0.9.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/dist/account/activity/get-user-activity.d.ts +19 -0
- package/dist/account/activity/get-user-activity.js +10 -0
- package/dist/account/activity/index.d.ts +6 -0
- package/dist/account/activity/index.js +10 -0
- package/dist/account/index.d.ts +2 -0
- package/dist/account/index.js +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { MeowResult } from "../../types";
|
|
2
|
+
export interface Response {
|
|
3
|
+
items: {
|
|
4
|
+
id: number;
|
|
5
|
+
createdAt: string;
|
|
6
|
+
payload: ActivityPayloadType;
|
|
7
|
+
}[];
|
|
8
|
+
}
|
|
9
|
+
type ActivityPayloadType = {
|
|
10
|
+
type: "appCreated";
|
|
11
|
+
appId: number;
|
|
12
|
+
} | {
|
|
13
|
+
type: "serviceCreated";
|
|
14
|
+
serviceId: number;
|
|
15
|
+
} | {
|
|
16
|
+
type: "accountCreated";
|
|
17
|
+
};
|
|
18
|
+
export declare function request(userLogin: string): Promise<MeowResult<Response>>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ACCOUNT_API } from "..";
|
|
2
|
+
import { ErrorToMessage } from "../../error";
|
|
3
|
+
import { HttpClient } from "../../http-client";
|
|
4
|
+
export async function request(userLogin) {
|
|
5
|
+
return await new HttpClient()
|
|
6
|
+
.withUrl(`${ACCOUNT_API}/v1/activity/${userLogin}`)
|
|
7
|
+
.withMethodGet()
|
|
8
|
+
.send()
|
|
9
|
+
.then((r) => r.mapError(ErrorToMessage));
|
|
10
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AuthorizationProvider } from "../..";
|
|
2
|
+
export declare class ActivityRequests {
|
|
3
|
+
private readonly authProvider;
|
|
4
|
+
constructor(authProvider: AuthorizationProvider);
|
|
5
|
+
getUserActivity(userLogin: string): Promise<import("../../types").MeowResult<import("./get-user-activity").Response>>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { request as getUserActivity } from "./get-user-activity";
|
|
2
|
+
export class ActivityRequests {
|
|
3
|
+
authProvider;
|
|
4
|
+
constructor(authProvider) {
|
|
5
|
+
this.authProvider = authProvider;
|
|
6
|
+
}
|
|
7
|
+
async getUserActivity(userLogin) {
|
|
8
|
+
return getUserActivity(userLogin);
|
|
9
|
+
}
|
|
10
|
+
}
|
package/dist/account/index.d.ts
CHANGED
|
@@ -5,9 +5,11 @@ import { SessionsRequests } from "./sessions";
|
|
|
5
5
|
import { UserRequests } from "./user";
|
|
6
6
|
import { ServiceRequests } from "./service";
|
|
7
7
|
import { ServicesPermissionsRequests } from "./services-permissions";
|
|
8
|
+
import { ActivityRequests } from "./activity";
|
|
8
9
|
export { type VerificationType } from "./types";
|
|
9
10
|
export declare const ACCOUNT_API = "https://account.meowinc.tech/api";
|
|
10
11
|
export declare class AccountClient {
|
|
12
|
+
activity: ActivityRequests;
|
|
11
13
|
app: AppRequests;
|
|
12
14
|
auth: AuthRequests;
|
|
13
15
|
user: UserRequests;
|
package/dist/account/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import { SessionsRequests } from "./sessions";
|
|
|
4
4
|
import { UserRequests } from "./user";
|
|
5
5
|
import { ServiceRequests } from "./service";
|
|
6
6
|
import { ServicesPermissionsRequests } from "./services-permissions";
|
|
7
|
+
import { ActivityRequests } from "./activity";
|
|
7
8
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8
9
|
const permissions = [
|
|
9
10
|
"account.getAccountInformation",
|
|
@@ -14,6 +15,7 @@ const permissions = [
|
|
|
14
15
|
];
|
|
15
16
|
export const ACCOUNT_API = "https://account.meowinc.tech/api";
|
|
16
17
|
export class AccountClient {
|
|
18
|
+
activity;
|
|
17
19
|
app;
|
|
18
20
|
auth;
|
|
19
21
|
user;
|
|
@@ -21,6 +23,7 @@ export class AccountClient {
|
|
|
21
23
|
servicePermissions;
|
|
22
24
|
sessions;
|
|
23
25
|
constructor(authorizationProvider) {
|
|
26
|
+
this.activity = new ActivityRequests(authorizationProvider);
|
|
24
27
|
this.auth = new AuthRequests(authorizationProvider);
|
|
25
28
|
this.app = new AppRequests(authorizationProvider);
|
|
26
29
|
this.user = new UserRequests(authorizationProvider);
|