@circle-vibe/shared 1.1.19 → 1.1.21

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,11 @@
1
+ import { UserChatRole } from "src/enums";
2
+ import { Chat } from "./chat";
3
+ import { User } from "./user";
4
+ export interface ChatParticipant {
5
+ id: number;
6
+ userId: number;
7
+ chatId: number;
8
+ user: User;
9
+ chat: Chat;
10
+ chatRole: UserChatRole;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=chat-participant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-participant.js","sourceRoot":"","sources":["../../../src/models/chat-participant.ts"],"names":[],"mappings":""}
@@ -4,3 +4,4 @@ export * from './message';
4
4
  export * from './chat';
5
5
  export * from './thread';
6
6
  export * from './thread-participant';
7
+ export * from './chat-participant';
@@ -20,4 +20,5 @@ __exportStar(require("./message"), exports);
20
20
  __exportStar(require("./chat"), exports);
21
21
  __exportStar(require("./thread"), exports);
22
22
  __exportStar(require("./thread-participant"), exports);
23
+ __exportStar(require("./chat-participant"), exports);
23
24
  //# sourceMappingURL=index.js.map
@@ -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"}
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,5 +1,11 @@
1
+ import { Chat } from "./chat";
1
2
  import { Message } from "./message";
3
+ import { ThreadParticipant } from "./thread-participant";
2
4
  export interface Thread {
3
5
  id: number;
4
6
  message: Message[];
7
+ chatId: number;
8
+ chat: Chat;
9
+ messages: Message[];
10
+ participants: ThreadParticipant[];
5
11
  }
@@ -1,4 +1,4 @@
1
- import { UserChatRole, UserRole, UserType } from "src/enums";
1
+ import { UserRole, UserType } from "src/enums";
2
2
  export interface User {
3
3
  id: number;
4
4
  username: string;
@@ -15,7 +15,6 @@ export interface User {
15
15
  primaryPhone: string;
16
16
  type: UserType;
17
17
  role: UserRole;
18
- chatRole: UserChatRole;
19
18
  createdAt: Date;
20
19
  updatedAt: Date;
21
20
  }
@@ -1,3 +1,4 @@
1
1
  export * from './get-formik-form-control-value';
2
2
  export * from './is-formik-field-required';
3
3
  export * from './get-formik-form-control-error';
4
+ export * from './is-token-expired';
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./get-formik-form-control-value"), exports);
18
18
  __exportStar(require("./is-formik-field-required"), exports);
19
19
  __exportStar(require("./get-formik-form-control-error"), exports);
20
+ __exportStar(require("./is-token-expired"), exports);
20
21
  //# 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"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kEAAgD;AAChD,6DAA2C;AAC3C,kEAAgD;AAChD,qDAAmC"}
@@ -0,0 +1 @@
1
+ export * from './is-token-expired';
@@ -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("./is-token-expired"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utils/is-token-expired/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC"}
@@ -0,0 +1 @@
1
+ export declare const isTokenExpired: (exp: number) => boolean;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isTokenExpired = void 0;
4
+ const isTokenExpired = (exp) => {
5
+ return exp < new Date().getTime();
6
+ };
7
+ exports.isTokenExpired = isTokenExpired;
8
+ //# sourceMappingURL=is-token-expired.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-token-expired.js","sourceRoot":"","sources":["../../../../src/utils/is-token-expired/is-token-expired.ts"],"names":[],"mappings":";;;AAAO,MAAM,cAAc,GAAG,CAAC,GAAW,EAAW,EAAE;IACrD,OAAO,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;AACpC,CAAC,CAAC;AAFW,QAAA,cAAc,kBAEzB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@circle-vibe/shared",
3
- "version": "1.1.19",
3
+ "version": "1.1.21",
4
4
  "types": "./build/index.d.ts",
5
5
  "description": "Shared componenets, utils, hooks",
6
6
  "scripts": {