@meowinc/meow-sdk 0.16.0 → 0.18.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.
- package/dist/account/app-releases/create.d.ts +12 -0
- package/dist/account/app-releases/create.js +12 -0
- package/dist/account/app-releases/get-app-releases.d.ts +12 -0
- package/dist/account/app-releases/get-app-releases.js +10 -0
- package/dist/account/app-releases/get-by-id.d.ts +11 -0
- package/dist/account/app-releases/get-by-id.js +10 -0
- package/dist/account/app-releases/index.d.ts +12 -0
- package/dist/account/app-releases/index.js +18 -0
- package/dist/account/index.d.ts +2 -0
- package/dist/account/index.js +3 -0
- package/dist/account/user/get-user-by-login.d.ts +1 -0
- package/dist/account/user/index.d.ts +1 -0
- package/dist/account/user/index.js +4 -0
- package/dist/account/user/update-user-tags.d.ts +7 -0
- package/dist/account/user/update-user-tags.js +12 -0
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AuthorizationProvider } from "../..";
|
|
2
|
+
import { MeowResult } from "../../types";
|
|
3
|
+
interface Payload {
|
|
4
|
+
version: string;
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
}
|
|
8
|
+
export interface Response {
|
|
9
|
+
createdId: number;
|
|
10
|
+
}
|
|
11
|
+
export declare function request(appId: string, payload: Payload, authProvider: AuthorizationProvider): Promise<MeowResult<Response>>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ACCOUNT_API } from "..";
|
|
2
|
+
import { ErrorToMessage } from "../../error";
|
|
3
|
+
import { HttpClient } from "../../http-client";
|
|
4
|
+
export async function request(appId, payload, authProvider) {
|
|
5
|
+
return await new HttpClient()
|
|
6
|
+
.withUrl(`${ACCOUNT_API}/v1/app/${appId}/release/create`)
|
|
7
|
+
.withMethodPost()
|
|
8
|
+
.withAuthorization(authProvider)
|
|
9
|
+
.withJsonBody(payload)
|
|
10
|
+
.send()
|
|
11
|
+
.then((r) => r.mapError(ErrorToMessage));
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MeowResult } from "../../types";
|
|
2
|
+
export interface Response {
|
|
3
|
+
items: {
|
|
4
|
+
id: number;
|
|
5
|
+
title: string;
|
|
6
|
+
version: string;
|
|
7
|
+
isFileExists: boolean;
|
|
8
|
+
createdAt: Date;
|
|
9
|
+
updatedAt?: Date;
|
|
10
|
+
}[];
|
|
11
|
+
}
|
|
12
|
+
export declare function request(appId: string): Promise<MeowResult<Response>>;
|
|
@@ -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(appId) {
|
|
5
|
+
return await new HttpClient()
|
|
6
|
+
.withUrl(`${ACCOUNT_API}/v1/app/${appId}/release`)
|
|
7
|
+
.withMethodGet()
|
|
8
|
+
.send()
|
|
9
|
+
.then((r) => r.mapError(ErrorToMessage));
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MeowResult } from "../../types";
|
|
2
|
+
export interface Response {
|
|
3
|
+
id: number;
|
|
4
|
+
title: string;
|
|
5
|
+
version: string;
|
|
6
|
+
description: string;
|
|
7
|
+
filePermit?: string;
|
|
8
|
+
createdAt: Date;
|
|
9
|
+
updatedAt?: Date;
|
|
10
|
+
}
|
|
11
|
+
export declare function request(releaseId: number): Promise<MeowResult<Response>>;
|
|
@@ -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(releaseId) {
|
|
5
|
+
return await new HttpClient()
|
|
6
|
+
.withUrl(`${ACCOUNT_API}/v1/app/release/${releaseId}`)
|
|
7
|
+
.withMethodGet()
|
|
8
|
+
.send()
|
|
9
|
+
.then((r) => r.mapError(ErrorToMessage));
|
|
10
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AuthorizationProvider } from "../..";
|
|
2
|
+
export declare class AppReleasesRequsts {
|
|
3
|
+
private readonly authProvider;
|
|
4
|
+
constructor(authProvider: AuthorizationProvider);
|
|
5
|
+
create(appId: string, payload: {
|
|
6
|
+
version: string;
|
|
7
|
+
title: string;
|
|
8
|
+
description: string;
|
|
9
|
+
}): Promise<import("../../types").MeowResult<import("./create").Response>>;
|
|
10
|
+
getAppReleases(appId: string): Promise<import("../../types").MeowResult<import("./get-app-releases").Response>>;
|
|
11
|
+
getById(releaseId: number): Promise<import("../../types").MeowResult<import("./get-by-id").Response>>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { request as create } from "./create";
|
|
2
|
+
import { request as getAppReleases } from "./get-app-releases";
|
|
3
|
+
import { request as getById } from "./get-by-id";
|
|
4
|
+
export class AppReleasesRequsts {
|
|
5
|
+
authProvider;
|
|
6
|
+
constructor(authProvider) {
|
|
7
|
+
this.authProvider = authProvider;
|
|
8
|
+
}
|
|
9
|
+
async create(appId, payload) {
|
|
10
|
+
return await create(appId, payload, this.authProvider);
|
|
11
|
+
}
|
|
12
|
+
async getAppReleases(appId) {
|
|
13
|
+
return await getAppReleases(appId);
|
|
14
|
+
}
|
|
15
|
+
async getById(releaseId) {
|
|
16
|
+
return await getById(releaseId);
|
|
17
|
+
}
|
|
18
|
+
}
|
package/dist/account/index.d.ts
CHANGED
|
@@ -7,11 +7,13 @@ import { ServiceRequests } from "./service";
|
|
|
7
7
|
import { ServicesPermissionsRequests } from "./services-permissions";
|
|
8
8
|
import { ActivityRequests } from "./activity";
|
|
9
9
|
import { OAuthRequests } from "./oauth";
|
|
10
|
+
import { AppReleasesRequsts } from "./app-releases";
|
|
10
11
|
export { type VerificationType } from "./types";
|
|
11
12
|
export declare const ACCOUNT_API = "https://account.meowinc.tech/api";
|
|
12
13
|
export declare class AccountClient {
|
|
13
14
|
activity: ActivityRequests;
|
|
14
15
|
app: AppRequests;
|
|
16
|
+
appReleases: AppReleasesRequsts;
|
|
15
17
|
auth: AuthRequests;
|
|
16
18
|
oauth: OAuthRequests;
|
|
17
19
|
user: UserRequests;
|
package/dist/account/index.js
CHANGED
|
@@ -6,10 +6,12 @@ import { ServiceRequests } from "./service";
|
|
|
6
6
|
import { ServicesPermissionsRequests } from "./services-permissions";
|
|
7
7
|
import { ActivityRequests } from "./activity";
|
|
8
8
|
import { OAuthRequests } from "./oauth";
|
|
9
|
+
import { AppReleasesRequsts } from "./app-releases";
|
|
9
10
|
export const ACCOUNT_API = "https://account.meowinc.tech/api";
|
|
10
11
|
export class AccountClient {
|
|
11
12
|
activity;
|
|
12
13
|
app;
|
|
14
|
+
appReleases;
|
|
13
15
|
auth;
|
|
14
16
|
oauth;
|
|
15
17
|
user;
|
|
@@ -19,6 +21,7 @@ export class AccountClient {
|
|
|
19
21
|
constructor(authorizationProvider) {
|
|
20
22
|
this.activity = new ActivityRequests(authorizationProvider);
|
|
21
23
|
this.app = new AppRequests(authorizationProvider);
|
|
24
|
+
this.appReleases = new AppReleasesRequsts(authorizationProvider);
|
|
22
25
|
this.auth = new AuthRequests(authorizationProvider);
|
|
23
26
|
this.oauth = new OAuthRequests(authorizationProvider);
|
|
24
27
|
this.user = new UserRequests(authorizationProvider);
|
|
@@ -6,5 +6,6 @@ export declare class UserRequests {
|
|
|
6
6
|
getUserByLogin(login: string): Promise<import("@meowinc/result").Result<import("./get-user-by-login").Response, string>>;
|
|
7
7
|
getUserLastActivity(login: string): Promise<import("../../types").MeowResult<import("./get-user-last-activity").Response>>;
|
|
8
8
|
updateUserLastActivity(payload: UpdateUserLastActivityPayload): Promise<import("../../types").MeowResult<void>>;
|
|
9
|
+
updateUserTags(tags: string[]): Promise<import("../../types").MeowResult<void>>;
|
|
9
10
|
getUsedAppsByLogin(login: string): Promise<import("../../types").MeowResult<import("./get-used-apps-by-login").Response>>;
|
|
10
11
|
}
|
|
@@ -2,6 +2,7 @@ import { request as getUserByLoginRequest } from "./get-user-by-login";
|
|
|
2
2
|
import { request as getUserLastActivity } from "./get-user-last-activity";
|
|
3
3
|
import { request as updateUserLastActivity, } from "./update-user-last-activity";
|
|
4
4
|
import { request as getUsedAppsByLoginRequest } from "./get-used-apps-by-login";
|
|
5
|
+
import { request as updateUserTagsRequest } from "./update-user-tags";
|
|
5
6
|
export class UserRequests {
|
|
6
7
|
authProvider;
|
|
7
8
|
constructor(authProvider) {
|
|
@@ -16,6 +17,9 @@ export class UserRequests {
|
|
|
16
17
|
async updateUserLastActivity(payload) {
|
|
17
18
|
return await updateUserLastActivity(payload, this.authProvider);
|
|
18
19
|
}
|
|
20
|
+
async updateUserTags(tags) {
|
|
21
|
+
return await updateUserTagsRequest({ tags }, this.authProvider);
|
|
22
|
+
}
|
|
19
23
|
async getUsedAppsByLogin(login) {
|
|
20
24
|
return await getUsedAppsByLoginRequest(login);
|
|
21
25
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ACCOUNT_API } from "..";
|
|
2
|
+
import { ErrorToMessage } from "../../error";
|
|
3
|
+
import { HttpClient } from "../../http-client";
|
|
4
|
+
export async function request(payload, auth) {
|
|
5
|
+
return await new HttpClient()
|
|
6
|
+
.withUrl(`${ACCOUNT_API}/v1/user/tags`)
|
|
7
|
+
.withMethodPut()
|
|
8
|
+
.withAuthorization(auth)
|
|
9
|
+
.withJsonBody(payload)
|
|
10
|
+
.send()
|
|
11
|
+
.then((r) => r.mapError(ErrorToMessage));
|
|
12
|
+
}
|