@hawk.so/types 0.4.0 → 0.4.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/build/index.d.ts CHANGED
@@ -1,33 +1,34 @@
1
- export * from "./src/auth/tokensPair";
2
- export * from "./src/base/businessOperation/businessOperation";
3
- export * from "./src/billing/planProlongrationPayload";
4
- export * from "./src/base/event/affectedUser";
5
- export * from "./src/base/event/backtraceFrame";
6
- export * from "./src/base/event/breadcrumb";
7
- export * from "./src/base/event/event";
8
- export * from "./src/base/event/sourceCodeLine";
9
- export * from "./src/base/event/addons";
10
- export * from "./src/base/integrations/integrationToken";
11
- export * from "./src/dbScheme/businessOperation";
12
- export * from "./src/dbScheme/groupedEvent";
13
- export * from "./src/dbScheme/notificationsChannels";
14
- export * from "./src/dbScheme/notificationsChannelSettings";
15
- export * from "./src/dbScheme/membership";
16
- export * from "./src/dbScheme/plan";
17
- export * from "./src/dbScheme/project";
18
- export * from "./src/dbScheme/projectNotificationsRule";
19
- export * from "./src/dbScheme/release";
20
- export * from "./src/dbScheme/repetition";
21
- export * from "./src/dbScheme/sourceMap";
22
- export * from "./src/dbScheme/user";
23
- export * from "./src/dbScheme/userNotifications";
24
- export * from "./src/dbScheme/workspace";
25
- export * from "./src/dbScheme/bankCard";
26
- export * from "./src/dbScheme/sso";
27
- export * from "./src/dbScheme/projectEventGroupingPattern";
28
- export * from "./src/notifications/createProjectNotifications";
29
- export * from "./src/notifications/receiveTypes";
30
- export * from "./src/notifications/updateProjectNotifications";
31
- export * from "./src/notifications/userNotification";
32
- export * from "./src/catchers/catcher-message";
33
- export * from './src/utils';
1
+ export type * from './src/auth/tokensPair';
2
+ export type * from './src/base/businessOperation/businessOperation';
3
+ export type * from './src/billing/planProlongrationPayload';
4
+ export type * from './src/base/event/affectedUser';
5
+ export type * from './src/base/event/backtraceFrame';
6
+ export type * from './src/base/event/breadcrumb';
7
+ export type * from './src/base/event/event';
8
+ export type * from './src/base/event/sourceCodeLine';
9
+ export type * from './src/base/event/addons';
10
+ export type * from './src/base/integrations/integrationToken';
11
+ export type * from './src/dbScheme/businessOperation';
12
+ export type * from './src/dbScheme/groupedEvent';
13
+ export type * from './src/dbScheme/notificationsChannels';
14
+ export type * from './src/dbScheme/notificationsChannelSettings';
15
+ export type * from './src/dbScheme/membership';
16
+ export type * from './src/dbScheme/userProjectsLastVisit';
17
+ export type * from './src/dbScheme/plan';
18
+ export type * from './src/dbScheme/project';
19
+ export type * from './src/dbScheme/projectNotificationsRule';
20
+ export type * from './src/dbScheme/release';
21
+ export type * from './src/dbScheme/repetition';
22
+ export type * from './src/dbScheme/sourceMap';
23
+ export type * from './src/dbScheme/user';
24
+ export type * from './src/dbScheme/userNotifications';
25
+ export type * from './src/dbScheme/workspace';
26
+ export type * from './src/dbScheme/bankCard';
27
+ export type * from './src/dbScheme/sso';
28
+ export type * from './src/dbScheme/projectEventGroupingPattern';
29
+ export type * from './src/notifications/createProjectNotifications';
30
+ export type * from './src/notifications/receiveTypes';
31
+ export type * from './src/notifications/updateProjectNotifications';
32
+ export type * from './src/notifications/userNotification';
33
+ export type * from './src/catchers/catcher-message';
34
+ export type * from './src/utils';
package/build/index.js CHANGED
@@ -1,49 +1,2 @@
1
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
2
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./src/auth/tokensPair"), exports);
18
- __exportStar(require("./src/base/businessOperation/businessOperation"), exports);
19
- __exportStar(require("./src/billing/planProlongrationPayload"), exports);
20
- __exportStar(require("./src/base/event/affectedUser"), exports);
21
- __exportStar(require("./src/base/event/backtraceFrame"), exports);
22
- __exportStar(require("./src/base/event/breadcrumb"), exports);
23
- __exportStar(require("./src/base/event/event"), exports);
24
- __exportStar(require("./src/base/event/sourceCodeLine"), exports);
25
- __exportStar(require("./src/base/event/addons"), exports);
26
- __exportStar(require("./src/base/integrations/integrationToken"), exports);
27
- __exportStar(require("./src/dbScheme/businessOperation"), exports);
28
- __exportStar(require("./src/dbScheme/groupedEvent"), exports);
29
- __exportStar(require("./src/dbScheme/notificationsChannels"), exports);
30
- __exportStar(require("./src/dbScheme/notificationsChannelSettings"), exports);
31
- __exportStar(require("./src/dbScheme/membership"), exports);
32
- __exportStar(require("./src/dbScheme/plan"), exports);
33
- __exportStar(require("./src/dbScheme/project"), exports);
34
- __exportStar(require("./src/dbScheme/projectNotificationsRule"), exports);
35
- __exportStar(require("./src/dbScheme/release"), exports);
36
- __exportStar(require("./src/dbScheme/repetition"), exports);
37
- __exportStar(require("./src/dbScheme/sourceMap"), exports);
38
- __exportStar(require("./src/dbScheme/user"), exports);
39
- __exportStar(require("./src/dbScheme/userNotifications"), exports);
40
- __exportStar(require("./src/dbScheme/workspace"), exports);
41
- __exportStar(require("./src/dbScheme/bankCard"), exports);
42
- __exportStar(require("./src/dbScheme/sso"), exports);
43
- __exportStar(require("./src/dbScheme/projectEventGroupingPattern"), exports);
44
- __exportStar(require("./src/notifications/createProjectNotifications"), exports);
45
- __exportStar(require("./src/notifications/receiveTypes"), exports);
46
- __exportStar(require("./src/notifications/updateProjectNotifications"), exports);
47
- __exportStar(require("./src/notifications/userNotification"), exports);
48
- __exportStar(require("./src/catchers/catcher-message"), exports);
49
- __exportStar(require("./src/utils"), exports);
@@ -33,3 +33,13 @@ export interface PendingMemberDBScheme {
33
33
  * Represents full structure of team collection documents
34
34
  */
35
35
  export type MemberDBScheme = ConfirmedMemberDBScheme | PendingMemberDBScheme;
36
+ /**
37
+ * User workspace membership info stored in user document
38
+ * Record of workspace IDs to membership data
39
+ */
40
+ export type MembershipDBScheme = Record<string, {
41
+ /**
42
+ * Whether the user's membership is pending confirmation
43
+ */
44
+ isPending?: boolean;
45
+ }>;
@@ -1,6 +1,8 @@
1
1
  import type { ObjectId } from 'bson';
2
2
  import type { UserNotificationsDBScheme } from '../../index.ts';
3
3
  import type { BankCard } from './bankCard.ts';
4
+ import type { MembershipDBScheme } from './membership.ts';
5
+ import type { UserProjectsLastVisitDBScheme } from './userProjectsLastVisit.ts';
4
6
  /**
5
7
  * Interface representing how user is stored in DB
6
8
  */
@@ -29,6 +31,11 @@ export interface UserDBScheme {
29
31
  * User's GitHub profile id
30
32
  */
31
33
  githubId?: string;
34
+ /**
35
+ * User's workspaces membership
36
+ * Record of workspace IDs to membership data
37
+ */
38
+ workspaces?: MembershipDBScheme;
32
39
  /**
33
40
  * User's original password (this field appears only after registration).
34
41
  * Using to send password to user after registration
@@ -38,6 +45,10 @@ export interface UserDBScheme {
38
45
  * User notifications settings
39
46
  */
40
47
  notifications?: UserNotificationsDBScheme;
48
+ /**
49
+ * User's last visit timestamps for projects
50
+ */
51
+ projectsLastVisit?: UserProjectsLastVisitDBScheme;
41
52
  /**
42
53
  * Saved bank cards for one-click payments
43
54
  */
@@ -0,0 +1,5 @@
1
+ /**
2
+ * User's last visit timestamps for projects
3
+ * Record of project IDs to Unix timestamps
4
+ */
5
+ export type UserProjectsLastVisitDBScheme = Record<string, number>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/index.ts CHANGED
@@ -1,41 +1,42 @@
1
- export * from "./src/auth/tokensPair";
2
-
3
- export * from "./src/base/businessOperation/businessOperation";
4
-
5
- export * from "./src/billing/planProlongrationPayload";
6
-
7
- export * from "./src/base/event/affectedUser";
8
- export * from "./src/base/event/backtraceFrame";
9
- export * from "./src/base/event/breadcrumb";
10
- export * from "./src/base/event/event";
11
- export * from "./src/base/event/sourceCodeLine";
12
- export * from "./src/base/event/addons";
13
-
14
- export * from "./src/base/integrations/integrationToken";
15
-
16
- export * from "./src/dbScheme/businessOperation";
17
- export * from "./src/dbScheme/groupedEvent";
18
- export * from "./src/dbScheme/notificationsChannels";
19
- export * from "./src/dbScheme/notificationsChannelSettings";
20
- export * from "./src/dbScheme/membership";
21
- export * from "./src/dbScheme/plan";
22
- export * from "./src/dbScheme/project";
23
- export * from "./src/dbScheme/projectNotificationsRule";
24
- export * from "./src/dbScheme/release";
25
- export * from "./src/dbScheme/repetition";
26
- export * from "./src/dbScheme/sourceMap";
27
- export * from "./src/dbScheme/user";
28
- export * from "./src/dbScheme/userNotifications";
29
- export * from "./src/dbScheme/workspace";
30
- export * from "./src/dbScheme/bankCard";
31
- export * from "./src/dbScheme/sso";
32
- export * from "./src/dbScheme/projectEventGroupingPattern";
33
-
34
- export * from "./src/notifications/createProjectNotifications";
35
- export * from "./src/notifications/receiveTypes";
36
- export * from "./src/notifications/updateProjectNotifications";
37
- export * from "./src/notifications/userNotification";
38
-
39
- export * from "./src/catchers/catcher-message";
40
-
41
- export * from './src/utils';
1
+ export type * from './src/auth/tokensPair';
2
+
3
+ export type * from './src/base/businessOperation/businessOperation';
4
+
5
+ export type * from './src/billing/planProlongrationPayload';
6
+
7
+ export type * from './src/base/event/affectedUser';
8
+ export type * from './src/base/event/backtraceFrame';
9
+ export type * from './src/base/event/breadcrumb';
10
+ export type * from './src/base/event/event';
11
+ export type * from './src/base/event/sourceCodeLine';
12
+ export type * from './src/base/event/addons';
13
+
14
+ export type * from './src/base/integrations/integrationToken';
15
+
16
+ export type * from './src/dbScheme/businessOperation';
17
+ export type * from './src/dbScheme/groupedEvent';
18
+ export type * from './src/dbScheme/notificationsChannels';
19
+ export type * from './src/dbScheme/notificationsChannelSettings';
20
+ export type * from './src/dbScheme/membership';
21
+ export type * from './src/dbScheme/userProjectsLastVisit';
22
+ export type * from './src/dbScheme/plan';
23
+ export type * from './src/dbScheme/project';
24
+ export type * from './src/dbScheme/projectNotificationsRule';
25
+ export type * from './src/dbScheme/release';
26
+ export type * from './src/dbScheme/repetition';
27
+ export type * from './src/dbScheme/sourceMap';
28
+ export type * from './src/dbScheme/user';
29
+ export type * from './src/dbScheme/userNotifications';
30
+ export type * from './src/dbScheme/workspace';
31
+ export type * from './src/dbScheme/bankCard';
32
+ export type * from './src/dbScheme/sso';
33
+ export type * from './src/dbScheme/projectEventGroupingPattern';
34
+
35
+ export type * from './src/notifications/createProjectNotifications';
36
+ export type * from './src/notifications/receiveTypes';
37
+ export type * from './src/notifications/updateProjectNotifications';
38
+ export type * from './src/notifications/userNotification';
39
+
40
+ export type * from './src/catchers/catcher-message';
41
+
42
+ export type * from './src/utils';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hawk.so/types",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "TypeScript definitions for Hawk",
5
5
  "types": "build/index.d.ts",
6
6
  "main": "build/index.js",
@@ -39,3 +39,14 @@ export interface PendingMemberDBScheme {
39
39
  * Represents full structure of team collection documents
40
40
  */
41
41
  export type MemberDBScheme = ConfirmedMemberDBScheme | PendingMemberDBScheme;
42
+
43
+ /**
44
+ * User workspace membership info stored in user document
45
+ * Record of workspace IDs to membership data
46
+ */
47
+ export type MembershipDBScheme = Record<string, {
48
+ /**
49
+ * Whether the user's membership is pending confirmation
50
+ */
51
+ isPending?: boolean;
52
+ }>;
@@ -1,6 +1,8 @@
1
1
  import type { ObjectId } from 'bson';
2
2
  import type { UserNotificationsDBScheme } from '../../index.ts';
3
3
  import type { BankCard } from './bankCard.ts';
4
+ import type { MembershipDBScheme } from './membership.ts';
5
+ import type { UserProjectsLastVisitDBScheme } from './userProjectsLastVisit.ts';
4
6
 
5
7
  /**
6
8
  * Interface representing how user is stored in DB
@@ -36,6 +38,12 @@ export interface UserDBScheme {
36
38
  */
37
39
  githubId?: string;
38
40
 
41
+ /**
42
+ * User's workspaces membership
43
+ * Record of workspace IDs to membership data
44
+ */
45
+ workspaces?: MembershipDBScheme;
46
+
39
47
  /**
40
48
  * User's original password (this field appears only after registration).
41
49
  * Using to send password to user after registration
@@ -47,6 +55,11 @@ export interface UserDBScheme {
47
55
  */
48
56
  notifications?: UserNotificationsDBScheme;
49
57
 
58
+ /**
59
+ * User's last visit timestamps for projects
60
+ */
61
+ projectsLastVisit?: UserProjectsLastVisitDBScheme;
62
+
50
63
  /**
51
64
  * Saved bank cards for one-click payments
52
65
  */
@@ -0,0 +1,5 @@
1
+ /**
2
+ * User's last visit timestamps for projects
3
+ * Record of project IDs to Unix timestamps
4
+ */
5
+ export type UserProjectsLastVisitDBScheme = Record<string, number>;