@discovercloudai/shared 1.0.2 → 1.0.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.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- export * from "./permissions";
2
- export * from "./context";
3
- export * from "./dto";
4
1
  export * from "./enums";
5
2
  export * from "./errors";
3
+ export * from "./context";
4
+ export * from "./dto";
5
+ export * from "./internal";
6
+ export * from "./permissions";
package/dist/index.js CHANGED
@@ -14,8 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./permissions"), exports);
18
- __exportStar(require("./context"), exports);
19
- __exportStar(require("./dto"), exports);
20
17
  __exportStar(require("./enums"), exports);
21
18
  __exportStar(require("./errors"), exports);
19
+ __exportStar(require("./context"), exports);
20
+ __exportStar(require("./dto"), exports);
21
+ __exportStar(require("./internal"), exports);
22
+ __exportStar(require("./permissions"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@discovercloudai/shared",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "private": false,
5
5
  "type": "commonjs",
6
6
  "main": "dist/index.js",
@@ -1,9 +0,0 @@
1
- import { AccountStatus } from "../enums";
2
- export interface AccountDTO {
3
- id: string;
4
- email: string;
5
- isVerified: boolean;
6
- status: AccountStatus;
7
- createdAt: Date;
8
- updatedAt: Date;
9
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,11 +0,0 @@
1
- import { OrganizationRole, MembershipStatus } from "../enums";
2
- export interface MembershipDTO {
3
- id: string;
4
- userId: string;
5
- organizationId: string;
6
- role: OrganizationRole;
7
- status: MembershipStatus;
8
- createdAt: Date;
9
- updatedAt: Date;
10
- deletedAt: Date | null;
11
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,10 +0,0 @@
1
- import { OrganizationStatus } from "../enums";
2
- export interface OrganizationDTO {
3
- id: string;
4
- name: string;
5
- slug: string;
6
- status: OrganizationStatus;
7
- createdAt: Date;
8
- updatedAt: Date;
9
- deletedAt: Date | null;
10
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,54 +0,0 @@
1
- export interface ApiMeta {
2
- requestId: string | null;
3
- timestamp: string;
4
- }
5
- export interface ApiSuccessResponse<T> {
6
- success: true;
7
- data: T;
8
- meta: ApiMeta;
9
- }
10
- export interface ApiErrorResponse {
11
- success: false;
12
- error: {
13
- code?: string;
14
- message: string;
15
- details?: any;
16
- };
17
- meta: ApiMeta;
18
- }
19
- export interface MessageResponseDto {
20
- message: string;
21
- }
22
- export interface TokensResponseDto {
23
- accessToken: string;
24
- refreshToken: string;
25
- }
26
- export interface LoggedOutResponseDto {
27
- loggedOut: boolean;
28
- }
29
- export interface LoggedOutAllResponseDto {
30
- loggedOutAll: boolean;
31
- }
32
- export interface SuspendedResponseDto {
33
- suspended: boolean;
34
- }
35
- export interface ActivatedResponseDto {
36
- activated: boolean;
37
- }
38
- export interface DeletedResponseDto {
39
- deleted: boolean;
40
- }
41
- export interface RevokedResponseDto {
42
- revoked: boolean;
43
- }
44
- export interface SessionDto {
45
- id: string;
46
- isActive: boolean;
47
- ipAddress: string | null;
48
- userAgent: string | null;
49
- device: string | null;
50
- createdAt: Date;
51
- updatedAt: Date;
52
- expiresAt: Date | null;
53
- revokedAt: Date | null;
54
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,10 +0,0 @@
1
- import { UserStatus, UserRole } from "../enums";
2
- export interface UserDTO {
3
- id: string;
4
- email: string;
5
- status: UserStatus;
6
- role: UserRole;
7
- createdAt: Date;
8
- updatedAt: Date;
9
- deletedAt: Date | null;
10
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +0,0 @@
1
- export declare enum AccountStatus {
2
- ACTIVE = "ACTIVE",
3
- SUSPENDED = "SUSPENDED",
4
- DELETED = "DELETED"
5
- }
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AccountStatus = void 0;
4
- var AccountStatus;
5
- (function (AccountStatus) {
6
- AccountStatus["ACTIVE"] = "ACTIVE";
7
- AccountStatus["SUSPENDED"] = "SUSPENDED";
8
- AccountStatus["DELETED"] = "DELETED";
9
- })(AccountStatus || (exports.AccountStatus = AccountStatus = {}));
@@ -1,5 +0,0 @@
1
- export declare enum MembershipStatus {
2
- ACTIVE = "ACTIVE",
3
- INVITED = "INVITED",
4
- SUSPENDED = "SUSPENDED"
5
- }
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MembershipStatus = void 0;
4
- var MembershipStatus;
5
- (function (MembershipStatus) {
6
- MembershipStatus["ACTIVE"] = "ACTIVE";
7
- MembershipStatus["INVITED"] = "INVITED";
8
- MembershipStatus["SUSPENDED"] = "SUSPENDED";
9
- })(MembershipStatus || (exports.MembershipStatus = MembershipStatus = {}));
@@ -1,6 +0,0 @@
1
- export declare enum OrganizationRole {
2
- OWNER = "OWNER",
3
- ADMIN = "ADMIN",
4
- EDITOR = "EDITOR",
5
- VIEWER = "VIEWER"
6
- }
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OrganizationRole = void 0;
4
- var OrganizationRole;
5
- (function (OrganizationRole) {
6
- OrganizationRole["OWNER"] = "OWNER";
7
- OrganizationRole["ADMIN"] = "ADMIN";
8
- OrganizationRole["EDITOR"] = "EDITOR";
9
- OrganizationRole["VIEWER"] = "VIEWER";
10
- })(OrganizationRole || (exports.OrganizationRole = OrganizationRole = {}));
@@ -1,5 +0,0 @@
1
- export declare enum OrganizationStatus {
2
- ACTIVE = "ACTIVE",
3
- SUSPENDED = "SUSPENDED",
4
- CLOSED = "CLOSED"
5
- }
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OrganizationStatus = void 0;
4
- var OrganizationStatus;
5
- (function (OrganizationStatus) {
6
- OrganizationStatus["ACTIVE"] = "ACTIVE";
7
- OrganizationStatus["SUSPENDED"] = "SUSPENDED";
8
- OrganizationStatus["CLOSED"] = "CLOSED";
9
- })(OrganizationStatus || (exports.OrganizationStatus = OrganizationStatus = {}));
@@ -1,7 +0,0 @@
1
- export declare enum UserRole {
2
- SUPERADMIN = "SUPERADMIN",
3
- ADMIN = "ADMIN",
4
- SUPPORT = "SUPPORT",
5
- MODERATOR = "MODERATOR",
6
- USER = "USER"
7
- }
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UserRole = void 0;
4
- var UserRole;
5
- (function (UserRole) {
6
- UserRole["SUPERADMIN"] = "SUPERADMIN";
7
- UserRole["ADMIN"] = "ADMIN";
8
- UserRole["SUPPORT"] = "SUPPORT";
9
- UserRole["MODERATOR"] = "MODERATOR";
10
- UserRole["USER"] = "USER";
11
- })(UserRole || (exports.UserRole = UserRole = {}));
@@ -1,5 +0,0 @@
1
- export declare enum UserStatus {
2
- ACTIVE = "ACTIVE",
3
- SUSPENDED = "SUSPENDED",
4
- DELETED = "DELETED"
5
- }
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UserStatus = void 0;
4
- var UserStatus;
5
- (function (UserStatus) {
6
- UserStatus["ACTIVE"] = "ACTIVE";
7
- UserStatus["SUSPENDED"] = "SUSPENDED";
8
- UserStatus["DELETED"] = "DELETED";
9
- })(UserStatus || (exports.UserStatus = UserStatus = {}));