shred-api-client 1.9.15 → 1.9.16
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/api/AppConfig.api.d.ts +9 -0
- package/dist/api/AppConfig.api.js +19 -0
- package/dist/api/PushNotification.api.d.ts +1 -1
- package/dist/model/Api.d.ts +2 -0
- package/dist/model/Api.js +2 -0
- package/dist/model/AppConfig.schema.d.ts +10 -0
- package/dist/model/AppConfig.schema.js +10 -0
- package/dist/util/HTTPClient.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Environment from "../model/Env";
|
|
2
|
+
import { APPConfigSchema } from "../model/AppConfig.schema";
|
|
3
|
+
declare class AppConfigAPI implements APPConfigSchema {
|
|
4
|
+
private env;
|
|
5
|
+
private clientHTTP;
|
|
6
|
+
constructor(env: Environment);
|
|
7
|
+
version(): Promise<string>;
|
|
8
|
+
}
|
|
9
|
+
export default AppConfigAPI;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const HTTPClient_1 = __importDefault(require("../util/HTTPClient"));
|
|
7
|
+
const AppConfig_schema_1 = require("../model/AppConfig.schema");
|
|
8
|
+
class AppConfigAPI {
|
|
9
|
+
constructor(env) {
|
|
10
|
+
this.env = env;
|
|
11
|
+
this.clientHTTP = new HTTPClient_1.default();
|
|
12
|
+
}
|
|
13
|
+
async version() {
|
|
14
|
+
const endpointInfo = AppConfig_schema_1.AppConfigEndpoints.Version;
|
|
15
|
+
const data = await this.clientHTTP.makeRequest(this.env, endpointInfo.uri, endpointInfo.method);
|
|
16
|
+
return data.version;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.default = AppConfigAPI;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Environment from "../model/Env";
|
|
2
2
|
import { PushNotificationSchema, PushNotification } from "../model/PushNotification.schema";
|
|
3
|
-
import Context from "../
|
|
3
|
+
import Context from "../model/Context";
|
|
4
4
|
declare class PushNotificationAPI implements PushNotificationSchema {
|
|
5
5
|
private env;
|
|
6
6
|
private clientHTTP;
|
package/dist/model/Api.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { UserAPISchema } from "./User.schema";
|
|
|
6
6
|
import { EmailAPISchema } from "./Email.schema";
|
|
7
7
|
import { TenantAPISchema } from "./Tenant.schema";
|
|
8
8
|
import { ProjectAPISchema } from "./Project.schema";
|
|
9
|
+
import { APPConfigSchema } from "./AppConfig.schema";
|
|
9
10
|
export declare class ShredAPI {
|
|
10
11
|
user: UserAPISchema;
|
|
11
12
|
subscription: SubscriptionAPISchema;
|
|
@@ -13,6 +14,7 @@ export declare class ShredAPI {
|
|
|
13
14
|
pushNotification: PushNotificationSchema;
|
|
14
15
|
email: EmailAPISchema;
|
|
15
16
|
tenant: TenantAPISchema;
|
|
17
|
+
app: APPConfigSchema;
|
|
16
18
|
project: ProjectAPISchema;
|
|
17
19
|
constructor(env: Environment);
|
|
18
20
|
}
|
package/dist/model/Api.js
CHANGED
|
@@ -11,6 +11,7 @@ const Tenant_api_1 = __importDefault(require("../api/Tenant.api"));
|
|
|
11
11
|
const User_api_1 = __importDefault(require("../api/User.api"));
|
|
12
12
|
const Email_api_1 = __importDefault(require("../api/Email.api"));
|
|
13
13
|
const Project_api_1 = __importDefault(require("../api/Project.api"));
|
|
14
|
+
const AppConfig_api_1 = __importDefault(require("../api/AppConfig.api"));
|
|
14
15
|
class ShredAPI {
|
|
15
16
|
constructor(env) {
|
|
16
17
|
this.user = new User_api_1.default(env);
|
|
@@ -20,6 +21,7 @@ class ShredAPI {
|
|
|
20
21
|
this.email = new Email_api_1.default(env);
|
|
21
22
|
this.tenant = new Tenant_api_1.default(env);
|
|
22
23
|
this.project = new Project_api_1.default(env);
|
|
24
|
+
this.app = new AppConfig_api_1.default(env);
|
|
23
25
|
}
|
|
24
26
|
}
|
|
25
27
|
exports.ShredAPI = ShredAPI;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AppConfigEndpoints = void 0;
|
|
4
|
+
const AppConfigEndpoints = {
|
|
5
|
+
Version: {
|
|
6
|
+
uri: "/app-config/public/version/latest",
|
|
7
|
+
method: "GET",
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
exports.AppConfigEndpoints = AppConfigEndpoints;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Environment from "../
|
|
1
|
+
import Environment from "../model/Env";
|
|
2
2
|
import Context from "./../model/Context";
|
|
3
3
|
export default class HTTPClient {
|
|
4
4
|
makeRequest(env: Environment, uri: string, method: string, data?: any, context?: Context | null, useLegacyApi?: boolean): Promise<any>;
|