@levo-so/core 0.1.4 → 0.1.7
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/chunk-WOD3VIYR.js +38 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/plugins/LevoAudience.d.ts.map +1 -1
- package/dist/plugins/LevoAudience.js +4 -3
- package/dist/plugins/LevoMembership.d.ts +4 -9
- package/dist/plugins/LevoMembership.d.ts.map +1 -1
- package/dist/plugins/LevoMembership.js +33 -75
- package/dist/types/query.d.ts +0 -12
- package/dist/types/query.d.ts.map +1 -1
- package/dist/utils/LevoError.d.ts +3 -3
- package/dist/utils/LevoError.d.ts.map +1 -1
- package/dist/utils/getLevoError.d.ts +3 -0
- package/dist/utils/getLevoError.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { WretchError } from 'wretch/resolver';
|
|
2
|
+
|
|
3
|
+
// src/utils/LevoError.ts
|
|
4
|
+
var LevoError = class extends Error {
|
|
5
|
+
code;
|
|
6
|
+
title;
|
|
7
|
+
message;
|
|
8
|
+
constructor(data) {
|
|
9
|
+
super(data.message || data.description);
|
|
10
|
+
this.name = "LevoMembershipError";
|
|
11
|
+
this.code = data.code;
|
|
12
|
+
this.message = data.message || data.description;
|
|
13
|
+
this.title = data.title;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
var getLevoError = (error) => {
|
|
17
|
+
if (error instanceof WretchError) {
|
|
18
|
+
const errorResponse = error?.json;
|
|
19
|
+
if (typeof errorResponse === "object" && errorResponse?.content) {
|
|
20
|
+
const errorMessage = errorResponse?.content;
|
|
21
|
+
return new LevoError(errorMessage);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
let displayMessage = error?.message || "Something unexpected happened.";
|
|
25
|
+
switch (error?.message) {
|
|
26
|
+
case "Network Error":
|
|
27
|
+
displayMessage = "Couldn't connect to our servers.";
|
|
28
|
+
break;
|
|
29
|
+
}
|
|
30
|
+
return new LevoError({
|
|
31
|
+
status: 500,
|
|
32
|
+
title: "Network Error",
|
|
33
|
+
description: displayMessage,
|
|
34
|
+
code: "UNKNOWN_ERROR"
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export { LevoError, getLevoError };
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LevoAudience.d.ts","sourceRoot":"","sources":["../../src/plugins/LevoAudience.ts"],"names":[],"mappings":"AAEA,OAAO,EAAa,KAAK,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"LevoAudience.d.ts","sourceRoot":"","sources":["../../src/plugins/LevoAudience.ts"],"names":[],"mappings":"AAEA,OAAO,EAAa,KAAK,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,qBAAa,YAAa,SAAQ,UAAU;;IAC1C,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAQ;IAK1C,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG;IASxB,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC,UAAU;IA6FnD,WAAW;;;;;IAmEX,qBAAqB;IAqBf,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,CAAC,UAAU;IAM/D,KAAK,4BAGF;QAAE,UAAU,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC;QAAC,MAAM,EAAE,WAAW,CAAA;KAAE,UAO/D;CACH"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getLevoError } from '../chunk-WOD3VIYR.js';
|
|
1
2
|
import { LevoPlugin } from '../chunk-QJSKNLTV.js';
|
|
2
3
|
import { onUserActivity } from '@analytics/activity-utils';
|
|
3
4
|
import { getVisitorSource } from '@analytics/visitor-source';
|
|
@@ -242,7 +243,7 @@ var LevoAudience = class extends LevoPlugin {
|
|
|
242
243
|
identifier: payload.properties.identifier || properties.id,
|
|
243
244
|
workspace_id: this.client.workspace
|
|
244
245
|
}).catch((e) => {
|
|
245
|
-
|
|
246
|
+
return getLevoError(e);
|
|
246
247
|
});
|
|
247
248
|
},
|
|
248
249
|
page: ({ payload }) => {
|
|
@@ -265,7 +266,7 @@ var LevoAudience = class extends LevoPlugin {
|
|
|
265
266
|
identifier: payload.properties.identifier,
|
|
266
267
|
workspace_id: this.client.workspace
|
|
267
268
|
}).catch((e) => {
|
|
268
|
-
|
|
269
|
+
return getLevoError(e);
|
|
269
270
|
});
|
|
270
271
|
},
|
|
271
272
|
identify: ({ payload }) => {
|
|
@@ -283,7 +284,7 @@ var LevoAudience = class extends LevoPlugin {
|
|
|
283
284
|
workspace_id: this.client.workspace
|
|
284
285
|
}
|
|
285
286
|
).catch((e) => {
|
|
286
|
-
|
|
287
|
+
return getLevoError(e);
|
|
287
288
|
});
|
|
288
289
|
}
|
|
289
290
|
};
|
|
@@ -2,11 +2,6 @@ import type { WretchOptions } from "wretch";
|
|
|
2
2
|
import type { ILevoMembership } from "../types/membership";
|
|
3
3
|
import { LevoPlugin } from "./LevoPlugin";
|
|
4
4
|
export declare class LevoMembership<T = ILevoMembership.Account> extends LevoPlugin {
|
|
5
|
-
#private;
|
|
6
|
-
/**
|
|
7
|
-
* The Account of the Currently Logged in Member
|
|
8
|
-
*/
|
|
9
|
-
account: T | null;
|
|
10
5
|
/**
|
|
11
6
|
* Get the list of URL for OAuth providers to redirect to
|
|
12
7
|
* This can be used in the OAuth Buttons like "Continue with Google" etc.
|
|
@@ -23,14 +18,14 @@ export declare class LevoMembership<T = ILevoMembership.Account> extends LevoPlu
|
|
|
23
18
|
* Sign out the current user's account
|
|
24
19
|
* @returns T | null
|
|
25
20
|
*/
|
|
26
|
-
signOut(options?: WretchOptions): Promise<T
|
|
21
|
+
signOut(options?: WretchOptions): Promise<T>;
|
|
27
22
|
/**
|
|
28
23
|
* Get the current user's account
|
|
29
24
|
* @returns T | null
|
|
30
25
|
*/
|
|
31
|
-
getMe(options?: WretchOptions): Promise<T
|
|
32
|
-
updateMe
|
|
33
|
-
isLoggedIn(options?: WretchOptions): Promise<
|
|
26
|
+
getMe(options?: WretchOptions): Promise<T>;
|
|
27
|
+
updateMe<D = ILevoMembership.Request.UpdateMe>(data: D, options?: WretchOptions): Promise<T>;
|
|
28
|
+
isLoggedIn(options?: WretchOptions): Promise<T | null>;
|
|
34
29
|
requestMagicLink(data: ILevoMembership.Request.RequestMagicLink, options?: WretchOptions): Promise<Pick<ILevoMembership.Otp, "_id" | "content">>;
|
|
35
30
|
requestOtp(data: ILevoMembership.Request.RequestOtp, options?: WretchOptions): Promise<Pick<ILevoMembership.Otp, "_id" | "content">>;
|
|
36
31
|
signInWithOtp(data: ILevoMembership.Request.SignInWithOtp, options?: WretchOptions): Promise<T | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LevoMembership.d.ts","sourceRoot":"","sources":["../../src/plugins/LevoMembership.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAM5C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"LevoMembership.d.ts","sourceRoot":"","sources":["../../src/plugins/LevoMembership.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAM5C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;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kBAAkB,EAChD,OAAO,GAAE,aAAkB,GAC1B,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;CAarB"}
|
|
@@ -1,29 +1,8 @@
|
|
|
1
1
|
import { LevoOAuthProviderList } from '../chunk-ZLLCLSGE.js';
|
|
2
2
|
import { LevoPlugin } from '../chunk-QJSKNLTV.js';
|
|
3
3
|
|
|
4
|
-
// src/utils/LevoError.ts
|
|
5
|
-
var LevoError = class extends Error {
|
|
6
|
-
code;
|
|
7
|
-
title;
|
|
8
|
-
message;
|
|
9
|
-
constructor(data) {
|
|
10
|
-
super(data.message || data.description);
|
|
11
|
-
this.name = "LevoMembershipError";
|
|
12
|
-
this.code = data.code;
|
|
13
|
-
this.message = data.message || data.description;
|
|
14
|
-
this.title = data.title;
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
|
|
18
4
|
// src/plugins/LevoMembership.ts
|
|
19
5
|
var LevoMembership = class extends LevoPlugin {
|
|
20
|
-
/**
|
|
21
|
-
* The Account of the Currently Logged in Member
|
|
22
|
-
*/
|
|
23
|
-
account = null;
|
|
24
|
-
#stall = (body) => {
|
|
25
|
-
throw new LevoError(body.content);
|
|
26
|
-
};
|
|
27
6
|
/**
|
|
28
7
|
* Get the list of URL for OAuth providers to redirect to
|
|
29
8
|
* This can be used in the OAuth Buttons like "Continue with Google" etc.
|
|
@@ -37,12 +16,12 @@ var LevoMembership = class extends LevoPlugin {
|
|
|
37
16
|
*/
|
|
38
17
|
async getOAuthURL(options = {}) {
|
|
39
18
|
try {
|
|
40
|
-
const response = await this.client.fetch.url("/v1/membership/auth/oauth/get-redirect-url").options(options).get().json()
|
|
19
|
+
const response = await this.client.fetch.url("/v1/membership/auth/oauth/get-redirect-url").options(options).get().json();
|
|
41
20
|
const {
|
|
42
21
|
content: { data: result }
|
|
43
22
|
} = response;
|
|
44
23
|
const providers = Object.keys(result);
|
|
45
|
-
if (window) {
|
|
24
|
+
if (typeof window !== "undefined") {
|
|
46
25
|
for (const provider of providers) {
|
|
47
26
|
const raw_url = result[provider];
|
|
48
27
|
if (raw_url) {
|
|
@@ -57,104 +36,83 @@ var LevoMembership = class extends LevoPlugin {
|
|
|
57
36
|
}
|
|
58
37
|
}
|
|
59
38
|
return result;
|
|
60
|
-
} catch (
|
|
61
|
-
|
|
39
|
+
} catch (_) {
|
|
40
|
+
return LevoOAuthProviderList.reduce((acc, provider) => {
|
|
41
|
+
acc[provider] = null;
|
|
42
|
+
return acc;
|
|
43
|
+
}, {});
|
|
62
44
|
}
|
|
63
|
-
return LevoOAuthProviderList.reduce((acc, provider) => {
|
|
64
|
-
acc[provider] = null;
|
|
65
|
-
return acc;
|
|
66
|
-
}, {});
|
|
67
45
|
}
|
|
68
46
|
/**
|
|
69
47
|
* Sign out the current user's account
|
|
70
48
|
* @returns T | null
|
|
71
49
|
*/
|
|
72
50
|
async signOut(options = {}) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
if (result) {
|
|
79
|
-
this.account = null;
|
|
80
|
-
}
|
|
81
|
-
return result;
|
|
82
|
-
} catch (error) {
|
|
83
|
-
console.error(error);
|
|
84
|
-
}
|
|
85
|
-
return null;
|
|
51
|
+
const response = await this.client.fetch.url("/v1/membership/auth/sign-out").options(options).post("").json();
|
|
52
|
+
const {
|
|
53
|
+
content: { data: result }
|
|
54
|
+
} = response;
|
|
55
|
+
return result;
|
|
86
56
|
}
|
|
87
57
|
/**
|
|
88
58
|
* Get the current user's account
|
|
89
59
|
* @returns T | null
|
|
90
60
|
*/
|
|
91
61
|
async getMe(options = {}) {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
if (result) {
|
|
98
|
-
this.account = result;
|
|
99
|
-
}
|
|
100
|
-
return result;
|
|
101
|
-
} catch (error) {
|
|
102
|
-
console.error(error);
|
|
103
|
-
}
|
|
104
|
-
return null;
|
|
62
|
+
const response = await this.client.fetch.url("/v1/membership/auth/get-me").options(options).get().json();
|
|
63
|
+
const {
|
|
64
|
+
content: { data: result }
|
|
65
|
+
} = response;
|
|
66
|
+
return result;
|
|
105
67
|
}
|
|
106
68
|
async updateMe(data, options = {}) {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
if (result) {
|
|
113
|
-
this.account = result;
|
|
114
|
-
}
|
|
115
|
-
return result;
|
|
116
|
-
} catch (error) {
|
|
117
|
-
console.error(error);
|
|
118
|
-
}
|
|
119
|
-
return null;
|
|
69
|
+
const response = await this.client.fetch.url("/v1/membership/auth/update-me").options(options).put(data).json();
|
|
70
|
+
const {
|
|
71
|
+
content: { data: result }
|
|
72
|
+
} = response;
|
|
73
|
+
return result;
|
|
120
74
|
}
|
|
121
75
|
async isLoggedIn(options = {}) {
|
|
122
|
-
|
|
123
|
-
|
|
76
|
+
try {
|
|
77
|
+
const account = await this.getMe(options);
|
|
78
|
+
return account;
|
|
79
|
+
} catch (_) {
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
124
82
|
}
|
|
125
83
|
async requestMagicLink(data, options = {}) {
|
|
126
84
|
if (typeof window !== "undefined" && !data.redirect_uri) {
|
|
127
85
|
data.redirect_uri = window.location.href;
|
|
128
86
|
}
|
|
129
|
-
const response = await this.client.fetch.url("/v1/membership/auth/request-magic-link").options(options).post(data).json()
|
|
87
|
+
const response = await this.client.fetch.url("/v1/membership/auth/request-magic-link").options(options).post(data).json();
|
|
130
88
|
const {
|
|
131
89
|
content: { data: result }
|
|
132
90
|
} = response;
|
|
133
91
|
return result;
|
|
134
92
|
}
|
|
135
93
|
async requestOtp(data, options = {}) {
|
|
136
|
-
const response = await this.client.fetch.url("/v1/membership/auth/request-otp").options(options).post(data).json()
|
|
94
|
+
const response = await this.client.fetch.url("/v1/membership/auth/request-otp").options(options).post(data).json();
|
|
137
95
|
const {
|
|
138
96
|
content: { data: result }
|
|
139
97
|
} = response;
|
|
140
98
|
return result;
|
|
141
99
|
}
|
|
142
100
|
async signInWithOtp(data, options = {}) {
|
|
143
|
-
const response = await this.client.fetch.url("/v1/membership/auth/signin-with-otp").options(options).post(data).json()
|
|
101
|
+
const response = await this.client.fetch.url("/v1/membership/auth/signin-with-otp").options(options).post(data).json();
|
|
144
102
|
const {
|
|
145
103
|
content: { data: result }
|
|
146
104
|
} = response;
|
|
147
105
|
return result;
|
|
148
106
|
}
|
|
149
107
|
async signInWithPassword(data, options = {}) {
|
|
150
|
-
const response = await this.client.fetch.url("/v1/membership/auth/signin-with-password").options(options).post(data).json()
|
|
108
|
+
const response = await this.client.fetch.url("/v1/membership/auth/signin-with-password").options(options).post(data).json();
|
|
151
109
|
const {
|
|
152
110
|
content: { data: result }
|
|
153
111
|
} = response;
|
|
154
112
|
return result;
|
|
155
113
|
}
|
|
156
114
|
async signUpWithPassword(data, options = {}) {
|
|
157
|
-
const response = await this.client.fetch.url("/v1/membership/auth/signup-with-password").options(options).post(data).json()
|
|
115
|
+
const response = await this.client.fetch.url("/v1/membership/auth/signup-with-password").options(options).post(data).json();
|
|
158
116
|
const {
|
|
159
117
|
content: { data: result }
|
|
160
118
|
} = response;
|
package/dist/types/query.d.ts
CHANGED
|
@@ -39,16 +39,4 @@ export type IErrorParams = {
|
|
|
39
39
|
message: string;
|
|
40
40
|
param: string;
|
|
41
41
|
};
|
|
42
|
-
export interface IErrorMessage {
|
|
43
|
-
status: boolean;
|
|
44
|
-
content: {
|
|
45
|
-
status: number;
|
|
46
|
-
code: string;
|
|
47
|
-
title: string;
|
|
48
|
-
description: string;
|
|
49
|
-
type: string;
|
|
50
|
-
"request-id"?: string;
|
|
51
|
-
errors?: IErrorParams[];
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
42
|
//# sourceMappingURL=query.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/types/query.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACp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AAC;AAE9C,MAAM,MAAM,YAAY,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export type ILevoError = {
|
|
2
|
-
message: string;
|
|
3
2
|
description: string;
|
|
4
3
|
code: string;
|
|
5
|
-
status:
|
|
4
|
+
status: number;
|
|
6
5
|
title: string;
|
|
7
|
-
|
|
6
|
+
message?: string;
|
|
7
|
+
type?: string;
|
|
8
8
|
};
|
|
9
9
|
export declare class LevoError extends Error {
|
|
10
10
|
code: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LevoError.d.ts","sourceRoot":"","sources":["../../src/utils/LevoError.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG;IACvB,
|
|
1
|
+
{"version":3,"file":"LevoError.d.ts","sourceRoot":"","sources":["../../src/utils/LevoError.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,qBAAa,SAAU,SAAQ,KAAK;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;gBAEJ,IAAI,EAAE,UAAU;CAQ7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getLevoError.d.ts","sourceRoot":"","sources":["../../src/utils/getLevoError.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,SAAS,EAAE,MAAM,aAAa,CAAC;AAEzD,eAAO,MAAM,YAAY,UAAW,GAAG,KAAG,SA4BzC,CAAC"}
|