@tec.pet/tecpet-sdk 0.0.183 → 0.0.184
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.
|
@@ -4,6 +4,13 @@ export declare enum GenderType {
|
|
|
4
4
|
MALE = "MALE",
|
|
5
5
|
FEMALE = "FEMALE"
|
|
6
6
|
}
|
|
7
|
+
export declare enum PetSituation {
|
|
8
|
+
ACTIVE = "ACTIVE",
|
|
9
|
+
SUSPENDED = "SUSPENDED",
|
|
10
|
+
BLOCKED = "BLOCKED",
|
|
11
|
+
INACTIVE = "INACTIVE",
|
|
12
|
+
RESTRICTED = "RESTRICTED"
|
|
13
|
+
}
|
|
7
14
|
export interface PaPetResponse {
|
|
8
15
|
id: number | string;
|
|
9
16
|
name: string;
|
|
@@ -18,4 +25,7 @@ export interface PaPetResponse {
|
|
|
18
25
|
hair: BillingItemType;
|
|
19
26
|
size: BillingItemType;
|
|
20
27
|
birthDate: string;
|
|
28
|
+
deceased: boolean;
|
|
29
|
+
situation: PetSituation;
|
|
30
|
+
situationDescription?: string;
|
|
21
31
|
}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GenderType = void 0;
|
|
3
|
+
exports.PetSituation = exports.GenderType = void 0;
|
|
4
4
|
var GenderType;
|
|
5
5
|
(function (GenderType) {
|
|
6
6
|
GenderType["MALE"] = "MALE";
|
|
7
7
|
GenderType["FEMALE"] = "FEMALE";
|
|
8
8
|
})(GenderType || (exports.GenderType = GenderType = {}));
|
|
9
|
+
var PetSituation;
|
|
10
|
+
(function (PetSituation) {
|
|
11
|
+
PetSituation["ACTIVE"] = "ACTIVE";
|
|
12
|
+
PetSituation["SUSPENDED"] = "SUSPENDED";
|
|
13
|
+
PetSituation["BLOCKED"] = "BLOCKED";
|
|
14
|
+
PetSituation["INACTIVE"] = "INACTIVE";
|
|
15
|
+
PetSituation["RESTRICTED"] = "RESTRICTED";
|
|
16
|
+
})(PetSituation || (exports.PetSituation = PetSituation = {}));
|
|
@@ -5,7 +5,7 @@ import { PaPetResponse } from "./dto/pa.get-pet.dto";
|
|
|
5
5
|
export declare class PetService {
|
|
6
6
|
private readonly api;
|
|
7
7
|
constructor(api: HttpClient);
|
|
8
|
-
getByClient(clientId: number): Promise<Array<PaPetResponse>>;
|
|
8
|
+
getByClient(clientId: number, includeDeceased?: boolean): Promise<Array<PaPetResponse>>;
|
|
9
9
|
create(petInput: PaCreatePetInput): Promise<PaPetResponse>;
|
|
10
10
|
edit(petId: number, body: PaEditPetInput): Promise<PaPetResponse>;
|
|
11
11
|
}
|
|
@@ -6,9 +6,10 @@ class PetService {
|
|
|
6
6
|
constructor(api) {
|
|
7
7
|
this.api = api;
|
|
8
8
|
}
|
|
9
|
-
async getByClient(clientId) {
|
|
9
|
+
async getByClient(clientId, includeDeceased) {
|
|
10
10
|
const response = await this.api.get(`/pet`, {
|
|
11
11
|
clientId,
|
|
12
|
+
...(includeDeceased !== undefined && { includeDeceased }),
|
|
12
13
|
});
|
|
13
14
|
if (response?.data?.length) {
|
|
14
15
|
return response.data;
|