@appsemble/utils 0.35.20 → 0.36.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/README.md +3 -3
- package/api/components/parameters/height.d.ts +2 -0
- package/api/components/parameters/height.js +8 -0
- package/api/components/parameters/index.d.ts +2 -0
- package/api/components/parameters/index.js +2 -0
- package/api/components/parameters/width.d.ts +2 -0
- package/api/components/parameters/width.js +8 -0
- package/api/components/schemas/AppMemberInfo.js +4 -0
- package/api/paths/apps/appId/assets/assetId.js +2 -0
- package/api/paths/apps/appId/auth/email/newEmail.d.ts +2 -0
- package/api/paths/apps/appId/auth/email/newEmail.js +32 -0
- package/api/paths/apps/appId/auth/email/password.d.ts +2 -0
- package/api/paths/apps/appId/auth/email/password.js +35 -0
- package/api/paths/apps/appId/auth/email/resendVerification.js +0 -17
- package/api/paths/apps/appId/auth/email/unverified.d.ts +2 -0
- package/api/paths/apps/appId/auth/email/unverified.js +24 -0
- package/api/paths/index.d.ts +3 -0
- package/api/paths/index.js +6 -0
- package/convertToCsv.js +1 -1
- package/package.json +4 -3
- package/validateStyle.js +1 -1
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#  Appsemble Utilities
|
|
2
2
|
|
|
3
3
|
> Internal utility functions used across multiple Appsemble projects.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@appsemble/utils)
|
|
6
|
-
[](https://gitlab.com/appsemble/appsemble/-/releases/0.36.1)
|
|
7
7
|
[](https://prettier.io)
|
|
8
8
|
|
|
9
9
|
## Table of Contents
|
|
@@ -26,5 +26,5 @@ not guaranteed.
|
|
|
26
26
|
|
|
27
27
|
## License
|
|
28
28
|
|
|
29
|
-
[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.
|
|
29
|
+
[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.36.1/LICENSE.md) ©
|
|
30
30
|
[Appsemble](https://appsemble.com)
|
|
@@ -43,6 +43,10 @@ export const AppMemberInfo = {
|
|
|
43
43
|
description: 'The custom properties of the app member.',
|
|
44
44
|
additionalProperties: true,
|
|
45
45
|
},
|
|
46
|
+
unverifiedEmail: {
|
|
47
|
+
type: 'string',
|
|
48
|
+
description: 'Unverified email of the app member which will replace the main email when verified',
|
|
49
|
+
},
|
|
46
50
|
},
|
|
47
51
|
};
|
|
48
52
|
//# sourceMappingURL=AppMemberInfo.js.map
|
|
@@ -2,6 +2,8 @@ export const pathItems = {
|
|
|
2
2
|
parameters: [
|
|
3
3
|
{ $ref: '#/components/parameters/appId' },
|
|
4
4
|
{ $ref: '#/components/parameters/assetId' },
|
|
5
|
+
{ $ref: '#/components/parameters/width' },
|
|
6
|
+
{ $ref: '#/components/parameters/height' },
|
|
5
7
|
],
|
|
6
8
|
get: {
|
|
7
9
|
tags: ['common', 'app', 'asset'],
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export const pathItems = {
|
|
2
|
+
parameters: [{ $ref: '#/components/parameters/appId' }],
|
|
3
|
+
post: {
|
|
4
|
+
tags: ['app', 'member', 'email', 'auth'],
|
|
5
|
+
operationId: 'requestAppMemberEmailUpdate',
|
|
6
|
+
description: 'Update the email address of an app member',
|
|
7
|
+
responses: {
|
|
8
|
+
200: {
|
|
9
|
+
description: 'The updated app member',
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
requestBody: {
|
|
13
|
+
description: '',
|
|
14
|
+
required: true,
|
|
15
|
+
content: {
|
|
16
|
+
'application/json': {
|
|
17
|
+
schema: {
|
|
18
|
+
type: 'object',
|
|
19
|
+
properties: {
|
|
20
|
+
email: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
format: 'email',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
security: [{ app: ['email'] }],
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=newEmail.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export const pathItems = {
|
|
2
|
+
parameters: [{ $ref: '#/components/parameters/appId' }],
|
|
3
|
+
patch: {
|
|
4
|
+
tags: ['app', 'auth', 'email'],
|
|
5
|
+
description: 'Patch password of the app member',
|
|
6
|
+
operationId: 'patchAppMemberPassword',
|
|
7
|
+
responses: {
|
|
8
|
+
200: {
|
|
9
|
+
description: 'Successfully updated password',
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
requestBody: {
|
|
13
|
+
required: true,
|
|
14
|
+
content: {
|
|
15
|
+
'application/json': {
|
|
16
|
+
schema: {
|
|
17
|
+
type: 'object',
|
|
18
|
+
required: ['newPassword', 'currentPassword'],
|
|
19
|
+
properties: {
|
|
20
|
+
newPassword: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
minLength: 8,
|
|
23
|
+
},
|
|
24
|
+
currentPassword: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
security: [{ app: [] }, {}],
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=password.js.map
|
|
@@ -4,23 +4,6 @@ export const pathItems = {
|
|
|
4
4
|
tags: ['app', 'auth', 'email'],
|
|
5
5
|
description: 'Resend the verification code for a registered email.',
|
|
6
6
|
operationId: 'resendAppMemberEmailVerification',
|
|
7
|
-
requestBody: {
|
|
8
|
-
required: true,
|
|
9
|
-
content: {
|
|
10
|
-
'application/json': {
|
|
11
|
-
schema: {
|
|
12
|
-
type: 'object',
|
|
13
|
-
required: ['email'],
|
|
14
|
-
properties: {
|
|
15
|
-
email: {
|
|
16
|
-
type: 'string',
|
|
17
|
-
format: 'email',
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
7
|
responses: {
|
|
25
8
|
204: {
|
|
26
9
|
description: 'The verification email was sent if an account was found in the database.',
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export const pathItems = {
|
|
2
|
+
parameters: [{ $ref: '#/components/parameters/appId' }],
|
|
3
|
+
delete: {
|
|
4
|
+
parameters: [
|
|
5
|
+
{
|
|
6
|
+
name: 'email',
|
|
7
|
+
in: 'query',
|
|
8
|
+
description: 'Emails to be removed',
|
|
9
|
+
required: true,
|
|
10
|
+
schema: { type: 'string' },
|
|
11
|
+
},
|
|
12
|
+
],
|
|
13
|
+
tags: ['delete', 'app', 'email', 'auth'],
|
|
14
|
+
description: '',
|
|
15
|
+
operationId: 'deleteCurrentAppMemberUnverifiedEmail',
|
|
16
|
+
security: [{ app: ['email'] }],
|
|
17
|
+
responses: {
|
|
18
|
+
204: {
|
|
19
|
+
description: 'Successfully removed email',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=unverified.js.map
|
package/api/paths/index.d.ts
CHANGED
|
@@ -85,10 +85,13 @@ export declare const paths: {
|
|
|
85
85
|
'/api/apps/{appId}': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
86
86
|
'/api/apps/{appId}/auth/email/login': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
87
87
|
'/api/apps/{appId}/auth/email/register': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
88
|
+
'/api/apps/{appId}/auth/email/password': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
88
89
|
'/api/apps/{appId}/auth/email/resend-verification': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
89
90
|
'/api/apps/{appId}/auth/email/request-password-reset': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
91
|
+
'/api/apps/{appId}/auth/email/new-email': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
90
92
|
'/api/apps/{appId}/auth/email/reset-password': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
91
93
|
'/api/apps/{appId}/auth/email/verify': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
94
|
+
'/api/apps/{appId}/auth/email/unverified': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
92
95
|
'/api/apps': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
93
96
|
'/api/app-templates': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
94
97
|
'/api/auth/email/login': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
package/api/paths/index.js
CHANGED
|
@@ -10,10 +10,13 @@ import { pathItems as appsAppIdAssetsAssetId } from './apps/appId/assets/assetId
|
|
|
10
10
|
import { pathItems as appsAppIdAssets$Count } from './apps/appId/assets/count.js';
|
|
11
11
|
import { pathItems as appsAppIdAssets } from './apps/appId/assets.js';
|
|
12
12
|
import { pathItems as appsAppIdAuthEmailLogin } from './apps/appId/auth/email/login.js';
|
|
13
|
+
import { pathItems as appsAppIdAuthEmailNewEmail } from './apps/appId/auth/email/newEmail.js';
|
|
14
|
+
import { pathItems as appsAppIdAuthEmailPassword } from './apps/appId/auth/email/password.js';
|
|
13
15
|
import { pathItems as appsAppIdAuthEmailRegister } from './apps/appId/auth/email/register.js';
|
|
14
16
|
import { pathItems as appsAppIdAuthEmailRequestPasswordReset } from './apps/appId/auth/email/requestResetPassword.js';
|
|
15
17
|
import { pathItems as appsAppIdAuthEmailResendVerification } from './apps/appId/auth/email/resendVerification.js';
|
|
16
18
|
import { pathItems as appsAppIdAuthEmailResetPassword } from './apps/appId/auth/email/resetPassword.js';
|
|
19
|
+
import { pathItems as appsAppIdAuthEmailUnverified } from './apps/appId/auth/email/unverified.js';
|
|
17
20
|
import { pathItems as appsAppIdAuthEmailVerify } from './apps/appId/auth/email/verify.js';
|
|
18
21
|
import { pathItems as appsAppIdBroadcast } from './apps/appId/broadcast.js';
|
|
19
22
|
import { pathItems as appsAppIdClonableAssets } from './apps/appId/clonable-assets.js';
|
|
@@ -248,10 +251,13 @@ export const paths = {
|
|
|
248
251
|
'/api/apps/{appId}': appsAppId,
|
|
249
252
|
'/api/apps/{appId}/auth/email/login': appsAppIdAuthEmailLogin,
|
|
250
253
|
'/api/apps/{appId}/auth/email/register': appsAppIdAuthEmailRegister,
|
|
254
|
+
'/api/apps/{appId}/auth/email/password': appsAppIdAuthEmailPassword,
|
|
251
255
|
'/api/apps/{appId}/auth/email/resend-verification': appsAppIdAuthEmailResendVerification,
|
|
252
256
|
'/api/apps/{appId}/auth/email/request-password-reset': appsAppIdAuthEmailRequestPasswordReset,
|
|
257
|
+
'/api/apps/{appId}/auth/email/new-email': appsAppIdAuthEmailNewEmail,
|
|
253
258
|
'/api/apps/{appId}/auth/email/reset-password': appsAppIdAuthEmailResetPassword,
|
|
254
259
|
'/api/apps/{appId}/auth/email/verify': appsAppIdAuthEmailVerify,
|
|
260
|
+
'/api/apps/{appId}/auth/email/unverified': appsAppIdAuthEmailUnverified,
|
|
255
261
|
'/api/apps': apps,
|
|
256
262
|
'/api/app-templates': appTemplates,
|
|
257
263
|
'/api/auth/email/login': authEmailLogin,
|
package/convertToCsv.js
CHANGED
|
@@ -23,7 +23,7 @@ export function convertToCsv(body) {
|
|
|
23
23
|
}
|
|
24
24
|
const data = Array.isArray(body) ? body : [body];
|
|
25
25
|
if (data.length === 0) {
|
|
26
|
-
// eslint-disable-next-line @typescript-eslint/
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
27
27
|
// @ts-ignore 2322 null is not assignable to type (strictNullChecks)
|
|
28
28
|
return null;
|
|
29
29
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appsemble/utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.1",
|
|
4
4
|
"description": "Utility functions used in Appsemble internally",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"app",
|
|
@@ -39,8 +39,9 @@
|
|
|
39
39
|
"test": "vitest"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@appsemble/lang-sdk": "0.
|
|
43
|
-
"@appsemble/types": "0.
|
|
42
|
+
"@appsemble/lang-sdk": "0.36.1",
|
|
43
|
+
"@appsemble/types": "0.36.1",
|
|
44
|
+
"@fortawesome/fontawesome-common-types": "^6.0.0",
|
|
44
45
|
"axios": "^1.0.0",
|
|
45
46
|
"langmap": "^0.0.16",
|
|
46
47
|
"openapi-types": "^12.0.0",
|
package/validateStyle.js
CHANGED
|
@@ -7,7 +7,7 @@ export class StyleValidationError extends Error {
|
|
|
7
7
|
}
|
|
8
8
|
export function validateStyle(css) {
|
|
9
9
|
if (!css) {
|
|
10
|
-
// eslint-disable-next-line @typescript-eslint/
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
11
11
|
// @ts-ignore 2322 null is not assignable to type (strictNullChecks)
|
|
12
12
|
return null;
|
|
13
13
|
}
|