@the-inkwell/shared 0.1.29 → 0.1.31

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,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /*
4
+ model Candidacy {
5
+ id String @id @default(uuid())
6
+
7
+ currentStatus CandidacyStatuses? @default(SUBMITTED)
8
+
9
+ rating Int?
10
+ ratingReason String?
11
+
12
+ source CandidacySources? @default(ADMIN)
13
+
14
+ person Person @relation(fields: [personId], references: [id])
15
+ personId String
16
+
17
+ position Position @relation(fields: [positionId], references: [id])
18
+ positionId String
19
+
20
+ referral Referral?
21
+
22
+ actions Action[]
23
+ feedbacks CandidacyFeedback[]
24
+ notes Note[]
25
+
26
+ deletedAt DateTime?
27
+ createdAt DateTime @default(now())
28
+ updatedAt DateTime @default(now())
29
+
30
+ @@unique([personId, positionId])
31
+ @@map("candidacies")
32
+ }
33
+ */
@@ -14,5 +14,6 @@ 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("./candidacies"), exports);
17
18
  __exportStar(require("./persons"), exports);
18
19
  __exportStar(require("./website"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-inkwell/shared",
3
- "version": "0.1.29",
3
+ "version": "0.1.31",
4
4
  "description": "Shared code for Inkwell",
5
5
  "license": "ISC",
6
6
  "author": "Inkwell (Rob Yedlin)",
@@ -0,0 +1,65 @@
1
+ import { ListResponse } from '../../shared'
2
+ import { AdminPerson } from '../persons'
3
+
4
+ export type AdminCandidacy = {
5
+ id: string
6
+ currentStatus: any // TODO add this
7
+
8
+ rating: number | null
9
+ ratingTags: any
10
+ ratingNotes: string | null
11
+
12
+ source: any // TODO add this
13
+
14
+ personId: string
15
+ person: AdminPerson // TODO add this
16
+
17
+ positionId: string
18
+ position: any // TODO add this
19
+
20
+ referral: any // TODO add this
21
+
22
+ actions: any // TODO add this
23
+ feedbacks: any // TODO add this
24
+ notes: any // TODO add this
25
+
26
+ deletedAt: string | null
27
+ createdAt: string
28
+ updatedAt: string
29
+ }
30
+
31
+ export type AdminCandidacyResponse = AdminCandidacy
32
+
33
+ export type AdminCandidacyListResponse = ListResponse<AdminCandidacy>
34
+
35
+ /*
36
+ model Candidacy {
37
+ id String @id @default(uuid())
38
+
39
+ currentStatus CandidacyStatuses? @default(SUBMITTED)
40
+
41
+ rating Int?
42
+ ratingReason String?
43
+
44
+ source CandidacySources? @default(ADMIN)
45
+
46
+ person Person @relation(fields: [personId], references: [id])
47
+ personId String
48
+
49
+ position Position @relation(fields: [positionId], references: [id])
50
+ positionId String
51
+
52
+ referral Referral?
53
+
54
+ actions Action[]
55
+ feedbacks CandidacyFeedback[]
56
+ notes Note[]
57
+
58
+ deletedAt DateTime?
59
+ createdAt DateTime @default(now())
60
+ updatedAt DateTime @default(now())
61
+
62
+ @@unique([personId, positionId])
63
+ @@map("candidacies")
64
+ }
65
+ */
@@ -1,2 +1,3 @@
1
+ export * from './candidacies'
1
2
  export * from './persons'
2
3
  export * from './website'
@@ -1,4 +1,5 @@
1
- import { ListResponse } from '../../shared'
1
+ import { ListRequest, ListResponse } from '../../shared'
2
+ import { AdminCandidacy } from '../candidacies'
2
3
 
3
4
  // main model
4
5
 
@@ -52,7 +53,7 @@ export type AdminPerson = {
52
53
 
53
54
  actions: any // TODO add this
54
55
  admin: any // TODO add this
55
- candidacies: any // TODO add this
56
+ candidacies: AdminCandidacy[] | null
56
57
  clubs: any // TODO add this
57
58
  conversations: any // TODO add this
58
59
  enrichment: any // TODO add this
@@ -80,14 +81,9 @@ export type AdminPersonRequestParams = Pick<AdminPerson, 'id'>
80
81
 
81
82
  // list
82
83
 
83
- export type AdminPersonsListRequest = {
84
- take: number
85
- skip: number
86
- orderBy: any // TODO add this
87
- where: any // TODO add this
88
- }
84
+ export type AdminPersonListRequest = ListRequest
89
85
 
90
- export type AdminPersonsListResponse = ListResponse<AdminPerson>
86
+ export type AdminPersonListResponse = ListResponse<AdminPerson>
91
87
 
92
88
  // create
93
89
 
@@ -2,3 +2,14 @@ export type ListResponse<T> = {
2
2
  count: number
3
3
  results: T[]
4
4
  }
5
+
6
+ export type ListRequest<
7
+ TAdditional = any,
8
+ TSort = any,
9
+ TFilter = any
10
+ > = TAdditional & {
11
+ take: number
12
+ skip: number
13
+ sort: TSort
14
+ filter: TFilter
15
+ }