@thunderid/javascript 0.6.0 → 0.6.1
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/{getScim2Me.d.ts → getUsersMe.d.ts} +10 -10
- package/dist/api/{getScim2Me.d.ts.map → getUsersMe.d.ts.map} +1 -1
- package/dist/api/updateMeProfile.d.ts +6 -6
- package/dist/cjs/index.cjs +166 -426
- package/dist/edge/index.js +165 -422
- package/dist/index.d.ts +3 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +165 -422
- package/dist/models/config.d.ts +6 -7
- package/dist/models/config.d.ts.map +1 -1
- package/dist/models/user.d.ts +0 -2
- package/dist/models/user.d.ts.map +1 -1
- package/dist/utils/generateFlattenedUserProfile.d.ts +4 -47
- package/dist/utils/generateFlattenedUserProfile.d.ts.map +1 -1
- package/dist/utils/getAuthorizeRequestUrlParams.d.ts.map +1 -1
- package/dist/utils/processUsername.d.ts +2 -2
- package/dist/utils/startCase.d.ts +26 -0
- package/dist/utils/startCase.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/api/getSchemas.d.ts +0 -90
- package/dist/api/getSchemas.d.ts.map +0 -1
- package/dist/models/scim2-schema.d.ts +0 -66
- package/dist/models/scim2-schema.d.ts.map +0 -1
- package/dist/utils/flattenUserSchema.d.ts +0 -65
- package/dist/utils/flattenUserSchema.d.ts.map +0 -1
- package/dist/utils/generateUserProfile.d.ts +0 -56
- package/dist/utils/generateUserProfile.d.ts.map +0 -1
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import { User } from '../models/user';
|
|
19
19
|
/**
|
|
20
|
-
* Configuration for the
|
|
20
|
+
* Configuration for the getUsersMe request
|
|
21
21
|
*/
|
|
22
|
-
export interface
|
|
22
|
+
export interface GetUsersMeConfig extends Omit<RequestInit, 'method'> {
|
|
23
23
|
/**
|
|
24
24
|
* The base path of the API endpoint.
|
|
25
25
|
*/
|
|
@@ -35,7 +35,7 @@ export interface GetScim2MeConfig extends Omit<RequestInit, 'method'> {
|
|
|
35
35
|
url?: string;
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
|
-
* Retrieves the user profile information from the specified
|
|
38
|
+
* Retrieves the user profile information from the specified /users/me endpoint.
|
|
39
39
|
*
|
|
40
40
|
* @param config - Request configuration object.
|
|
41
41
|
* @returns A promise that resolves with the user profile information.
|
|
@@ -43,8 +43,8 @@ export interface GetScim2MeConfig extends Omit<RequestInit, 'method'> {
|
|
|
43
43
|
* ```typescript
|
|
44
44
|
* // Using default fetch
|
|
45
45
|
* try {
|
|
46
|
-
* const userProfile = await
|
|
47
|
-
* url: "https://localhost:8090/
|
|
46
|
+
* const userProfile = await getUsersMe({
|
|
47
|
+
* url: "https://localhost:8090/users/me",
|
|
48
48
|
* });
|
|
49
49
|
* console.log(userProfile);
|
|
50
50
|
* } catch (error) {
|
|
@@ -58,8 +58,8 @@ export interface GetScim2MeConfig extends Omit<RequestInit, 'method'> {
|
|
|
58
58
|
* ```typescript
|
|
59
59
|
* // Using custom fetcher (e.g., axios-based httpClient)
|
|
60
60
|
* try {
|
|
61
|
-
* const userProfile = await
|
|
62
|
-
* url: "https://localhost:8090/
|
|
61
|
+
* const userProfile = await getUsersMe({
|
|
62
|
+
* url: "https://localhost:8090/users/me",
|
|
63
63
|
* fetcher: async (url, config) => {
|
|
64
64
|
* const response = await httpClient({
|
|
65
65
|
* url,
|
|
@@ -85,6 +85,6 @@ export interface GetScim2MeConfig extends Omit<RequestInit, 'method'> {
|
|
|
85
85
|
* }
|
|
86
86
|
* ```
|
|
87
87
|
*/
|
|
88
|
-
declare const
|
|
89
|
-
export default
|
|
90
|
-
//# sourceMappingURL=
|
|
88
|
+
declare const getUsersMe: ({ url, baseUrl, fetcher, ...requestConfig }: GetUsersMeConfig) => Promise<User>;
|
|
89
|
+
export default getUsersMe;
|
|
90
|
+
//# sourceMappingURL=getUsersMe.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"getUsersMe.d.ts","sourceRoot":"","sources":["../../src/api/getUsersMe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAC,IAAI,EAAC,MAAM,gBAAgB,CAAC;AAGpC;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC;IACnE;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClE;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,QAAA,MAAM,UAAU,GAAU,6CAA2C,gBAAgB,KAAG,OAAO,CAAC,IAAI,CAgEnG,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -30,7 +30,7 @@ export interface UpdateMeProfileConfig extends Omit<RequestInit, 'method' | 'bod
|
|
|
30
30
|
*/
|
|
31
31
|
fetcher?: (url: string, config: RequestInit) => Promise<Response>;
|
|
32
32
|
/**
|
|
33
|
-
* The value object to patch (
|
|
33
|
+
* The value object to patch (PATCH value)
|
|
34
34
|
*/
|
|
35
35
|
payload: any;
|
|
36
36
|
/**
|
|
@@ -39,7 +39,7 @@ export interface UpdateMeProfileConfig extends Omit<RequestInit, 'method' | 'bod
|
|
|
39
39
|
url?: string;
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
|
-
* Updates the user profile information at the specified
|
|
42
|
+
* Updates the user profile information at the specified /users/me endpoint.
|
|
43
43
|
*
|
|
44
44
|
* @param config - Configuration object with URL, payload and optional request config.
|
|
45
45
|
* @returns A promise that resolves with the updated user profile information.
|
|
@@ -47,8 +47,8 @@ export interface UpdateMeProfileConfig extends Omit<RequestInit, 'method' | 'bod
|
|
|
47
47
|
* ```typescript
|
|
48
48
|
* // Using default fetch
|
|
49
49
|
* await updateMeProfile({
|
|
50
|
-
* url: "https://localhost:8090/
|
|
51
|
-
* payload: {
|
|
50
|
+
* url: "https://localhost:8090/users/me",
|
|
51
|
+
* payload: { mobileNumbers: ["0777933830"] }
|
|
52
52
|
* });
|
|
53
53
|
* ```
|
|
54
54
|
*
|
|
@@ -56,8 +56,8 @@ export interface UpdateMeProfileConfig extends Omit<RequestInit, 'method' | 'bod
|
|
|
56
56
|
* ```typescript
|
|
57
57
|
* // Using custom fetcher (e.g., axios-based httpClient)
|
|
58
58
|
* await updateMeProfile({
|
|
59
|
-
* url: "https://localhost:8090/
|
|
60
|
-
* payload: {
|
|
59
|
+
* url: "https://localhost:8090/users/me",
|
|
60
|
+
* payload: { mobileNumbers: ["0777933830"] },
|
|
61
61
|
* fetcher: async (url, config) => {
|
|
62
62
|
* const response = await httpClient({
|
|
63
63
|
* url,
|