@the-inkwell/shared 0.1.90 → 0.1.92

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.
@@ -17,5 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./candidacies"), exports);
18
18
  __exportStar(require("./clients"), exports);
19
19
  __exportStar(require("./persons"), exports);
20
+ __exportStar(require("./positions"), exports);
20
21
  __exportStar(require("./referrals"), exports);
21
22
  __exportStar(require("./website"), exports);
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /*
4
+ export default interface Positions {
5
+ id: PositionsId;
6
+
7
+ urlId: number;
8
+
9
+ name: string;
10
+
11
+ status: PositionStatuses | null;
12
+
13
+ isHidden: boolean;
14
+
15
+ clientId: ClientsId;
16
+
17
+ createdAt: Date;
18
+
19
+ updatedAt: Date;
20
+
21
+ deletedAt: Date | null;
22
+ }
23
+ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-inkwell/shared",
3
- "version": "0.1.90",
3
+ "version": "0.1.92",
4
4
  "description": "Shared code for Inkwell",
5
5
  "license": "ISC",
6
6
  "author": "Inkwell (Rob Yedlin & Saimon Alam)",
@@ -3,6 +3,7 @@ import Client, {
3
3
  ClientsInitializer,
4
4
  ClientsMutator
5
5
  } from '../../../_schema/Clients'
6
+ import ClientStatuses from '../../../_schema/ClientStatuses'
6
7
 
7
8
  export type AdminClient = Client & {
8
9
  _openPositionsCount: number
@@ -17,7 +18,12 @@ export type AdminClientResponse = AdminClient
17
18
 
18
19
  // list
19
20
 
20
- export type AdminClientListInput = ListRequest
21
+ export type AdminClientListInput = ListRequest<
22
+ unknown,
23
+ {
24
+ status?: ClientStatuses[]
25
+ }
26
+ >
21
27
  export type AdminClientListResponse = ListResponse<AdminClient>
22
28
 
23
29
  // create
@@ -1,5 +1,6 @@
1
1
  export * from './candidacies'
2
2
  export * from './clients'
3
3
  export * from './persons'
4
+ export * from './positions'
4
5
  export * from './referrals'
5
6
  export * from './website'
@@ -0,0 +1,64 @@
1
+ import Positions, {
2
+ PositionsInitializer,
3
+ PositionsMutator
4
+ } from '../../../_schema/Positions'
5
+ import Clients from '../../../_schema/Clients'
6
+ import { ListRequest, ListResponse } from '../../../utils'
7
+
8
+ export type AdminPosition = Positions & {
9
+ client: Pick<Clients, 'id' | 'name'>
10
+ _openReferralsCount: number
11
+ _openCandidaciesCount: number
12
+ }
13
+ type AdminPositionInitializer = PositionsInitializer
14
+ type AdminPositionMutator = PositionsMutator
15
+
16
+ // detail
17
+
18
+ export type AdminPositionQueryParams = Pick<AdminPosition, 'id'>
19
+ export type AdminPositionResponse = AdminPosition
20
+
21
+ // list
22
+
23
+ export type AdminPositionListInput = ListRequest
24
+ export type AdminPositionListResponse = ListResponse<AdminPosition>
25
+
26
+ // create
27
+
28
+ export type AdminPositionCreateInput = Pick<
29
+ AdminPositionInitializer,
30
+ 'name' | 'status' | 'isHidden' | 'clientId'
31
+ >
32
+ export type AdminPositionCreateResponse = Pick<AdminPosition, 'id'>
33
+
34
+ // update
35
+ export type AdminPositionUpdateInput = Pick<
36
+ AdminPositionMutator,
37
+ 'name' | 'status' | 'isHidden'
38
+ >
39
+
40
+ // delete
41
+
42
+ export type AdminPositionDeleteQueryParams = Pick<AdminPosition, 'id'>
43
+
44
+ /*
45
+ export default interface Positions {
46
+ id: PositionsId;
47
+
48
+ urlId: number;
49
+
50
+ name: string;
51
+
52
+ status: PositionStatuses | null;
53
+
54
+ isHidden: boolean;
55
+
56
+ clientId: ClientsId;
57
+
58
+ createdAt: Date;
59
+
60
+ updatedAt: Date;
61
+
62
+ deletedAt: Date | null;
63
+ }
64
+ */