dymo-api 1.0.23 → 1.0.24
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.
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as Interfaces from "../lib/interfaces";
|
|
2
|
+
export declare const isValidData: (token: string | null, data: Interfaces.Validator) => Promise<any>;
|
|
3
|
+
export declare const sendEmail: (token: string | null, data: Interfaces.SendEmail) => Promise<any>;
|
|
4
|
+
export declare const getRandom: (token: string | null, data: Interfaces.SRNG) => Promise<any>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
interface PrayerTimesData {
|
|
2
|
+
lat?: number;
|
|
3
|
+
lon?: number;
|
|
4
|
+
}
|
|
5
|
+
interface InputSatinizerData {
|
|
6
|
+
input?: string;
|
|
7
|
+
}
|
|
8
|
+
interface IsValidPwdData {
|
|
9
|
+
email?: string;
|
|
10
|
+
password?: string;
|
|
11
|
+
bannedWords?: string | string[];
|
|
12
|
+
min?: number;
|
|
13
|
+
max?: number;
|
|
14
|
+
}
|
|
15
|
+
interface NewURLEncryptData {
|
|
16
|
+
url?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const getPrayerTimes: (data: PrayerTimesData) => Promise<any>;
|
|
19
|
+
export declare const satinizer: (data: InputSatinizerData) => Promise<any>;
|
|
20
|
+
export declare const isValidPwd: (data: IsValidPwdData) => Promise<any>;
|
|
21
|
+
export declare const newURLEncrypt: (data: NewURLEncryptData) => Promise<any>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
interface ServerEmailConfig {
|
|
2
|
+
host: string;
|
|
3
|
+
port: number;
|
|
4
|
+
secure: boolean;
|
|
5
|
+
auth: {
|
|
6
|
+
user: string;
|
|
7
|
+
pass: string;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
declare class DymoAPI {
|
|
11
|
+
private rootApiKey;
|
|
12
|
+
private apiKey;
|
|
13
|
+
private tokensResponse;
|
|
14
|
+
private lastFetchTime;
|
|
15
|
+
private serverEmailConfig?;
|
|
16
|
+
private local;
|
|
17
|
+
constructor({ rootApiKey, apiKey, local, serverEmailConfig }: {
|
|
18
|
+
rootApiKey?: string | null;
|
|
19
|
+
apiKey?: string | null;
|
|
20
|
+
local?: boolean;
|
|
21
|
+
serverEmailConfig?: ServerEmailConfig;
|
|
22
|
+
});
|
|
23
|
+
private getBaseUrl;
|
|
24
|
+
private getTokens;
|
|
25
|
+
private initializeTokens;
|
|
26
|
+
isValidData(data: any): Promise<any>;
|
|
27
|
+
sendEmail(data: any): Promise<any>;
|
|
28
|
+
getRandom(data: any): Promise<any>;
|
|
29
|
+
getPrayerTimes(data: any): Promise<any>;
|
|
30
|
+
satinizer(data: any): Promise<any>;
|
|
31
|
+
isValidPwd(data: any): Promise<any>;
|
|
32
|
+
newURLEncrypt(data: any): Promise<any>;
|
|
33
|
+
}
|
|
34
|
+
export { DymoAPI };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
interface PhoneData {
|
|
3
|
+
iso: any;
|
|
4
|
+
phone: string;
|
|
5
|
+
}
|
|
6
|
+
interface CreditCardData {
|
|
7
|
+
pan: string | number;
|
|
8
|
+
expirationDate?: string;
|
|
9
|
+
cvc?: string | number;
|
|
10
|
+
cvv?: string | number;
|
|
11
|
+
}
|
|
12
|
+
export interface Validator {
|
|
13
|
+
email?: string;
|
|
14
|
+
phone?: PhoneData;
|
|
15
|
+
domain?: string;
|
|
16
|
+
creditCard?: string | CreditCardData;
|
|
17
|
+
ip?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface SRNG {
|
|
20
|
+
min: number;
|
|
21
|
+
max: number;
|
|
22
|
+
quantity?: number;
|
|
23
|
+
}
|
|
24
|
+
export type SendEmail = {
|
|
25
|
+
from: string;
|
|
26
|
+
to: string;
|
|
27
|
+
subject: string;
|
|
28
|
+
html: string;
|
|
29
|
+
react?: never;
|
|
30
|
+
} | {
|
|
31
|
+
from: string;
|
|
32
|
+
to: string;
|
|
33
|
+
subject: string;
|
|
34
|
+
html?: never;
|
|
35
|
+
react: React.ReactNode;
|
|
36
|
+
};
|
|
37
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dymo-api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.24",
|
|
4
4
|
"description": "Flow system for Dymo API.",
|
|
5
|
-
"main": "dist/
|
|
5
|
+
"main": "dist/dymo-api.js",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist/**/*",
|
|
8
8
|
"README.md",
|
|
9
9
|
"LICENSE"
|
|
10
10
|
],
|
|
11
|
+
"types": "dist/dymo-api.d.ts",
|
|
11
12
|
"type": "module",
|
|
12
13
|
"scripts": {
|
|
13
14
|
"build": "tsc",
|