skapi-js 1.2.12-beta.4 → 1.2.12
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/README.md +0 -13
- package/dist/bundle-report-commonjs.html +2 -2
- package/dist/bundle-report.html +2 -2
- package/dist/skapi.cjs +1 -1
- package/dist/skapi.cjs.map +1 -1
- package/dist/skapi.d.mts +1534 -0
- package/dist/skapi.d.ts +1534 -0
- package/dist/skapi.js +1 -1
- package/dist/skapi.js.map +1 -1
- package/dist/skapi.mjs +234 -0
- package/dist/skapi.mjs.map +1 -0
- package/js/Main.d.ts +0 -1
- package/js/Types.d.ts +1 -8
- package/js/main/skapi.d.ts +10 -9
- package/js/main/skapi.js +44 -43
- package/js/main/skapi.js.map +1 -1
- package/js/methods/admin.d.ts +2 -4
- package/js/methods/admin.js +9 -9
- package/js/methods/admin.js.map +1 -1
- package/js/methods/database.js +17 -10
- package/js/methods/database.js.map +1 -1
- package/js/methods/notification.js +0 -12
- package/js/methods/notification.js.map +1 -1
- package/js/methods/realtime.js +2 -17
- package/js/methods/realtime.js.map +1 -1
- package/js/methods/subscription.js +1 -1
- package/js/methods/subscription.js.map +1 -1
- package/js/methods/user.d.ts +2 -5
- package/js/methods/user.js +10 -47
- package/js/methods/user.js.map +1 -1
- package/js/methods/vivian.js +1 -1
- package/js/methods/vivian.js.map +1 -1
- package/js/methods/webrtc.js +3 -9
- package/js/methods/webrtc.js.map +1 -1
- package/js/polyfills/global.js +1 -173
- package/js/polyfills/global.js.map +1 -1
- package/js/utils/network.js +8 -9
- package/js/utils/network.js.map +1 -1
- package/js/utils/utils.js +4 -5
- package/js/utils/utils.js.map +1 -1
- package/js/utils/validator.js +4 -4
- package/js/utils/validator.js.map +1 -1
- package/package.json +1 -2
- package/js/node_modules/qpass/index.d.ts +0 -25
- package/js/src/Main.d.ts +0 -6
- package/js/src/Types.d.ts +0 -266
- package/js/src/main/error.d.ts +0 -9
- package/js/src/main/skapi.d.ts +0 -477
- package/js/src/methods/admin.d.ts +0 -61
- package/js/src/methods/database.d.ts +0 -87
- package/js/src/methods/notification.d.ts +0 -21
- package/js/src/methods/param_restrictions.d.ts +0 -21
- package/js/src/methods/realtime.d.ts +0 -35
- package/js/src/methods/request.d.ts +0 -43
- package/js/src/methods/subscription.d.ts +0 -69
- package/js/src/methods/user.d.ts +0 -174
- package/js/src/methods/vivian.d.ts +0 -3
- package/js/src/methods/webrtc.d.ts +0 -26
- package/js/src/polyfills/global.d.ts +0 -0
- package/js/src/utils/network.d.ts +0 -24
- package/js/src/utils/utils.d.ts +0 -32
- package/js/src/utils/validator.d.ts +0 -24
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { DatabaseResponse, FetchOptions, RealtimeCallback } from '../Types';
|
|
2
|
-
export declare function closeRealtime(): Promise<void>;
|
|
3
|
-
export declare function connectRealtime(cb: RealtimeCallback, delay?: number, reconnect?: string): Promise<WebSocket>;
|
|
4
|
-
export declare function postRealtime(message: any, recipient: string, notification?: {
|
|
5
|
-
config?: {
|
|
6
|
-
always: boolean;
|
|
7
|
-
};
|
|
8
|
-
title: string;
|
|
9
|
-
body: string;
|
|
10
|
-
}): Promise<{
|
|
11
|
-
type: 'success';
|
|
12
|
-
message: 'Message sent.';
|
|
13
|
-
}>;
|
|
14
|
-
export declare function joinRealtime(params: {
|
|
15
|
-
group?: string | null;
|
|
16
|
-
}): Promise<{
|
|
17
|
-
type: 'success';
|
|
18
|
-
message: string;
|
|
19
|
-
}>;
|
|
20
|
-
export declare function getRealtimeUsers(params: {
|
|
21
|
-
group: string;
|
|
22
|
-
user_id?: string;
|
|
23
|
-
}, fetchOptions?: FetchOptions): Promise<DatabaseResponse<{
|
|
24
|
-
user_id: string;
|
|
25
|
-
cid: string;
|
|
26
|
-
}[]>>;
|
|
27
|
-
export declare function getRealtimeGroups(params?: {
|
|
28
|
-
searchFor: 'group' | 'number_of_users';
|
|
29
|
-
value?: string | number;
|
|
30
|
-
condition?: '>' | '>=' | '=' | '<' | '<=' | '!=' | 'gt' | 'gte' | 'eq' | 'lt' | 'lte' | 'ne';
|
|
31
|
-
range?: string | number;
|
|
32
|
-
} | null, fetchOptions?: FetchOptions): Promise<DatabaseResponse<{
|
|
33
|
-
group: string;
|
|
34
|
-
number_of_users: number;
|
|
35
|
-
}>>;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { Form, ProgressCallback } from '../Types';
|
|
2
|
-
export declare function clientSecretRequest(params: {
|
|
3
|
-
url: string;
|
|
4
|
-
clientSecretName: string;
|
|
5
|
-
method: 'GET' | 'POST' | 'DELETE' | 'PUT';
|
|
6
|
-
headers?: {
|
|
7
|
-
[key: string]: string;
|
|
8
|
-
};
|
|
9
|
-
data?: {
|
|
10
|
-
[key: string]: any;
|
|
11
|
-
};
|
|
12
|
-
params?: {
|
|
13
|
-
[key: string]: string;
|
|
14
|
-
};
|
|
15
|
-
}): Promise<any>;
|
|
16
|
-
export declare function sendInquiry(data: Form<{
|
|
17
|
-
name: string;
|
|
18
|
-
email: string;
|
|
19
|
-
subject: string;
|
|
20
|
-
message: string;
|
|
21
|
-
}>): Promise<"SUCCESS: Inquiry has been sent.">;
|
|
22
|
-
export declare function secureRequest<RequestParams = {
|
|
23
|
-
url: string;
|
|
24
|
-
data?: any;
|
|
25
|
-
sync?: boolean;
|
|
26
|
-
}, Response = {
|
|
27
|
-
response: any;
|
|
28
|
-
statusCode: number;
|
|
29
|
-
url: string;
|
|
30
|
-
}>(params: RequestParams[] | Form<RequestParams>, url?: string): Promise<Response | Response[]>;
|
|
31
|
-
export declare function mock(data: Form<{
|
|
32
|
-
[key: string]: any;
|
|
33
|
-
} & {
|
|
34
|
-
raise?: 'ERR_INVALID_REQUEST' | 'ERR_INVALID_PARAMETER' | 'SOMETHING_WENT_WRONG' | 'ERR_EXISTS' | 'ERR_NOT_EXISTS';
|
|
35
|
-
}>, options?: {
|
|
36
|
-
auth?: boolean;
|
|
37
|
-
method?: string;
|
|
38
|
-
responseType?: 'blob' | 'json' | 'text' | 'arrayBuffer' | 'formData' | 'document';
|
|
39
|
-
contentType?: string;
|
|
40
|
-
progress?: ProgressCallback;
|
|
41
|
-
}): Promise<{
|
|
42
|
-
[key: string]: any;
|
|
43
|
-
}>;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { DatabaseResponse, FetchOptions, Form, Newsletters, RecordData } from '../Types';
|
|
2
|
-
export declare function getFeed(params?: {
|
|
3
|
-
access_group?: number;
|
|
4
|
-
}, fetchOptions?: FetchOptions): Promise<DatabaseResponse<RecordData>>;
|
|
5
|
-
export declare function getSubscriptions(params: {
|
|
6
|
-
subscriber?: string;
|
|
7
|
-
subscription?: string;
|
|
8
|
-
blocked?: boolean;
|
|
9
|
-
}, fetchOptions?: FetchOptions): Promise<DatabaseResponse<{
|
|
10
|
-
subscriber: string;
|
|
11
|
-
subscription: string;
|
|
12
|
-
timestamp: number;
|
|
13
|
-
blocked: boolean;
|
|
14
|
-
get_feed: boolean;
|
|
15
|
-
get_notified: boolean;
|
|
16
|
-
get_email: boolean;
|
|
17
|
-
}>>;
|
|
18
|
-
export declare function subscribe(params: {
|
|
19
|
-
user_id: string;
|
|
20
|
-
get_feed?: boolean;
|
|
21
|
-
get_notified?: boolean;
|
|
22
|
-
get_email?: boolean;
|
|
23
|
-
}): Promise<{
|
|
24
|
-
subscriber: string;
|
|
25
|
-
subscription: string;
|
|
26
|
-
timestamp: number;
|
|
27
|
-
blocked: boolean;
|
|
28
|
-
get_feed: boolean;
|
|
29
|
-
get_notified: boolean;
|
|
30
|
-
get_email: boolean;
|
|
31
|
-
}>;
|
|
32
|
-
export declare function adminNewsletterRequest(params: any): Promise<any>;
|
|
33
|
-
export declare function unsubscribe(params: {
|
|
34
|
-
user_id: string;
|
|
35
|
-
}): Promise<'SUCCESS: The user has unsubscribed.'>;
|
|
36
|
-
export declare function blockSubscriber(params: {
|
|
37
|
-
user_id: string;
|
|
38
|
-
}): Promise<'SUCCESS: Blocked user ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".'>;
|
|
39
|
-
export declare function unblockSubscriber(params: {
|
|
40
|
-
user_id: string;
|
|
41
|
-
}): Promise<'SUCCESS: Unblocked user ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".'>;
|
|
42
|
-
export declare function getNewsletterSubscription(params: {
|
|
43
|
-
group?: number | 'public' | 'authorized';
|
|
44
|
-
}, fetchOptions?: FetchOptions): Promise<{
|
|
45
|
-
active: boolean;
|
|
46
|
-
timestamp: number;
|
|
47
|
-
group: number;
|
|
48
|
-
subscribed_email: string;
|
|
49
|
-
}[]>;
|
|
50
|
-
export declare function subscribeNewsletter(form: Form<{
|
|
51
|
-
email?: string;
|
|
52
|
-
group: number | 'public' | 'authorized' | 'admin' | string;
|
|
53
|
-
redirect?: string;
|
|
54
|
-
}>): Promise<string>;
|
|
55
|
-
export declare function registerNewsletterGroup(form: Form<{
|
|
56
|
-
group: string;
|
|
57
|
-
restriction: number;
|
|
58
|
-
}>): Promise<string>;
|
|
59
|
-
export declare function newsletterGroupEndpoint(params: any): Promise<any>;
|
|
60
|
-
export declare function unsubscribeNewsletter(params: {
|
|
61
|
-
group: number | 'public' | 'authorized' | 'admin' | null;
|
|
62
|
-
}): Promise<string>;
|
|
63
|
-
export declare function getNewsletters(params?: {
|
|
64
|
-
searchFor: 'message_id' | 'timestamp' | 'read' | 'complaint' | 'subject';
|
|
65
|
-
value: string | number;
|
|
66
|
-
group: 'public' | 'authorized' | number;
|
|
67
|
-
range?: string | number;
|
|
68
|
-
condition?: '>' | '>=' | '=' | '<' | '<=' | 'gt' | 'gte' | 'eq' | 'lt' | 'lte';
|
|
69
|
-
}, fetchOptions?: FetchOptions): Promise<DatabaseResponse<Newsletters>>;
|
package/js/src/methods/user.d.ts
DELETED
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import { CognitoUserAttribute, CognitoUser, CognitoUserSession } from 'amazon-cognito-identity-js';
|
|
2
|
-
import { Form, UserProfile, FetchOptions, DatabaseResponse, UserAttributes, UserPublic } from '../Types';
|
|
3
|
-
export declare function consumeTicket(params: {
|
|
4
|
-
ticket_id: string;
|
|
5
|
-
method: string;
|
|
6
|
-
auth?: boolean;
|
|
7
|
-
data?: {
|
|
8
|
-
[key: string]: any;
|
|
9
|
-
};
|
|
10
|
-
}): Promise<any>;
|
|
11
|
-
export declare function getTickets(params: {
|
|
12
|
-
ticket_id?: string;
|
|
13
|
-
}, fetchOptions?: FetchOptions): Promise<DatabaseResponse<any[]>>;
|
|
14
|
-
export declare function getConsumedTickets(params: {
|
|
15
|
-
ticket_id?: string;
|
|
16
|
-
}, fetchOptions?: FetchOptions): Promise<DatabaseResponse<any[]>>;
|
|
17
|
-
export declare function registerTicket(params: {
|
|
18
|
-
ticket_id: string;
|
|
19
|
-
description: string;
|
|
20
|
-
count?: number;
|
|
21
|
-
time_to_live?: number;
|
|
22
|
-
placeholder?: {
|
|
23
|
-
[key: string]: string;
|
|
24
|
-
};
|
|
25
|
-
limit_per_user?: number;
|
|
26
|
-
condition?: {
|
|
27
|
-
return200?: boolean;
|
|
28
|
-
method?: 'GET' | 'POST';
|
|
29
|
-
headers?: {
|
|
30
|
-
key: string;
|
|
31
|
-
value: string | string[];
|
|
32
|
-
operator: 'gt' | 'gte' | 'lt' | 'lte' | 'eq' | 'ne' | '>' | '>=' | '<' | '<=' | '=' | '!=';
|
|
33
|
-
}[];
|
|
34
|
-
ip?: {
|
|
35
|
-
value: string | string[];
|
|
36
|
-
operator: 'gt' | 'gte' | 'lt' | 'lte' | 'eq' | 'ne' | '>' | '>=' | '<' | '<=' | '=' | '!=';
|
|
37
|
-
};
|
|
38
|
-
user_agent?: {
|
|
39
|
-
value: string | string[];
|
|
40
|
-
operator: 'gt' | 'gte' | 'lt' | 'lte' | 'eq' | 'ne' | '>' | '>=' | '<' | '<=' | '=' | '!=';
|
|
41
|
-
};
|
|
42
|
-
data?: {
|
|
43
|
-
key?: string;
|
|
44
|
-
value: any | any[];
|
|
45
|
-
operator: 'gt' | 'gte' | 'lt' | 'lte' | 'eq' | 'ne' | '>' | '>=' | '<' | '<=' | '=' | '!=';
|
|
46
|
-
setValueWhenMatch?: any | any[];
|
|
47
|
-
}[];
|
|
48
|
-
params?: {
|
|
49
|
-
key?: string;
|
|
50
|
-
value: string | string[];
|
|
51
|
-
operator: 'gt' | 'gte' | 'lt' | 'lte' | 'eq' | 'ne' | '>' | '>=' | '<' | '<=' | '=' | '!=';
|
|
52
|
-
setValueWhenMatch?: any | any[];
|
|
53
|
-
}[];
|
|
54
|
-
user?: {
|
|
55
|
-
key: string;
|
|
56
|
-
value: string | string[];
|
|
57
|
-
operator: 'gt' | 'gte' | 'lt' | 'lte' | 'eq' | 'ne' | '>' | '>=' | '<' | '<=' | '=' | '!=';
|
|
58
|
-
}[];
|
|
59
|
-
record_access?: string;
|
|
60
|
-
request?: {
|
|
61
|
-
url: string;
|
|
62
|
-
method: 'GET' | 'POST';
|
|
63
|
-
headers?: {
|
|
64
|
-
[key: string]: string;
|
|
65
|
-
};
|
|
66
|
-
data?: Record<string, any>;
|
|
67
|
-
params?: Record<string, any>;
|
|
68
|
-
match: {
|
|
69
|
-
key: string;
|
|
70
|
-
operator: 'gt' | 'gte' | 'lt' | 'lte' | 'eq' | 'ne' | '>' | '>=' | '<' | '<=' | '=' | '!=';
|
|
71
|
-
value: any | any[];
|
|
72
|
-
}[];
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
action?: {
|
|
76
|
-
access_group: number;
|
|
77
|
-
record_access?: string;
|
|
78
|
-
request?: {
|
|
79
|
-
url: string;
|
|
80
|
-
method: 'GET' | 'POST';
|
|
81
|
-
headers?: {
|
|
82
|
-
[key: string]: string;
|
|
83
|
-
};
|
|
84
|
-
data?: Record<string, any>;
|
|
85
|
-
params?: Record<string, any>;
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
}): Promise<string>;
|
|
89
|
-
export declare function unregisterTicket(params: {
|
|
90
|
-
ticket_id: string;
|
|
91
|
-
}): Promise<string>;
|
|
92
|
-
export declare function getJwtToken(): Promise<any>;
|
|
93
|
-
export declare function authentication(): {
|
|
94
|
-
getSession: (option?: {
|
|
95
|
-
skipUserUpdateEventTrigger?: boolean;
|
|
96
|
-
refreshToken?: boolean;
|
|
97
|
-
}) => Promise<CognitoUserSession>;
|
|
98
|
-
authenticateUser: (email: string, password: string, raw?: boolean, is_openid?: boolean) => Promise<UserProfile>;
|
|
99
|
-
createCognitoUser: (un: string, raw?: boolean) => {
|
|
100
|
-
cognitoUser: CognitoUser;
|
|
101
|
-
cognitoUsername: string;
|
|
102
|
-
};
|
|
103
|
-
signup: (username: string, password: string, attributes: CognitoUserAttribute[]) => Promise<unknown>;
|
|
104
|
-
};
|
|
105
|
-
export declare function getProfile(options?: {
|
|
106
|
-
refreshToken: boolean;
|
|
107
|
-
}): Promise<UserProfile | null>;
|
|
108
|
-
export declare function openIdLogin(params: {
|
|
109
|
-
token: string;
|
|
110
|
-
id: string;
|
|
111
|
-
merge?: boolean | string[];
|
|
112
|
-
}): Promise<{
|
|
113
|
-
userProfile: UserProfile;
|
|
114
|
-
openid: {
|
|
115
|
-
[attribute: string]: string;
|
|
116
|
-
};
|
|
117
|
-
}>;
|
|
118
|
-
export declare function loginWithToken(params: {
|
|
119
|
-
idToken: string;
|
|
120
|
-
}): Promise<UserProfile>;
|
|
121
|
-
export declare function checkAdmin(): Promise<boolean>;
|
|
122
|
-
export declare function _out(global?: boolean): Promise<any>;
|
|
123
|
-
export declare function logout(params?: Form<{
|
|
124
|
-
global: boolean;
|
|
125
|
-
}>): Promise<'SUCCESS: The user has been logged out.'>;
|
|
126
|
-
export declare function resendSignupConfirmation(): Promise<'SUCCESS: Signup confirmation e-mail has been sent.'>;
|
|
127
|
-
export declare function recoverAccount(redirect?: boolean | string): Promise<"SUCCESS: Recovery e-mail has been sent.">;
|
|
128
|
-
export declare function login(form: Form<{
|
|
129
|
-
username?: string;
|
|
130
|
-
email: string;
|
|
131
|
-
password: string;
|
|
132
|
-
}>): Promise<UserProfile>;
|
|
133
|
-
export declare function signup(form: Form<UserAttributes & {
|
|
134
|
-
email: String;
|
|
135
|
-
password: String;
|
|
136
|
-
username?: string;
|
|
137
|
-
}>, option?: {
|
|
138
|
-
signup_confirmation?: boolean | string;
|
|
139
|
-
email_subscription?: boolean;
|
|
140
|
-
login?: boolean;
|
|
141
|
-
}): Promise<UserProfile | "SUCCESS: The account has been created. User's signup confirmation is required." | 'SUCCESS: The account has been created.'>;
|
|
142
|
-
export declare function disableAccount(): Promise<'SUCCESS: account has been disabled.'>;
|
|
143
|
-
export declare function resetPassword(form: Form<{
|
|
144
|
-
email: string;
|
|
145
|
-
code: string | number;
|
|
146
|
-
new_password: string;
|
|
147
|
-
}>): Promise<"SUCCESS: New password has been set.">;
|
|
148
|
-
export declare function verifyPhoneNumber(form?: Form<{
|
|
149
|
-
code: string;
|
|
150
|
-
}>): Promise<string>;
|
|
151
|
-
export declare function verifyEmail(form?: Form<{
|
|
152
|
-
code: string;
|
|
153
|
-
}>): Promise<string>;
|
|
154
|
-
export declare function forgotPassword(form: Form<{
|
|
155
|
-
email: string;
|
|
156
|
-
}>): Promise<"SUCCESS: Verification code has been sent.">;
|
|
157
|
-
export declare function changePassword(params: {
|
|
158
|
-
new_password: string;
|
|
159
|
-
current_password: string;
|
|
160
|
-
}): Promise<'SUCCESS: Password has been changed.'>;
|
|
161
|
-
export declare function updateProfile(form: Form<UserAttributes>): Promise<UserProfile>;
|
|
162
|
-
export declare function getUsers(params?: {
|
|
163
|
-
searchFor: string;
|
|
164
|
-
value: string | number | boolean | string[];
|
|
165
|
-
condition?: '>' | '>=' | '=' | '<' | '<=' | 'gt' | 'gte' | 'eq' | 'lt' | 'lte';
|
|
166
|
-
range?: string | number | boolean;
|
|
167
|
-
}, fetchOptions?: FetchOptions): Promise<DatabaseResponse<UserPublic>>;
|
|
168
|
-
export declare function lastVerifiedEmail(params?: {
|
|
169
|
-
revert: boolean;
|
|
170
|
-
}): Promise<string | UserProfile>;
|
|
171
|
-
export declare function requestUsernameChange(params: {
|
|
172
|
-
redirect?: string;
|
|
173
|
-
username: string;
|
|
174
|
-
}): Promise<'SUCCESS: confirmation e-mail has been sent.'>;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { RTCResolved, RTCEvent, RTCConnectorParams, RTCReceiverParams, WebSocketMessage, RTCConnector } from "../Types";
|
|
2
|
-
export declare const __peerConnection: {
|
|
3
|
-
[sender: string]: RTCPeerConnection;
|
|
4
|
-
};
|
|
5
|
-
export declare const __dataChannel: {
|
|
6
|
-
[sender: string]: {
|
|
7
|
-
[label: string]: RTCDataChannel;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export declare const __caller_ringing: {
|
|
11
|
-
[recipient: string]: (v: any) => void;
|
|
12
|
-
};
|
|
13
|
-
export declare const __receiver_ringing: {
|
|
14
|
-
[caller: string]: string;
|
|
15
|
-
};
|
|
16
|
-
export declare const __rtcEvents: {
|
|
17
|
-
[sender: string]: (v: any) => void;
|
|
18
|
-
};
|
|
19
|
-
export declare function answerSdpOffer(offer: any, recipient: string): Promise<void>;
|
|
20
|
-
export declare function receiveIceCandidate(candidate: any, recipient: string): Promise<any[]>;
|
|
21
|
-
export declare function closeRTC(params: {
|
|
22
|
-
cid?: string;
|
|
23
|
-
close_all?: boolean;
|
|
24
|
-
}): Promise<void>;
|
|
25
|
-
export declare function connectRTC(params: RTCConnectorParams, callback: RTCEvent): Promise<RTCConnector>;
|
|
26
|
-
export declare function respondRTC(msg: WebSocketMessage): (params: RTCReceiverParams, callback: RTCEvent) => Promise<RTCResolved>;
|
|
File without changes
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Form, FetchOptions, ProgressCallback } from '../Types';
|
|
2
|
-
export declare function terminatePendingRequests(): void;
|
|
3
|
-
export declare function request(url: string, data?: Form<any>, options?: {
|
|
4
|
-
fetchOptions?: FetchOptions;
|
|
5
|
-
auth?: boolean;
|
|
6
|
-
method?: string;
|
|
7
|
-
bypassAwaitConnection?: boolean;
|
|
8
|
-
responseType?: 'json' | 'blob' | 'text' | 'arrayBuffer' | 'formData' | 'document';
|
|
9
|
-
contentType?: string;
|
|
10
|
-
}, _etc?: {
|
|
11
|
-
ignoreService: boolean;
|
|
12
|
-
}): Promise<any>;
|
|
13
|
-
export declare function uploadFiles(fileList: FormData | HTMLFormElement | SubmitEvent, params: {
|
|
14
|
-
record_id: string;
|
|
15
|
-
progress?: ProgressCallback;
|
|
16
|
-
}): Promise<{
|
|
17
|
-
completed: File[];
|
|
18
|
-
failed: File[];
|
|
19
|
-
bin_endpoints: string[];
|
|
20
|
-
}>;
|
|
21
|
-
export declare function formHandler(options?: {
|
|
22
|
-
preventMultipleCalls: boolean;
|
|
23
|
-
}): (target: object, propertyKey: string, descriptor: any) => void;
|
|
24
|
-
export declare function getFormResponse(): Promise<any>;
|
package/js/src/utils/utils.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
declare class MD5 {
|
|
2
|
-
private static readonly alphabet;
|
|
3
|
-
static hash(str?: string): string;
|
|
4
|
-
private static rh;
|
|
5
|
-
private static ad;
|
|
6
|
-
private static rl;
|
|
7
|
-
private static cm;
|
|
8
|
-
private static ff;
|
|
9
|
-
private static gg;
|
|
10
|
-
private static hh;
|
|
11
|
-
private static ii;
|
|
12
|
-
private static sb;
|
|
13
|
-
}
|
|
14
|
-
declare function toBase62(num: number): string;
|
|
15
|
-
declare function fromBase62(chars: string): number;
|
|
16
|
-
declare function generateRandom(length?: number): string;
|
|
17
|
-
declare function extractFormData(form: FormData | HTMLFormElement | SubmitEvent | {
|
|
18
|
-
[key: string]: any;
|
|
19
|
-
} | number | string | boolean | null, options?: {
|
|
20
|
-
nullIfEmpty?: boolean;
|
|
21
|
-
ignoreEmpty?: boolean;
|
|
22
|
-
}, callback?: (name: string, value: any) => any): {
|
|
23
|
-
data: any;
|
|
24
|
-
files: {
|
|
25
|
-
name: string;
|
|
26
|
-
file: File;
|
|
27
|
-
}[];
|
|
28
|
-
};
|
|
29
|
-
declare function parseUserAttributes(attr: {
|
|
30
|
-
[key: string]: any;
|
|
31
|
-
}): any;
|
|
32
|
-
export { fromBase62, toBase62, extractFormData, MD5, generateRandom, parseUserAttributes };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
declare function UserId(id: string, param?: string): string;
|
|
2
|
-
declare function PhoneNumber(value: string): string;
|
|
3
|
-
declare function Birthdate(birthdate: string): string;
|
|
4
|
-
declare function Password(password: string): string;
|
|
5
|
-
declare function Email(email: string, paramName?: string): string;
|
|
6
|
-
declare function Url(url: string | string[]): any;
|
|
7
|
-
declare function specialChars(string: string | string[], p?: string, allowPeriods?: boolean, allowWhiteSpace?: boolean): string | string[];
|
|
8
|
-
declare function Params(params: any, struct: Record<string, any>, required?: string[], options?: {
|
|
9
|
-
ignoreEmpty?: boolean;
|
|
10
|
-
nullIfEmpty?: boolean;
|
|
11
|
-
}): any;
|
|
12
|
-
declare function checkParams(params: any, struct: any, required?: string[], _parentKey?: any): any;
|
|
13
|
-
declare const _default: {
|
|
14
|
-
UserId: typeof UserId;
|
|
15
|
-
PhoneNumber: typeof PhoneNumber;
|
|
16
|
-
Birthdate: typeof Birthdate;
|
|
17
|
-
Password: typeof Password;
|
|
18
|
-
Email: typeof Email;
|
|
19
|
-
Url: typeof Url;
|
|
20
|
-
specialChars: typeof specialChars;
|
|
21
|
-
Params: typeof Params;
|
|
22
|
-
checkParams: typeof checkParams;
|
|
23
|
-
};
|
|
24
|
-
export default _default;
|