-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added post / delete / patch API routes to @monkvision/network
- Loading branch information
Showing
16 changed files
with
740 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './requests'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { | ||
MonkEntityType, | ||
PricingV2Details, | ||
PricingV2RelatedItemType, | ||
RepairOperationType, | ||
} from '@monkvision/types'; | ||
import { ApiPricingV2Details } from '../models'; | ||
|
||
export function mapApiPricingPost( | ||
inspectionId: string, | ||
response: ApiPricingV2Details, | ||
): PricingV2Details { | ||
return { | ||
inspectionId, | ||
id: response.id, | ||
entityType: MonkEntityType.PRICING, | ||
relatedItemType: response.related_item_type as PricingV2RelatedItemType, | ||
relatedItemId: response.related_item_id, | ||
pricing: response.pricing, | ||
operations: response.operations as RepairOperationType[] | undefined, | ||
hours: response.hours, | ||
}; | ||
} |
Oops, something went wrong.