@the-inkwell/shared 0.1.69 → 0.1.70

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.
Files changed (38) hide show
  1. package/package.json +1 -1
  2. package/src/types/_schema/Action.ts +61 -16
  3. package/src/types/_schema/Admin.ts +21 -8
  4. package/src/types/_schema/Campaign.ts +54 -14
  5. package/src/types/_schema/CampaignToPosition.ts +26 -9
  6. package/src/types/_schema/Candidacy.ts +59 -15
  7. package/src/types/_schema/CandidacyFeedback.ts +37 -11
  8. package/src/types/_schema/CandidacyRatingToTag.ts +26 -9
  9. package/src/types/_schema/Client.ts +38 -11
  10. package/src/types/_schema/Contract.ts +42 -12
  11. package/src/types/_schema/Conversation.ts +43 -12
  12. package/src/types/_schema/Jwt.ts +37 -11
  13. package/src/types/_schema/ListView.ts +52 -14
  14. package/src/types/_schema/Message.ts +48 -13
  15. package/src/types/_schema/MessageTemplate.ts +37 -12
  16. package/src/types/_schema/Note.ts +52 -14
  17. package/src/types/_schema/Otp.ts +42 -12
  18. package/src/types/_schema/Person.ts +233 -49
  19. package/src/types/_schema/PersonClub.ts +37 -12
  20. package/src/types/_schema/PersonEnrichment.ts +42 -12
  21. package/src/types/_schema/PersonNetwork.ts +37 -12
  22. package/src/types/_schema/PersonSkill.ts +37 -12
  23. package/src/types/_schema/PersonToBestPerson.ts +20 -8
  24. package/src/types/_schema/PersonToPersonClub.ts +20 -8
  25. package/src/types/_schema/PersonToPersonNetwork.ts +20 -8
  26. package/src/types/_schema/PersonToPersonSkill.ts +20 -8
  27. package/src/types/_schema/PersonToTag.ts +20 -8
  28. package/src/types/_schema/Position.ts +55 -14
  29. package/src/types/_schema/Referral.ts +53 -14
  30. package/src/types/_schema/ReferralPayout.ts +15 -7
  31. package/src/types/_schema/ReferralToIntroMessage.ts +26 -9
  32. package/src/types/_schema/Sender.ts +42 -13
  33. package/src/types/_schema/Tag.ts +32 -11
  34. package/src/types/_schema/WebsiteBlock.ts +30 -11
  35. package/src/types/_schema/WebsiteLandingPage.ts +32 -11
  36. package/src/types/_schema/WebsiteStaticPage.ts +37 -12
  37. package/src/types/models/admin/persons/index.ts +5 -4
  38. package/src/types/models/admin/website/index.ts +15 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-inkwell/shared",
3
- "version": "0.1.69",
3
+ "version": "0.1.70",
4
4
  "description": "Shared code for Inkwell",
5
5
  "license": "ISC",
6
6
  "author": "Inkwell (Rob Yedlin)",
@@ -9,38 +9,83 @@ import type { PersonId } from './Person';
9
9
  import type { PositionId } from './Position';
10
10
  import type { ReferralId } from './Referral';
11
11
  import type { default as ActionNames } from './ActionNames';
12
- import type { ColumnType, Selectable, Insertable, Updateable } from 'kysely';
13
12
 
14
13
  /** Identifier type for public.Action */
15
14
  export type ActionId = string & { __brand: 'ActionId' };
16
15
 
17
16
  /** Represents the table public.Action */
18
- export default interface ActionTable {
19
- id: ColumnType<ActionId, ActionId | undefined, ActionId>;
17
+ export default interface Action {
18
+ id: ActionId;
20
19
 
21
- candidacyId: ColumnType<CandidacyId | null, CandidacyId | null, CandidacyId | null>;
20
+ candidacyId: CandidacyId | null;
22
21
 
23
- clientId: ColumnType<ClientId | null, ClientId | null, ClientId | null>;
22
+ clientId: ClientId | null;
24
23
 
25
- messageId: ColumnType<MessageId | null, MessageId | null, MessageId | null>;
24
+ messageId: MessageId | null;
26
25
 
27
- noteId: ColumnType<NoteId | null, NoteId | null, NoteId | null>;
26
+ noteId: NoteId | null;
28
27
 
29
- personId: ColumnType<PersonId | null, PersonId | null, PersonId | null>;
28
+ personId: PersonId | null;
30
29
 
31
- positionId: ColumnType<PositionId | null, PositionId | null, PositionId | null>;
30
+ positionId: PositionId | null;
32
31
 
33
- referralId: ColumnType<ReferralId | null, ReferralId | null, ReferralId | null>;
32
+ referralId: ReferralId | null;
34
33
 
35
- data: ColumnType<unknown, unknown, unknown>;
34
+ data: unknown;
36
35
 
37
- createdAt: ColumnType<Date, Date | string | undefined, Date | string>;
36
+ createdAt: Date;
38
37
 
39
- name: ColumnType<ActionNames, ActionNames, ActionNames>;
38
+ name: ActionNames;
40
39
  }
41
40
 
42
- export type Action = Selectable<ActionTable>;
41
+ /** Represents the initializer for the table public.Action */
42
+ export interface ActionInitializer {
43
+ /** Default value: gen_random_uuid() */
44
+ id?: ActionId;
43
45
 
44
- export type NewAction = Insertable<ActionTable>;
46
+ candidacyId?: CandidacyId | null;
45
47
 
46
- export type ActionUpdate = Updateable<ActionTable>;
48
+ clientId?: ClientId | null;
49
+
50
+ messageId?: MessageId | null;
51
+
52
+ noteId?: NoteId | null;
53
+
54
+ personId?: PersonId | null;
55
+
56
+ positionId?: PositionId | null;
57
+
58
+ referralId?: ReferralId | null;
59
+
60
+ data: unknown;
61
+
62
+ /** Default value: CURRENT_TIMESTAMP */
63
+ createdAt?: Date;
64
+
65
+ name: ActionNames;
66
+ }
67
+
68
+ /** Represents the mutator for the table public.Action */
69
+ export interface ActionMutator {
70
+ id?: ActionId;
71
+
72
+ candidacyId?: CandidacyId | null;
73
+
74
+ clientId?: ClientId | null;
75
+
76
+ messageId?: MessageId | null;
77
+
78
+ noteId?: NoteId | null;
79
+
80
+ personId?: PersonId | null;
81
+
82
+ positionId?: PositionId | null;
83
+
84
+ referralId?: ReferralId | null;
85
+
86
+ data?: unknown;
87
+
88
+ createdAt?: Date;
89
+
90
+ name?: ActionNames;
91
+ }
@@ -2,22 +2,35 @@
2
2
  // This file is automatically generated by Kanel. Do not modify manually.
3
3
 
4
4
  import type { PersonId } from './Person';
5
- import type { ColumnType, Selectable, Insertable, Updateable } from 'kysely';
6
5
 
7
6
  /** Identifier type for public.Admin */
8
7
  export type AdminId = string & { __brand: 'AdminId' };
9
8
 
10
9
  /** Represents the table public.Admin */
11
- export default interface AdminTable {
12
- id: ColumnType<AdminId, AdminId | undefined, AdminId>;
10
+ export default interface Admin {
11
+ id: AdminId;
13
12
 
14
- personId: ColumnType<PersonId, PersonId, PersonId>;
13
+ personId: PersonId;
15
14
 
16
- createdAt: ColumnType<Date, Date | string | undefined, Date | string>;
15
+ createdAt: Date;
17
16
  }
18
17
 
19
- export type Admin = Selectable<AdminTable>;
18
+ /** Represents the initializer for the table public.Admin */
19
+ export interface AdminInitializer {
20
+ /** Default value: gen_random_uuid() */
21
+ id?: AdminId;
20
22
 
21
- export type NewAdmin = Insertable<AdminTable>;
23
+ personId: PersonId;
22
24
 
23
- export type AdminUpdate = Updateable<AdminTable>;
25
+ /** Default value: CURRENT_TIMESTAMP */
26
+ createdAt?: Date;
27
+ }
28
+
29
+ /** Represents the mutator for the table public.Admin */
30
+ export interface AdminMutator {
31
+ id?: AdminId;
32
+
33
+ personId?: PersonId;
34
+
35
+ createdAt?: Date;
36
+ }
@@ -4,34 +4,74 @@
4
4
  import type { default as CampaignStatuses } from './CampaignStatuses';
5
5
  import type { MessageTemplateId } from './MessageTemplate';
6
6
  import type { default as MessageChannels } from './MessageChannels';
7
- import type { ColumnType, Selectable, Insertable, Updateable } from 'kysely';
8
7
 
9
8
  /** Identifier type for public.Campaign */
10
9
  export type CampaignId = string & { __brand: 'CampaignId' };
11
10
 
12
11
  /** Represents the table public.Campaign */
13
- export default interface CampaignTable {
14
- id: ColumnType<CampaignId, CampaignId | undefined, CampaignId>;
12
+ export default interface Campaign {
13
+ id: CampaignId;
15
14
 
16
- urlId: ColumnType<number, number | undefined, number>;
15
+ urlId: number;
17
16
 
18
- status: ColumnType<CampaignStatuses, CampaignStatuses | undefined, CampaignStatuses>;
17
+ status: CampaignStatuses;
19
18
 
20
- messageTemplateId: ColumnType<MessageTemplateId | null, MessageTemplateId | null, MessageTemplateId | null>;
19
+ messageTemplateId: MessageTemplateId | null;
21
20
 
22
- channels: ColumnType<MessageChannels[] | null, MessageChannels[] | null, MessageChannels[] | null>;
21
+ channels: MessageChannels[] | null;
23
22
 
24
- content: ColumnType<unknown, unknown, unknown>;
23
+ content: unknown;
25
24
 
26
- createdAt: ColumnType<Date, Date | string | undefined, Date | string>;
25
+ createdAt: Date;
27
26
 
28
- deletedAt: ColumnType<Date | null, Date | string | null, Date | string | null>;
27
+ deletedAt: Date | null;
29
28
 
30
- updatedAt: ColumnType<Date, Date | string | undefined, Date | string>;
29
+ updatedAt: Date;
31
30
  }
32
31
 
33
- export type Campaign = Selectable<CampaignTable>;
32
+ /** Represents the initializer for the table public.Campaign */
33
+ export interface CampaignInitializer {
34
+ /** Default value: gen_random_uuid() */
35
+ id?: CampaignId;
34
36
 
35
- export type NewCampaign = Insertable<CampaignTable>;
37
+ /** Default value: nextval('"Campaign_urlId_seq"'::regclass) */
38
+ urlId?: number;
36
39
 
37
- export type CampaignUpdate = Updateable<CampaignTable>;
40
+ /** Default value: 'DRAFT'::"CampaignStatuses" */
41
+ status?: CampaignStatuses;
42
+
43
+ messageTemplateId?: MessageTemplateId | null;
44
+
45
+ channels?: MessageChannels[] | null;
46
+
47
+ content: unknown;
48
+
49
+ /** Default value: CURRENT_TIMESTAMP */
50
+ createdAt?: Date;
51
+
52
+ deletedAt?: Date | null;
53
+
54
+ /** Default value: CURRENT_TIMESTAMP */
55
+ updatedAt?: Date;
56
+ }
57
+
58
+ /** Represents the mutator for the table public.Campaign */
59
+ export interface CampaignMutator {
60
+ id?: CampaignId;
61
+
62
+ urlId?: number;
63
+
64
+ status?: CampaignStatuses;
65
+
66
+ messageTemplateId?: MessageTemplateId | null;
67
+
68
+ channels?: MessageChannels[] | null;
69
+
70
+ content?: unknown;
71
+
72
+ createdAt?: Date;
73
+
74
+ deletedAt?: Date | null;
75
+
76
+ updatedAt?: Date;
77
+ }
@@ -3,21 +3,38 @@
3
3
 
4
4
  import type { CampaignId } from './Campaign';
5
5
  import type { PositionId } from './Position';
6
- import type { ColumnType, Selectable, Insertable, Updateable } from 'kysely';
7
6
 
8
7
  /** Represents the table public.CampaignToPosition */
9
- export default interface CampaignToPositionTable {
10
- campaignId: ColumnType<CampaignId, CampaignId, CampaignId>;
8
+ export default interface CampaignToPosition {
9
+ campaignId: CampaignId;
11
10
 
12
- positionId: ColumnType<PositionId, PositionId, PositionId>;
11
+ positionId: PositionId;
13
12
 
14
- createdAt: ColumnType<Date, Date | string | undefined, Date | string>;
13
+ createdAt: Date;
15
14
 
16
- updatedAt: ColumnType<Date, Date | string | undefined, Date | string>;
15
+ updatedAt: Date;
17
16
  }
18
17
 
19
- export type CampaignToPosition = Selectable<CampaignToPositionTable>;
18
+ /** Represents the initializer for the table public.CampaignToPosition */
19
+ export interface CampaignToPositionInitializer {
20
+ campaignId: CampaignId;
20
21
 
21
- export type NewCampaignToPosition = Insertable<CampaignToPositionTable>;
22
+ positionId: PositionId;
22
23
 
23
- export type CampaignToPositionUpdate = Updateable<CampaignToPositionTable>;
24
+ /** Default value: CURRENT_TIMESTAMP */
25
+ createdAt?: Date;
26
+
27
+ /** Default value: CURRENT_TIMESTAMP */
28
+ updatedAt?: Date;
29
+ }
30
+
31
+ /** Represents the mutator for the table public.CampaignToPosition */
32
+ export interface CampaignToPositionMutator {
33
+ campaignId?: CampaignId;
34
+
35
+ positionId?: PositionId;
36
+
37
+ createdAt?: Date;
38
+
39
+ updatedAt?: Date;
40
+ }
@@ -5,36 +5,80 @@ import type { default as CandidacyStatuses } from './CandidacyStatuses';
5
5
  import type { default as CandidacySources } from './CandidacySources';
6
6
  import type { PersonId } from './Person';
7
7
  import type { PositionId } from './Position';
8
- import type { ColumnType, Selectable, Insertable, Updateable } from 'kysely';
9
8
 
10
9
  /** Identifier type for public.Candidacy */
11
10
  export type CandidacyId = string & { __brand: 'CandidacyId' };
12
11
 
13
12
  /** Represents the table public.Candidacy */
14
- export default interface CandidacyTable {
15
- id: ColumnType<CandidacyId, CandidacyId | undefined, CandidacyId>;
13
+ export default interface Candidacy {
14
+ id: CandidacyId;
16
15
 
17
- currentStatus: ColumnType<CandidacyStatuses | null, CandidacyStatuses | null, CandidacyStatuses | null>;
16
+ currentStatus: CandidacyStatuses | null;
18
17
 
19
- rating: ColumnType<number | null, number | null, number | null>;
18
+ rating: number | null;
20
19
 
21
- ratingNotes: ColumnType<string | null, string | null, string | null>;
20
+ ratingNotes: string | null;
22
21
 
23
- source: ColumnType<CandidacySources | null, CandidacySources | null, CandidacySources | null>;
22
+ source: CandidacySources | null;
24
23
 
25
- personId: ColumnType<PersonId, PersonId, PersonId>;
24
+ personId: PersonId;
26
25
 
27
- positionId: ColumnType<PositionId, PositionId, PositionId>;
26
+ positionId: PositionId;
28
27
 
29
- deletedAt: ColumnType<Date | null, Date | string | null, Date | string | null>;
28
+ deletedAt: Date | null;
30
29
 
31
- createdAt: ColumnType<Date, Date | string | undefined, Date | string>;
30
+ createdAt: Date;
32
31
 
33
- updatedAt: ColumnType<Date, Date | string | undefined, Date | string>;
32
+ updatedAt: Date;
34
33
  }
35
34
 
36
- export type Candidacy = Selectable<CandidacyTable>;
35
+ /** Represents the initializer for the table public.Candidacy */
36
+ export interface CandidacyInitializer {
37
+ /** Default value: gen_random_uuid() */
38
+ id?: CandidacyId;
37
39
 
38
- export type NewCandidacy = Insertable<CandidacyTable>;
40
+ /** Default value: 'SUBMITTED'::"CandidacyStatuses" */
41
+ currentStatus?: CandidacyStatuses | null;
39
42
 
40
- export type CandidacyUpdate = Updateable<CandidacyTable>;
43
+ rating?: number | null;
44
+
45
+ ratingNotes?: string | null;
46
+
47
+ /** Default value: 'STAFF'::"CandidacySources" */
48
+ source?: CandidacySources | null;
49
+
50
+ personId: PersonId;
51
+
52
+ positionId: PositionId;
53
+
54
+ deletedAt?: Date | null;
55
+
56
+ /** Default value: CURRENT_TIMESTAMP */
57
+ createdAt?: Date;
58
+
59
+ /** Default value: CURRENT_TIMESTAMP */
60
+ updatedAt?: Date;
61
+ }
62
+
63
+ /** Represents the mutator for the table public.Candidacy */
64
+ export interface CandidacyMutator {
65
+ id?: CandidacyId;
66
+
67
+ currentStatus?: CandidacyStatuses | null;
68
+
69
+ rating?: number | null;
70
+
71
+ ratingNotes?: string | null;
72
+
73
+ source?: CandidacySources | null;
74
+
75
+ personId?: PersonId;
76
+
77
+ positionId?: PositionId;
78
+
79
+ deletedAt?: Date | null;
80
+
81
+ createdAt?: Date;
82
+
83
+ updatedAt?: Date;
84
+ }
@@ -2,28 +2,54 @@
2
2
  // This file is automatically generated by Kanel. Do not modify manually.
3
3
 
4
4
  import type { CandidacyId } from './Candidacy';
5
- import type { ColumnType, Selectable, Insertable, Updateable } from 'kysely';
6
5
 
7
6
  /** Identifier type for public.CandidacyFeedback */
8
7
  export type CandidacyFeedbackId = string & { __brand: 'CandidacyFeedbackId' };
9
8
 
10
9
  /** Represents the table public.CandidacyFeedback */
11
- export default interface CandidacyFeedbackTable {
12
- id: ColumnType<CandidacyFeedbackId, CandidacyFeedbackId | undefined, CandidacyFeedbackId>;
10
+ export default interface CandidacyFeedback {
11
+ id: CandidacyFeedbackId;
13
12
 
14
- candidacyId: ColumnType<CandidacyId, CandidacyId, CandidacyId>;
13
+ candidacyId: CandidacyId;
15
14
 
16
- content: ColumnType<string, string, string>;
15
+ content: string;
17
16
 
18
- createdAt: ColumnType<Date, Date | string | undefined, Date | string>;
17
+ createdAt: Date;
19
18
 
20
- updatedAt: ColumnType<Date, Date | string | undefined, Date | string>;
19
+ updatedAt: Date;
21
20
 
22
- deletedAt: ColumnType<Date | null, Date | string | null, Date | string | null>;
21
+ deletedAt: Date | null;
23
22
  }
24
23
 
25
- export type CandidacyFeedback = Selectable<CandidacyFeedbackTable>;
24
+ /** Represents the initializer for the table public.CandidacyFeedback */
25
+ export interface CandidacyFeedbackInitializer {
26
+ /** Default value: gen_random_uuid() */
27
+ id?: CandidacyFeedbackId;
26
28
 
27
- export type NewCandidacyFeedback = Insertable<CandidacyFeedbackTable>;
29
+ candidacyId: CandidacyId;
28
30
 
29
- export type CandidacyFeedbackUpdate = Updateable<CandidacyFeedbackTable>;
31
+ content: string;
32
+
33
+ /** Default value: CURRENT_TIMESTAMP */
34
+ createdAt?: Date;
35
+
36
+ /** Default value: CURRENT_TIMESTAMP */
37
+ updatedAt?: Date;
38
+
39
+ deletedAt?: Date | null;
40
+ }
41
+
42
+ /** Represents the mutator for the table public.CandidacyFeedback */
43
+ export interface CandidacyFeedbackMutator {
44
+ id?: CandidacyFeedbackId;
45
+
46
+ candidacyId?: CandidacyId;
47
+
48
+ content?: string;
49
+
50
+ createdAt?: Date;
51
+
52
+ updatedAt?: Date;
53
+
54
+ deletedAt?: Date | null;
55
+ }
@@ -3,21 +3,38 @@
3
3
 
4
4
  import type { TagId } from './Tag';
5
5
  import type { CandidacyId } from './Candidacy';
6
- import type { ColumnType, Selectable, Insertable, Updateable } from 'kysely';
7
6
 
8
7
  /** Represents the table public.CandidacyRatingToTag */
9
- export default interface CandidacyRatingToTagTable {
10
- tagId: ColumnType<TagId, TagId, TagId>;
8
+ export default interface CandidacyRatingToTag {
9
+ tagId: TagId;
11
10
 
12
- candidacyId: ColumnType<CandidacyId, CandidacyId, CandidacyId>;
11
+ candidacyId: CandidacyId;
13
12
 
14
- createdAt: ColumnType<Date, Date | string | undefined, Date | string>;
13
+ createdAt: Date;
15
14
 
16
- updatedAt: ColumnType<Date, Date | string | undefined, Date | string>;
15
+ updatedAt: Date;
17
16
  }
18
17
 
19
- export type CandidacyRatingToTag = Selectable<CandidacyRatingToTagTable>;
18
+ /** Represents the initializer for the table public.CandidacyRatingToTag */
19
+ export interface CandidacyRatingToTagInitializer {
20
+ tagId: TagId;
20
21
 
21
- export type NewCandidacyRatingToTag = Insertable<CandidacyRatingToTagTable>;
22
+ candidacyId: CandidacyId;
22
23
 
23
- export type CandidacyRatingToTagUpdate = Updateable<CandidacyRatingToTagTable>;
24
+ /** Default value: CURRENT_TIMESTAMP */
25
+ createdAt?: Date;
26
+
27
+ /** Default value: CURRENT_TIMESTAMP */
28
+ updatedAt?: Date;
29
+ }
30
+
31
+ /** Represents the mutator for the table public.CandidacyRatingToTag */
32
+ export interface CandidacyRatingToTagMutator {
33
+ tagId?: TagId;
34
+
35
+ candidacyId?: CandidacyId;
36
+
37
+ createdAt?: Date;
38
+
39
+ updatedAt?: Date;
40
+ }
@@ -2,28 +2,55 @@
2
2
  // This file is automatically generated by Kanel. Do not modify manually.
3
3
 
4
4
  import type { default as ClientStatuses } from './ClientStatuses';
5
- import type { ColumnType, Selectable, Insertable, Updateable } from 'kysely';
6
5
 
7
6
  /** Identifier type for public.Client */
8
7
  export type ClientId = string & { __brand: 'ClientId' };
9
8
 
10
9
  /** Represents the table public.Client */
11
- export default interface ClientTable {
12
- id: ColumnType<ClientId, ClientId | undefined, ClientId>;
10
+ export default interface Client {
11
+ id: ClientId;
13
12
 
14
- name: ColumnType<string, string, string>;
13
+ name: string;
15
14
 
16
- description: ColumnType<string, string, string>;
15
+ description: string;
17
16
 
18
- currentStatus: ColumnType<ClientStatuses | null, ClientStatuses | null, ClientStatuses | null>;
17
+ currentStatus: ClientStatuses | null;
19
18
 
20
- createdAt: ColumnType<Date, Date | string | undefined, Date | string>;
19
+ createdAt: Date;
21
20
 
22
- updatedAt: ColumnType<Date, Date | string | undefined, Date | string>;
21
+ updatedAt: Date;
23
22
  }
24
23
 
25
- export type Client = Selectable<ClientTable>;
24
+ /** Represents the initializer for the table public.Client */
25
+ export interface ClientInitializer {
26
+ /** Default value: gen_random_uuid() */
27
+ id?: ClientId;
26
28
 
27
- export type NewClient = Insertable<ClientTable>;
29
+ name: string;
28
30
 
29
- export type ClientUpdate = Updateable<ClientTable>;
31
+ description: string;
32
+
33
+ /** Default value: 'ACTIVE'::"ClientStatuses" */
34
+ currentStatus?: ClientStatuses | null;
35
+
36
+ /** Default value: CURRENT_TIMESTAMP */
37
+ createdAt?: Date;
38
+
39
+ /** Default value: CURRENT_TIMESTAMP */
40
+ updatedAt?: Date;
41
+ }
42
+
43
+ /** Represents the mutator for the table public.Client */
44
+ export interface ClientMutator {
45
+ id?: ClientId;
46
+
47
+ name?: string;
48
+
49
+ description?: string;
50
+
51
+ currentStatus?: ClientStatuses | null;
52
+
53
+ createdAt?: Date;
54
+
55
+ updatedAt?: Date;
56
+ }
@@ -3,30 +3,60 @@
3
3
 
4
4
  import type { PositionId } from './Position';
5
5
  import type { ClientId } from './Client';
6
- import type { ColumnType, Selectable, Insertable, Updateable } from 'kysely';
7
6
 
8
7
  /** Identifier type for public.Contract */
9
8
  export type ContractId = string & { __brand: 'ContractId' };
10
9
 
11
10
  /** Represents the table public.Contract */
12
- export default interface ContractTable {
13
- id: ColumnType<ContractId, ContractId | undefined, ContractId>;
11
+ export default interface Contract {
12
+ id: ContractId;
14
13
 
15
- data: ColumnType<unknown, unknown, unknown>;
14
+ data: unknown;
16
15
 
17
- documentUrl: ColumnType<string, string, string>;
16
+ documentUrl: string;
18
17
 
19
- positionId: ColumnType<PositionId | null, PositionId | null, PositionId | null>;
18
+ positionId: PositionId | null;
20
19
 
21
- clientId: ColumnType<ClientId, ClientId, ClientId>;
20
+ clientId: ClientId;
22
21
 
23
- createdAt: ColumnType<Date, Date | string | undefined, Date | string>;
22
+ createdAt: Date;
24
23
 
25
- updatedAt: ColumnType<Date, Date | string | undefined, Date | string>;
24
+ updatedAt: Date;
26
25
  }
27
26
 
28
- export type Contract = Selectable<ContractTable>;
27
+ /** Represents the initializer for the table public.Contract */
28
+ export interface ContractInitializer {
29
+ /** Default value: gen_random_uuid() */
30
+ id?: ContractId;
29
31
 
30
- export type NewContract = Insertable<ContractTable>;
32
+ data: unknown;
31
33
 
32
- export type ContractUpdate = Updateable<ContractTable>;
34
+ documentUrl: string;
35
+
36
+ positionId?: PositionId | null;
37
+
38
+ clientId: ClientId;
39
+
40
+ /** Default value: CURRENT_TIMESTAMP */
41
+ createdAt?: Date;
42
+
43
+ /** Default value: CURRENT_TIMESTAMP */
44
+ updatedAt?: Date;
45
+ }
46
+
47
+ /** Represents the mutator for the table public.Contract */
48
+ export interface ContractMutator {
49
+ id?: ContractId;
50
+
51
+ data?: unknown;
52
+
53
+ documentUrl?: string;
54
+
55
+ positionId?: PositionId | null;
56
+
57
+ clientId?: ClientId;
58
+
59
+ createdAt?: Date;
60
+
61
+ updatedAt?: Date;
62
+ }