@verdocs/js-sdk 3.9.6 → 3.9.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.
|
@@ -29,4 +29,6 @@ export declare const updateOrganization: (endpoint: VerdocsEndpoint, organizatio
|
|
|
29
29
|
* Check if an organization name is available. Typically used during the sign-up process. This endpoint is rate-limited
|
|
30
30
|
* to prevent abuse. Developers experiencing problems with testing new applications should contact support.
|
|
31
31
|
*/
|
|
32
|
-
export declare const isOrgAvailable: (endpoint: VerdocsEndpoint, name: string) => Promise<
|
|
32
|
+
export declare const isOrgAvailable: (endpoint: VerdocsEndpoint, name: string) => Promise<{
|
|
33
|
+
result: 'TAKEN' | 'AVAILABLE';
|
|
34
|
+
}>;
|
package/Utils/Primitives.d.ts
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
|
+
import { IProfile } from '../Users/Types';
|
|
1
2
|
/**
|
|
2
3
|
* Create an array containing a sequence of integers, e.g. [START, START+1, START+2, ...] This is frequently useful
|
|
3
4
|
* in rendering operations when there is no source array to .map() across.
|
|
4
5
|
*/
|
|
5
6
|
export declare const integerSequence: (start: number, count: number) => number[];
|
|
7
|
+
/**
|
|
8
|
+
* Format a profile's full name
|
|
9
|
+
*/
|
|
10
|
+
export declare const formatFullName: (profile?: IProfile) => string;
|
|
11
|
+
/**
|
|
12
|
+
* Format a profile's initials
|
|
13
|
+
*/
|
|
14
|
+
export declare const formatInitials: (profile?: IProfile) => string;
|
|
6
15
|
/**
|
|
7
16
|
* Generate suggested initials for a full name, e.g. "John Doe" will yield "JD".
|
|
8
17
|
*/
|
package/Utils/Primitives.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { capitalize } from './Strings';
|
|
1
2
|
/**
|
|
2
3
|
* Create an array containing a sequence of integers, e.g. [START, START+1, START+2, ...] This is frequently useful
|
|
3
4
|
* in rendering operations when there is no source array to .map() across.
|
|
@@ -7,6 +8,18 @@ export var integerSequence = function (start, count) {
|
|
|
7
8
|
.fill(1)
|
|
8
9
|
.map(function (_, index) { return index + start; });
|
|
9
10
|
};
|
|
11
|
+
/**
|
|
12
|
+
* Format a profile's full name
|
|
13
|
+
*/
|
|
14
|
+
export var formatFullName = function (profile) {
|
|
15
|
+
return profile ? "".concat(capitalize(profile.first_name), " ").concat(capitalize(profile.last_name)) : 'Invalid User';
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Format a profile's initials
|
|
19
|
+
*/
|
|
20
|
+
export var formatInitials = function (profile) {
|
|
21
|
+
return profile ? "".concat(capitalize(profile.first_name).charAt(0), " ").concat(capitalize(profile.last_name).charAt(0)) : '--';
|
|
22
|
+
};
|
|
10
23
|
/**
|
|
11
24
|
* Generate suggested initials for a full name, e.g. "John Doe" will yield "JD".
|
|
12
25
|
*/
|