dymo-api 1.0.7 → 1.0.8

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/index.d.ts CHANGED
@@ -9,6 +9,7 @@ declare module 'dymo-api' {
9
9
  initializeTokens(): Promise<void>;
10
10
  isValidData(data: any): Promise<any>;
11
11
  getPrayerTimes(data: any): Promise<any>;
12
+ inputSatinizer(data: any): Promise<any>;
12
13
  isValidPwd(data: any): Promise<any>;
13
14
  newURLEncrypt(data: any): Promise<any>;
14
15
  }
package/lib/dymo-api.cjs CHANGED
@@ -56,6 +56,7 @@ class DymoAPI {
56
56
  async isValidData(data) { return await privateAPI.isValidData(this.configuration.apiKey, data); }
57
57
  // FUNCTIONS / Public.
58
58
  async getPrayerTimes(data) { return await publicAPI.getPrayerTimes(data); }
59
+ async inputSatinizer(data) { return await publicAPI.inputSatinizer(data); }
59
60
  async isValidPwd(data) { return await publicAPI.isValidPwd(data); }
60
61
  async newURLEncrypt(data) { return await publicAPI.newURLEncrypt(data); }
61
62
  }
@@ -13,6 +13,17 @@ exports.getPrayerTimes = async (data) => {
13
13
  }
14
14
  };
15
15
 
16
+ exports.inputSatinizer = async (data) => {
17
+ const { input } = data;
18
+ if (!input) throw customError(1000, "You must specify at least the input.");
19
+ try {
20
+ const response = await axios.get('https://api.tpeoficial.com/public/inputSatinizer', { params: { input: encodeURIComponent(input) } });
21
+ return response.data;
22
+ } catch (error) {
23
+ throw customError(5000, error.message);
24
+ }
25
+ };
26
+
16
27
  exports.isValidPwd = async (data) => {
17
28
  const { email, password } = data;
18
29
  if (!password) throw customError(1000, "You must specify at least the password.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dymo-api",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Flow system for Dymo API.",
5
5
  "main": "index.js",
6
6
  "type": "module",