@circle-vibe/shared 1.1.51 → 1.1.53

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,8 @@
1
+ export interface ChatInvite {
2
+ id: number;
3
+ chatId: number;
4
+ fromChatParticipantId: number;
5
+ targetUserId: number;
6
+ expirationDate: Date;
7
+ token: string;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=chat-invite.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-invite.js","sourceRoot":"","sources":["../../../src/models/chat-invite.ts"],"names":[],"mappings":""}
@@ -4,6 +4,7 @@ export interface MessageFile {
4
4
  fileName: string;
5
5
  description: string;
6
6
  url: string;
7
+ optimizedUrl: string;
7
8
  type: MessageFileType;
8
9
  entityType: MessageFileEntityType;
9
10
  }
@@ -1,4 +1,5 @@
1
1
  export * from './user';
2
+ export * from './user-shortest';
2
3
  export * from './file';
3
4
  export * from './message';
4
5
  export * from './chat';
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./user"), exports);
18
+ __exportStar(require("./user-shortest"), exports);
18
19
  __exportStar(require("./file"), exports);
19
20
  __exportStar(require("./message"), exports);
20
21
  __exportStar(require("./chat"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,yCAAuB;AACvB,4CAA0B;AAC1B,yCAAuB;AACvB,2CAAyB;AACzB,uDAAqC;AACrC,qDAAmC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,kDAAgC;AAChC,yCAAuB;AACvB,4CAA0B;AAC1B,yCAAuB;AACvB,2CAAyB;AACzB,uDAAqC;AACrC,qDAAmC"}
@@ -0,0 +1,6 @@
1
+ export interface UserShortest {
2
+ id: number;
3
+ avatarUrlOptimized: string;
4
+ email?: string;
5
+ name: string;
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=user-shortest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-shortest.js","sourceRoot":"","sources":["../../../src/models/user-shortest.ts"],"names":[],"mappings":""}
@@ -1,12 +1,15 @@
1
- import { UserChatStatus, UserRole, UserType } from "src/enums";
1
+ import { UserChatStatus, UserRole, UserType } from 'src/enums';
2
2
  export interface User {
3
3
  id: number;
4
4
  username: string;
5
+ firstname: string;
5
6
  surname: string;
6
7
  birthDate: Date;
7
8
  password: string;
8
9
  avatarUrl: string;
10
+ avatarUrlOptimized: string;
9
11
  isHiddenContactInfo: boolean;
12
+ isAllowedToSearch: boolean;
10
13
  country: string;
11
14
  city: string;
12
15
  email: string;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.composeAvatarFallback = void 0;
4
- const composeAvatarFallback = (user) => [user.username, user.surname]
4
+ const composeAvatarFallback = (user) => [user.firstname, user.surname]
5
5
  .filter(Boolean)
6
6
  .map((line) => line.charAt(0))
7
7
  .join("")
@@ -1 +1 @@
1
- {"version":3,"file":"compose-avatar-fallback.js","sourceRoot":"","sources":["../../../../src/utils/compose-avatar-fallback/compose-avatar-fallback.ts"],"names":[],"mappings":";;;AAEO,MAAM,qBAAqB,GAAG,CAAC,IAAU,EAAE,EAAE,CAClD,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC;KAC1B,MAAM,CAAC,OAAO,CAAC;KACf,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;KAC7B,IAAI,CAAC,EAAE,CAAC;KACR,WAAW,EAAE,CAAC;AALN,QAAA,qBAAqB,yBAKf"}
1
+ {"version":3,"file":"compose-avatar-fallback.js","sourceRoot":"","sources":["../../../../src/utils/compose-avatar-fallback/compose-avatar-fallback.ts"],"names":[],"mappings":";;;AAEO,MAAM,qBAAqB,GAAG,CAAC,IAAU,EAAE,EAAE,CAClD,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC;KAC3B,MAAM,CAAC,OAAO,CAAC;KACf,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;KAC7B,IAAI,CAAC,EAAE,CAAC;KACR,WAAW,EAAE,CAAC;AALN,QAAA,qBAAqB,yBAKf"}
@@ -0,0 +1,6 @@
1
+ interface UserFullName {
2
+ firstname: string;
3
+ surname: string;
4
+ }
5
+ export declare const getUserFullName: (user?: UserFullName) => string;
6
+ export {};
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getUserFullName = void 0;
4
+ const getUserFullName = (user) => {
5
+ if (!user) {
6
+ return '';
7
+ }
8
+ const { firstname, surname } = user;
9
+ return [firstname, surname].filter(Boolean).join(" ");
10
+ };
11
+ exports.getUserFullName = getUserFullName;
12
+ //# sourceMappingURL=get-user-full-name.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-user-full-name.js","sourceRoot":"","sources":["../../../../src/utils/get-user-full-name/get-user-full-name.ts"],"names":[],"mappings":";;;AAKO,MAAM,eAAe,GAAG,CAAC,IAAmB,EAAE,EAAE;IACrD,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,EAAE,CAAC;KACX;IAED,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAEpC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACxD,CAAC,CAAA;AARY,QAAA,eAAe,mBAQ3B"}
@@ -0,0 +1 @@
1
+ export * from './get-user-full-name';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./get-user-full-name"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utils/get-user-full-name/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC"}
@@ -3,3 +3,4 @@ export * from './is-formik-field-required';
3
3
  export * from './get-formik-form-control-error';
4
4
  export * from './is-token-expired';
5
5
  export * from './compose-avatar-fallback';
6
+ export * from './get-user-full-name';
@@ -19,4 +19,5 @@ __exportStar(require("./is-formik-field-required"), exports);
19
19
  __exportStar(require("./get-formik-form-control-error"), exports);
20
20
  __exportStar(require("./is-token-expired"), exports);
21
21
  __exportStar(require("./compose-avatar-fallback"), exports);
22
+ __exportStar(require("./get-user-full-name"), exports);
22
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kEAAgD;AAChD,6DAA2C;AAC3C,kEAAgD;AAChD,qDAAmC;AACnC,4DAA0C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kEAAgD;AAChD,6DAA2C;AAC3C,kEAAgD;AAChD,qDAAmC;AACnC,4DAA0C;AAC1C,uDAAqC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@circle-vibe/shared",
3
- "version": "1.1.51",
3
+ "version": "1.1.53",
4
4
  "types": "./build/index.d.ts",
5
5
  "description": "Shared componenets, utils, hooks",
6
6
  "scripts": {