@sneat/auth-models 0.1.2 → 0.1.4

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.
@@ -0,0 +1,4 @@
1
+ export * from './lib/avatar';
2
+ export * from './lib/user';
3
+ export * from './lib/person-names';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/auth/models/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC","sourcesContent":["export * from './lib/avatar';\nexport * from './lib/user';\nexport * from './lib/person-names';\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=avatar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar.js","sourceRoot":"","sources":["../../../../../../libs/auth/models/src/lib/avatar.ts"],"names":[],"mappings":"","sourcesContent":["export interface IAvatar {\n readonly gravatar?: string;\n readonly external?: {\n readonly provider?: string;\n readonly url?: string;\n };\n}\n"]}
@@ -0,0 +1,75 @@
1
+ // TODO: Find a proper "non-auth" library for this file
2
+ export function mustHaveAtLeastOneName(names) {
3
+ if (!names) {
4
+ throw new Error('Names are required');
5
+ }
6
+ if (!names.firstName &&
7
+ !names.lastName &&
8
+ !names.middleName &&
9
+ !names.nickName &&
10
+ !names.fullName) {
11
+ throw new Error('At least one name is required');
12
+ }
13
+ }
14
+ export function namesToUrlParams(names) {
15
+ if (!names) {
16
+ return '';
17
+ }
18
+ const { firstName, lastName, middleName, nickName, fullName } = names;
19
+ const params = [];
20
+ if (firstName) {
21
+ params.push(`firstName=${encodeURIComponent(firstName)}`);
22
+ }
23
+ if (lastName) {
24
+ params.push(`lastName=${encodeURIComponent(lastName)}`);
25
+ }
26
+ if (middleName) {
27
+ params.push(`middleName=${encodeURIComponent(middleName)}`);
28
+ }
29
+ if (nickName) {
30
+ params.push(`nickName=${encodeURIComponent(nickName)}`);
31
+ }
32
+ if (fullName && fullName !== `${firstName} ${lastName}`) {
33
+ params.push(`fullName=${encodeURIComponent(fullName)}`);
34
+ }
35
+ return params.join('&');
36
+ }
37
+ export function isNameEmpty(n) {
38
+ // noinspection UnnecessaryLocalVariableJS
39
+ const result = !n ||
40
+ (!n.fullName?.trim() &&
41
+ !n.firstName?.trim() &&
42
+ !n.lastName?.trim() &&
43
+ !n.middleName?.trim() &&
44
+ !n.nickName?.trim());
45
+ return result;
46
+ }
47
+ export function trimNames(n) {
48
+ const first = n.firstName?.trim(), middle = n.middleName?.trim(), last = n.lastName?.trim(), full = n.fullName?.trim();
49
+ if (first !== n?.firstName ||
50
+ last !== n?.lastName ||
51
+ middle != n.middleName ||
52
+ full != n.fullName) {
53
+ n = {
54
+ firstName: first,
55
+ middleName: middle,
56
+ lastName: last,
57
+ fullName: full,
58
+ };
59
+ }
60
+ return n;
61
+ }
62
+ export function getFullName(n) {
63
+ if (n.fullName) {
64
+ return n.fullName;
65
+ }
66
+ return [
67
+ n.firstName,
68
+ n.middleName,
69
+ n.lastName,
70
+ n.nickName ? `(${n.nickName})` : '',
71
+ ]
72
+ .filter((v) => !!v)
73
+ .join(' ');
74
+ }
75
+ //# sourceMappingURL=person-names.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"person-names.js","sourceRoot":"","sources":["../../../../../../libs/auth/models/src/lib/person-names.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAUvD,MAAM,UAAU,sBAAsB,CAAC,KAAoB;IACzD,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;IACxC,CAAC;IACD,IACE,CAAC,KAAK,CAAC,SAAS;QAChB,CAAC,KAAK,CAAC,QAAQ;QACf,CAAC,KAAK,CAAC,UAAU;QACjB,CAAC,KAAK,CAAC,QAAQ;QACf,CAAC,KAAK,CAAC,QAAQ,EACf,CAAC;QACD,MAAM,IAAI,KA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: Find a proper \"non-auth\" library for this file\n\nexport interface IPersonNames {\n readonly firstName?: string;\n readonly lastName?: string;\n readonly middleName?: string;\n readonly nickName?: string;\n readonly fullName?: string;\n}\n\nexport function mustHaveAtLeastOneName(names?: IPersonNames): void {\n if (!names) {\n throw new Error('Names are required');\n }\n if (\n !names.firstName &&\n !names.lastName &&\n !names.middleName &&\n !names.nickName &&\n !names.fullName\n ) {\n throw new Error('At least one name is required');\n }\n}\n\nexport function namesToUrlParams(names?: IPersonNames): string {\n if (!names) {\n return '';\n }\n const { firstName, lastName, middleName, nickName, fullName } = names;\n const params: string[] = [];\n if (firstName) {\n params.push(`firstName=${encodeURIComponent(firstName)}`);\n }\n if (lastName) {\n params.push(`lastName=${encodeURIComponent(lastName)}`);\n }\n if (middleName) {\n params.push(`middleName=${encodeURIComponent(middleName)}`);\n }\n if (nickName) {\n params.push(`nickName=${encodeURIComponent(nickName)}`);\n }\n if (fullName && fullName !== `${firstName} ${lastName}`) {\n params.push(`fullName=${encodeURIComponent(fullName)}`);\n }\n return params.join('&');\n}\n\nexport function isNameEmpty(n?: IPersonNames): boolean {\n // noinspection UnnecessaryLocalVariableJS\n const result =\n !n ||\n (!n.fullName?.trim() &&\n !n.firstName?.trim() &&\n !n.lastName?.trim() &&\n !n.middleName?.trim() &&\n !n.nickName?.trim());\n return result;\n}\n\nexport function trimNames(n: IPersonNames): IPersonNames {\n const first = n.firstName?.trim(),\n middle = n.middleName?.trim(),\n last = n.lastName?.trim(),\n full = n.fullName?.trim();\n if (\n first !== n?.firstName ||\n last !== n?.lastName ||\n middle != n.middleName ||\n full != n.fullName\n ) {\n n = {\n firstName: first,\n middleName: middle,\n lastName: last,\n fullName: full,\n };\n }\n return n;\n}\n\nexport function getFullName(n: IPersonNames): string {\n if (n.fullName) {\n return n.fullName;\n }\n return [\n n.firstName,\n n.middleName,\n n.lastName,\n n.nickName ? `(${n.nickName})` : '',\n ]\n .filter((v) => !!v)\n .join(' ');\n}\n"]}
@@ -0,0 +1,9 @@
1
+ export var SpaceMemberTypeEnum;
2
+ (function (SpaceMemberTypeEnum) {
3
+ SpaceMemberTypeEnum["creator"] = "creator";
4
+ SpaceMemberTypeEnum["member"] = "member";
5
+ SpaceMemberTypeEnum["pet"] = "pet";
6
+ SpaceMemberTypeEnum["pupil"] = "pupil";
7
+ SpaceMemberTypeEnum["staff"] = "staff";
8
+ })(SpaceMemberTypeEnum || (SpaceMemberTypeEnum = {}));
9
+ //# sourceMappingURL=user.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.js","sourceRoot":"","sources":["../../../../../../libs/auth/models/src/lib/user.ts"],"names":[],"mappings":"AAkBA,MAAM,CAAN,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,wCAAiB,CAAA;IACjB,kCAAW,CAAA;IACX,sCAAe,CAAA;IACf,sCAAe,CAAA;AACjB,CAAC,EANW,mBAAmB,KAAnB,mBAAmB,QAM9B","sourcesContent":["import { EnumAsUnionOfKeys, SpaceType } from '@sneat/core';\nimport { IAvatar } from './avatar';\nimport { IPersonNames } from './person-names';\n\n// Does not contain an ID as it's a key.\n// Use IRecord<IUserRecord> to keep record paired with ID\nexport interface IUserRecord {\n readonly accounts?: string[];\n readonly title: string;\n readonly countryID?: string;\n readonly email?: string;\n readonly emailIsVerified?: boolean;\n readonly avatar?: IAvatar;\n readonly spaceIDs?: readonly string[];\n readonly spaces?: Record<string, IUserSpaceBrief>;\n readonly names?: IPersonNames;\n}\n\nexport enum SpaceMemberTypeEnum {\n creator = 'creator',\n member = 'member',\n pet = 'pet',\n pupil = 'pupil',\n staff = 'staff',\n}\n\nexport type SpaceMemberType = EnumAsUnionOfKeys<typeof SpaceMemberTypeEnum>;\n\nexport interface IUserSpaceBrief {\n readonly title: string;\n readonly type: SpaceType;\n readonly roles: string[];\n readonly userContactID: string;\n}\n"]}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
5
+ //# sourceMappingURL=sneat-auth-models.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sneat-auth-models.js","sourceRoot":"","sources":["../../../../../libs/auth/models/src/sneat-auth-models.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,SAAS,CAAC","sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"]}
@@ -0,0 +1,7 @@
1
+ export interface IAvatar {
2
+ readonly gravatar?: string;
3
+ readonly external?: {
4
+ readonly provider?: string;
5
+ readonly url?: string;
6
+ };
7
+ }
@@ -0,0 +1,12 @@
1
+ export interface IPersonNames {
2
+ readonly firstName?: string;
3
+ readonly lastName?: string;
4
+ readonly middleName?: string;
5
+ readonly nickName?: string;
6
+ readonly fullName?: string;
7
+ }
8
+ export declare function mustHaveAtLeastOneName(names?: IPersonNames): void;
9
+ export declare function namesToUrlParams(names?: IPersonNames): string;
10
+ export declare function isNameEmpty(n?: IPersonNames): boolean;
11
+ export declare function trimNames(n: IPersonNames): IPersonNames;
12
+ export declare function getFullName(n: IPersonNames): string;
package/lib/user.d.ts ADDED
@@ -0,0 +1,28 @@
1
+ import { EnumAsUnionOfKeys, SpaceType } from '@sneat/core';
2
+ import { IAvatar } from './avatar';
3
+ import { IPersonNames } from './person-names';
4
+ export interface IUserRecord {
5
+ readonly accounts?: string[];
6
+ readonly title: string;
7
+ readonly countryID?: string;
8
+ readonly email?: string;
9
+ readonly emailIsVerified?: boolean;
10
+ readonly avatar?: IAvatar;
11
+ readonly spaceIDs?: readonly string[];
12
+ readonly spaces?: Record<string, IUserSpaceBrief>;
13
+ readonly names?: IPersonNames;
14
+ }
15
+ export declare enum SpaceMemberTypeEnum {
16
+ creator = "creator",
17
+ member = "member",
18
+ pet = "pet",
19
+ pupil = "pupil",
20
+ staff = "staff"
21
+ }
22
+ export type SpaceMemberType = EnumAsUnionOfKeys<typeof SpaceMemberTypeEnum>;
23
+ export interface IUserSpaceBrief {
24
+ readonly title: string;
25
+ readonly type: SpaceType;
26
+ readonly roles: string[];
27
+ readonly userContactID: string;
28
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sneat/auth-models",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -10,5 +10,17 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "tslib": "2.8.1"
13
- }
13
+ },
14
+ "module": "esm2022/sneat-auth-models.js",
15
+ "typings": "sneat-auth-models.d.ts",
16
+ "exports": {
17
+ "./package.json": {
18
+ "default": "./package.json"
19
+ },
20
+ ".": {
21
+ "types": "./sneat-auth-models.d.ts",
22
+ "default": "./esm2022/sneat-auth-models.js"
23
+ }
24
+ },
25
+ "sideEffects": false
14
26
  }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@sneat/auth-models" />
5
+ export * from './index';
package/eslint.config.js DELETED
@@ -1,7 +0,0 @@
1
- const baseConfig = require('../../../eslint.config.js');
2
- const { sneatLibConfig } = require('../../../eslint.lib.config.js');
3
-
4
- module.exports = [
5
- ...baseConfig,
6
- ...sneatLibConfig(__dirname),
7
- ];
package/ng-package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
3
- "dest": "../../../dist/libs/auth/models",
4
- "lib": {
5
- "entryFile": "src/index.ts"
6
- }
7
- }
package/project.json DELETED
@@ -1,38 +0,0 @@
1
- {
2
- "name": "auth-models",
3
- "$schema": "../../../node_modules/nx/schemas/project-schema.json",
4
- "projectType": "library",
5
- "sourceRoot": "libs/auth/models/src",
6
- "prefix": "sneat",
7
- "targets": {
8
- "build": {
9
- "executor": "@nx/angular:ng-packagr-lite",
10
- "outputs": [
11
- "{workspaceRoot}/dist/libs/auth/models"
12
- ],
13
- "options": {
14
- "project": "libs/auth/models/ng-package.json",
15
- "tsConfig": "libs/auth/models/tsconfig.lib.json"
16
- },
17
- "configurations": {
18
- "production": {
19
- "tsConfig": "libs/auth/models/tsconfig.lib.prod.json"
20
- },
21
- "development": {}
22
- },
23
- "defaultConfiguration": "production"
24
- },
25
- "test": {
26
- "executor": "@nx/vitest:test",
27
- "outputs": [
28
- "{workspaceRoot}/coverage/libs/auth/models"
29
- ],
30
- "options": {
31
- "tsConfig": "libs/auth/models/tsconfig.spec.json"
32
- }
33
- },
34
- "lint": {
35
- "executor": "@nx/eslint:lint"
36
- }
37
- }
38
- }
@@ -1,8 +0,0 @@
1
- import { IAvatar } from './avatar';
2
-
3
- describe('auth models sanity', () => {
4
- it('should allow creating an IAvatar object', () => {
5
- const avatar: IAvatar = { gravatar: 'test' };
6
- expect(avatar.gravatar).toBe('test');
7
- });
8
- });
package/src/lib/avatar.ts DELETED
@@ -1,7 +0,0 @@
1
- export interface IAvatar {
2
- readonly gravatar?: string;
3
- readonly external?: {
4
- readonly provider?: string;
5
- readonly url?: string;
6
- };
7
- }
@@ -1,95 +0,0 @@
1
- // TODO: Find a proper "non-auth" library for this file
2
-
3
- export interface IPersonNames {
4
- readonly firstName?: string;
5
- readonly lastName?: string;
6
- readonly middleName?: string;
7
- readonly nickName?: string;
8
- readonly fullName?: string;
9
- }
10
-
11
- export function mustHaveAtLeastOneName(names?: IPersonNames): void {
12
- if (!names) {
13
- throw new Error('Names are required');
14
- }
15
- if (
16
- !names.firstName &&
17
- !names.lastName &&
18
- !names.middleName &&
19
- !names.nickName &&
20
- !names.fullName
21
- ) {
22
- throw new Error('At least one name is required');
23
- }
24
- }
25
-
26
- export function namesToUrlParams(names?: IPersonNames): string {
27
- if (!names) {
28
- return '';
29
- }
30
- const { firstName, lastName, middleName, nickName, fullName } = names;
31
- const params: string[] = [];
32
- if (firstName) {
33
- params.push(`firstName=${encodeURIComponent(firstName)}`);
34
- }
35
- if (lastName) {
36
- params.push(`lastName=${encodeURIComponent(lastName)}`);
37
- }
38
- if (middleName) {
39
- params.push(`middleName=${encodeURIComponent(middleName)}`);
40
- }
41
- if (nickName) {
42
- params.push(`nickName=${encodeURIComponent(nickName)}`);
43
- }
44
- if (fullName && fullName !== `${firstName} ${lastName}`) {
45
- params.push(`fullName=${encodeURIComponent(fullName)}`);
46
- }
47
- return params.join('&');
48
- }
49
-
50
- export function isNameEmpty(n?: IPersonNames): boolean {
51
- // noinspection UnnecessaryLocalVariableJS
52
- const result =
53
- !n ||
54
- (!n.fullName?.trim() &&
55
- !n.firstName?.trim() &&
56
- !n.lastName?.trim() &&
57
- !n.middleName?.trim() &&
58
- !n.nickName?.trim());
59
- return result;
60
- }
61
-
62
- export function trimNames(n: IPersonNames): IPersonNames {
63
- const first = n.firstName?.trim(),
64
- middle = n.middleName?.trim(),
65
- last = n.lastName?.trim(),
66
- full = n.fullName?.trim();
67
- if (
68
- first !== n?.firstName ||
69
- last !== n?.lastName ||
70
- middle != n.middleName ||
71
- full != n.fullName
72
- ) {
73
- n = {
74
- firstName: first,
75
- middleName: middle,
76
- lastName: last,
77
- fullName: full,
78
- };
79
- }
80
- return n;
81
- }
82
-
83
- export function getFullName(n: IPersonNames): string {
84
- if (n.fullName) {
85
- return n.fullName;
86
- }
87
- return [
88
- n.firstName,
89
- n.middleName,
90
- n.lastName,
91
- n.nickName ? `(${n.nickName})` : '',
92
- ]
93
- .filter((v) => !!v)
94
- .join(' ');
95
- }
package/src/lib/user.ts DELETED
@@ -1,34 +0,0 @@
1
- import { EnumAsUnionOfKeys, SpaceType } from '@sneat/core';
2
- import { IAvatar } from './avatar';
3
- import { IPersonNames } from './person-names';
4
-
5
- // Does not contain an ID as it's a key.
6
- // Use IRecord<IUserRecord> to keep record paired with ID
7
- export interface IUserRecord {
8
- readonly accounts?: string[];
9
- readonly title: string;
10
- readonly countryID?: string;
11
- readonly email?: string;
12
- readonly emailIsVerified?: boolean;
13
- readonly avatar?: IAvatar;
14
- readonly spaceIDs?: readonly string[];
15
- readonly spaces?: Record<string, IUserSpaceBrief>;
16
- readonly names?: IPersonNames;
17
- }
18
-
19
- export enum SpaceMemberTypeEnum {
20
- creator = 'creator',
21
- member = 'member',
22
- pet = 'pet',
23
- pupil = 'pupil',
24
- staff = 'staff',
25
- }
26
-
27
- export type SpaceMemberType = EnumAsUnionOfKeys<typeof SpaceMemberTypeEnum>;
28
-
29
- export interface IUserSpaceBrief {
30
- readonly title: string;
31
- readonly type: SpaceType;
32
- readonly roles: string[];
33
- readonly userContactID: string;
34
- }
package/src/test-setup.ts DELETED
@@ -1 +0,0 @@
1
- import '@sneat/core/testing-light';
package/tsconfig.json DELETED
@@ -1,13 +0,0 @@
1
- {
2
- "extends": "../../../tsconfig.angular.json",
3
- "files": [],
4
- "include": [],
5
- "references": [
6
- {
7
- "path": "./tsconfig.lib.json"
8
- },
9
- {
10
- "path": "./tsconfig.spec.json"
11
- }
12
- ]
13
- }
package/tsconfig.lib.json DELETED
@@ -1,19 +0,0 @@
1
- {
2
- "extends": "../../../tsconfig.lib.base.json",
3
- "exclude": [
4
- "vite.config.ts",
5
- "vite.config.mts",
6
- "vitest.config.ts",
7
- "vitest.config.mts",
8
- "src/**/*.test.ts",
9
- "src/**/*.spec.ts",
10
- "src/**/*.test.tsx",
11
- "src/**/*.spec.tsx",
12
- "src/**/*.test.js",
13
- "src/**/*.spec.js",
14
- "src/**/*.test.jsx",
15
- "src/**/*.spec.jsx",
16
- "src/test-setup.ts",
17
- "src/lib/testing/**/*"
18
- ]
19
- }
@@ -1,7 +0,0 @@
1
- {
2
- "extends": "./tsconfig.lib.json",
3
- "compilerOptions": {
4
- "declarationMap": false
5
- },
6
- "angularCompilerOptions": {}
7
- }
@@ -1,31 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "../../../dist/out-tsc",
5
- "types": [
6
- "vitest/globals",
7
- "vitest/importMeta",
8
- "vite/client",
9
- "node",
10
- "vitest"
11
- ]
12
- },
13
- "include": [
14
- "vite.config.ts",
15
- "vite.config.mts",
16
- "vitest.config.ts",
17
- "vitest.config.mts",
18
- "src/**/*.test.ts",
19
- "src/**/*.spec.ts",
20
- "src/**/*.test.tsx",
21
- "src/**/*.spec.tsx",
22
- "src/**/*.test.js",
23
- "src/**/*.spec.js",
24
- "src/**/*.test.jsx",
25
- "src/**/*.spec.jsx",
26
- "src/**/*.d.ts"
27
- ],
28
- "files": [
29
- "src/test-setup.ts"
30
- ]
31
- }
package/vite.config.mts DELETED
@@ -1,10 +0,0 @@
1
- /// <reference types='vitest' />
2
- import { defineConfig } from 'vitest/config';
3
- import { createBaseViteConfig } from '../../../vite.config.base';
4
-
5
- export default defineConfig(() =>
6
- createBaseViteConfig({
7
- dirname: __dirname,
8
- name: 'auth-models',
9
- }),
10
- );
File without changes