@the-inkwell/shared 0.1.30 → 0.1.32

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-inkwell/shared",
3
- "version": "0.1.30",
3
+ "version": "0.1.32",
4
4
  "description": "Shared code for Inkwell",
5
5
  "license": "ISC",
6
6
  "author": "Inkwell (Rob Yedlin)",
@@ -1,3 +1,4 @@
1
+ import { ListResponse } from '../../shared'
1
2
  import { AdminPerson } from '../persons'
2
3
 
3
4
  export type AdminCandidacy = {
@@ -18,15 +19,19 @@ export type AdminCandidacy = {
18
19
 
19
20
  referral: any // TODO add this
20
21
 
21
- actions: any // TODO add this
22
- feedbacks: any // TODO add this
23
- notes: any // TODO add this
22
+ actions?: any // TODO add this
23
+ feedbacks?: any // TODO add this
24
+ notes?: any // TODO add this
24
25
 
25
26
  deletedAt: string | null
26
27
  createdAt: string
27
28
  updatedAt: string
28
29
  }
29
30
 
31
+ export type AdminCandidacyResponse = AdminCandidacy
32
+
33
+ export type AdminCandidacyListResponse = ListResponse<AdminCandidacy>
34
+
30
35
  /*
31
36
  model Candidacy {
32
37
  id String @id @default(uuid())
@@ -1,4 +1,4 @@
1
- import { ListResponse } from '../../shared'
1
+ import { ListRequest, ListResponse } from '../../shared'
2
2
  import { AdminCandidacy } from '../candidacies'
3
3
 
4
4
  // main model
@@ -43,24 +43,24 @@ export type AdminPerson = {
43
43
 
44
44
  sourcePersonId: string | null
45
45
  sourcePerson: AdminPerson | null
46
- sourcedPersons: AdminPerson[] | null
46
+ sourcedPersons?: AdminPerson[] | null
47
47
 
48
- bestiedByPersons: AdminPerson[] | null
49
- bestPersons: AdminPerson[]
48
+ bestiedByPersons?: AdminPerson[] | null
49
+ bestPersons?: AdminPerson[]
50
50
 
51
51
  clientId: string | null
52
52
  client: any // TODO add this
53
53
 
54
- actions: any // TODO add this
54
+ actions?: any // TODO add this
55
55
  admin: any // TODO add this
56
- candidacies: AdminCandidacy[] | null
56
+ candidacies?: AdminCandidacy[] | null
57
57
  clubs: any // TODO add this
58
- conversations: any // TODO add this
59
- enrichment: any // TODO add this
60
- messages: any // TODO add this
58
+ conversations?: any // TODO add this
59
+ enrichment?: any // TODO add this
60
+ messages?: any // TODO add this
61
61
  networks: any // TODO add this
62
- notes: any // TODO add this
63
- referrals: any // TODO add this
62
+ notes?: any // TODO add this
63
+ referrals?: any // TODO add this
64
64
  skills: any // TODO add this
65
65
  tags: any // TODO add this
66
66
 
@@ -81,14 +81,9 @@ export type AdminPersonRequestParams = Pick<AdminPerson, 'id'>
81
81
 
82
82
  // list
83
83
 
84
- export type AdminPersonsListRequest = {
85
- take: number
86
- skip: number
87
- orderBy: any // TODO add this
88
- where: any // TODO add this
89
- }
84
+ export type AdminPersonListRequest = ListRequest
90
85
 
91
- export type AdminPersonsListResponse = ListResponse<AdminPerson>
86
+ export type AdminPersonListResponse = ListResponse<AdminPerson>
92
87
 
93
88
  // create
94
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
+ }