Pet Services
Manages pet profiles, profile images, and AI-recommended pet images.
Pre-requisite: The user has to be signed in to perform the following operations.
Overview
The pet services APIs provide functionality to create and manage pet profiles, upload and manage pet images, and handle AI-recommended pet image workflows.
Create Pet Profile
To create a new pet profile within a space, The following method can be used:
spaceId(required): The space ID of the User.request(required): Contains pet profile information.
Factory.petService.createPetProfile(
spaceId: String,
request: CreatePetProfileRequest
) -> IVPublisher<PetProfile>
List Pet Profiles
To fetch all pet profiles associated with a space, The following method can be used:
spaceId(required): The space ID of the User.
Factory.petService.listPetProfiles(
spaceId: String
) -> IVPublisher<ListPetProfilesResponse>
Get Pet Profile
To fetch detailed information of a specific pet profile, The following method can be used:
spaceId(required): The space ID of the User.petId(required): The ID of the Pet.
Factory.petService.getPetProfile(
spaceId: String,
petId: String
) -> IVPublisher<PetProfileDetail>
Update Pet Profile
To update an existing pet profile, The following method can be used:
spaceId(required): The space ID of the user.petId(required): The ID of the pet.request(required): Updated pet profile details.
Factory.petService.updatePetProfile(
spaceId: String,
petId: String,
request: UpdatePetProfileRequest
) -> IVPublisher<PetProfile>
Delete Profile Image
To delete the profile image of a pet, The following method can be used:
spaceId(required): The space ID of the user.petId(required): The ID of the pet.
Factory.petService.deleteProfileImage(
spaceId: String,
petId: String
) -> IVPublisher<Void>
Delete Pet Profile
To delete a pet profile, The following method can be used:
spaceId(required): The space ID of the user.petId(required): The ID of the pet.
Factory.petService.deletePetProfile(
spaceId: String,
petId: String
) -> IVPublisher<Void>
Get Pet Image Upload URL
To retrieve a pre-signed URL for uploading a pet image, The following method can be used:
spaceId(required): The space ID of the User.petId(required): The ID of the pet.
Factory.petService.getPetImageUploadURL(
spaceId: String,
petId: String
) -> IVPublisher<GetUploadUrlResponse>
Upload Pet Image
To upload a pet image using a pre-signed URL, The following method can be used:
data(required): The image data to upload.url(required): The pre-signed upload URL.authToken(required): The authorization token for the upload request.id(required): The image ID.name(required): The image file name.
Factory.petService.uploadImage(
data: Data,
url: String,
authToken: String,
id: String,
name: String
) -> IVPublisher<Void>
Attach Pet Images
To attach uploaded images to a pet profile, The following method can be used:
spaceId(required): The space ID of the User.petId(required): The ID of the pet.imageIds(required): The IDs of the uploaded images.
Factory.petService.attachPetImages(
spaceId: String,
petId: String,
imageIds: [String]
) -> IVPublisher<PetProfileDetail>
Detach Pet Images
To remove associated images from a pet profile, The following method can be used:
spaceId(required): The space ID of the user.petId(required): The ID of the pet.request(required): Contains image detachment details.
Factory.petService.detachPetImages(
spaceId: String,
petId: String,
request: DetachPetImagesRequest
) -> IVPublisher<PetProfileDetail>
Get Recommended Pet Images
To fetch AI-recommended pet images, The following method can be used:
spaceId(required): The space ID of the user.petId(required): The ID of the pet.
Factory.petService.getRecommendedPetImages(
spaceId: String,
petId: String
) -> IVPublisher<RecommendedPet>
Update Pet Images Feedback
To fetchs all pet profiles associated with a space, The following method can be used:
spaceId(required): The space ID of the user.petId(required): The ID of the pet.request(required): Contains feedback details.
Factory.petService.updatePetImagesFeedback(
spaceId: String,
petId: String,
request: PetImagesFeedbackRequest
) -> IVPublisher<Void>
Get Pet Activity Summary
To fetchs pet activity summary, The following method can be used:
spaceId(required): The space ID of the user.petId(required): The ID of the pet.queryItems: [ .init(key: .date, value: .lessThenOrEqual(value: startDate.string)), .init(key: .date, value: .greaterThenOrEqual(value: eventsEndDate.string)) ]sortItem: .init(ascending: [.date])
Factory.petService.getPetActivitySummary(
spaceId: String,
petId: String,
queryItems: [QueryItem],
sortItem: SortItem?
) -> IVPublisher<PetActivityResponse>
Get Pet Activity insight
To get pet activity insight, The following method can be used:
spaceId(required): The space ID of the user.petId(required): The ID of the pet.
Factory.petService.getPetActivityInsight(
spaceId: String,
petId: String,
) -> IVPublisher<PetActivityInsightResponse>
Get Pet Activity Summary
To fetch the activity summary for a pet, The following method can be used:
spaceId(required): The space ID of the User.petId(required): The ID of the pet.queryItems(required): Contains the query parameters used to filter the activity summary.sortItem(optional): Specifies the sorting options for the activity summary.
Factory.petService.getPetActivitySummary(
spaceId: String,
petId: String,
queryItems: [QueryItem],
sortItem: SortItem?
) -> IVPublisher<PetActivityResponse>
Get Pet Activity Insight
To fetch activity insights for a pet, The following method can be used:
spaceId(required): The space ID of the User.petId(required): The ID of the pet.
Factory.petService.getPetActivityInsight(
spaceId: String,
petId: String
) -> IVPublisher<PetActivityInsightResponse>