Skip to content

Commit

Permalink
follow insert/set naming convention now that update doesn't use the i…
Browse files Browse the repository at this point in the history
…nput type
  • Loading branch information
skovati committed Sep 4, 2024
1 parent d79cb98 commit b93ad1d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 2 additions & 4 deletions src/types/scheduling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,8 @@ export type SchedulingGoalInsertInput = Omit<
};

export type SchedulingConditionPlanSpecInsertInput = Omit<SchedulingConditionPlanSpecification, 'condition_metadata'>;
export type SchedulingGoalPlanSpecInsertInput = Omit<SchedulingGoalPlanSpecification, 'goal_metadata'>;

// omit goal_invocation_id since DB will set it when inserting a new invocation
export type SchedulingGoalPlanSpecInvocationInsertInput = Omit<SchedulingGoalPlanSpecInsertInput, 'goal_invocation_id'>;
export type SchedulingGoalPlanSpecSetInput = Omit<SchedulingGoalPlanSpecification, 'goal_metadata'>;
export type SchedulingGoalPlanSpecInsertInput = Omit<SchedulingGoalPlanSpecSetInput, 'goal_invocation_id'>;

export type SchedulingConditionMetadataSetInput = PartialWith<SchedulingConditionMetadata, 'owner'>;
export type SchedulingGoalMetadataSetInput = PartialWith<SchedulingGoalMetadata, 'owner'>;
Expand Down
6 changes: 3 additions & 3 deletions src/utilities/effects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ import type {
SchedulingGoalModelSpecificationInsertInput,
SchedulingGoalModelSpecificationSetInput,
SchedulingGoalPlanSpecInsertInput,
SchedulingGoalPlanSpecInvocationInsertInput,
SchedulingGoalPlanSpecSetInput,
SchedulingGoalPlanSpecification,
SchedulingPlanSpecification,
SchedulingPlanSpecificationInsertInput,
Expand Down Expand Up @@ -1422,7 +1422,7 @@ const effects = {
},

async createSchedulingGoalPlanSpecification(
spec_goal: SchedulingGoalPlanSpecInvocationInsertInput,
spec_goal: SchedulingGoalPlanSpecInsertInput,
user: User | null,
): Promise<number | null> {
try {
Expand Down Expand Up @@ -5376,7 +5376,7 @@ const effects = {

async updateSchedulingGoalPlanSpecification(
plan: Plan,
schedulingGoalPlanSpecification: SchedulingGoalPlanSpecInsertInput,
schedulingGoalPlanSpecification: SchedulingGoalPlanSpecSetInput,
user: User | null,
) {
try {
Expand Down

0 comments on commit b93ad1d

Please sign in to comment.