@tec.pet/tecpet-sdk 0.0.183 → 0.0.185
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.
- package/dist/domain/chatbot/dto/pa.change-notification-status.dto.d.ts +21 -1
- package/dist/domain/chatbot/dto/pa.change-notification-status.dto.js +20 -1
- package/dist/domain/pet/dto/pa.get-pet.dto.d.ts +10 -0
- package/dist/domain/pet/dto/pa.get-pet.dto.js +9 -1
- package/dist/domain/pet/pet.service.d.ts +1 -1
- package/dist/domain/pet/pet.service.js +2 -1
- package/package.json +1 -1
|
@@ -5,11 +5,31 @@ export declare enum NotificationStatus {
|
|
|
5
5
|
DELIVERED = "DELIVERED",
|
|
6
6
|
READ = "READ",
|
|
7
7
|
ANSWERED = "ANSWERED",
|
|
8
|
-
CANCELED = "CANCELED"
|
|
8
|
+
CANCELED = "CANCELED",
|
|
9
|
+
FAILED = "FAILED"
|
|
10
|
+
}
|
|
11
|
+
export declare enum NotificationFailReason {
|
|
12
|
+
META_ACCOUNT_UNLINKED = "META_ACCOUNT_UNLINKED",
|
|
13
|
+
META_BILLING_ISSUE = "META_BILLING_ISSUE",
|
|
14
|
+
META_TEMPLATE_REJECTED = "META_TEMPLATE_REJECTED",
|
|
15
|
+
META_WINDOW_CLOSED = "META_WINDOW_CLOSED",
|
|
16
|
+
META_INVALID_NUMBER = "META_INVALID_NUMBER",
|
|
17
|
+
META_MEDIA_REJECTED = "META_MEDIA_REJECTED",
|
|
18
|
+
META_RATE_LIMITED = "META_RATE_LIMITED",
|
|
19
|
+
META_INVALID_PAYLOAD = "META_INVALID_PAYLOAD",
|
|
20
|
+
META_UNAVAILABLE = "META_UNAVAILABLE",
|
|
21
|
+
ZAPI_INSTANCE_UNSUBSCRIBED = "ZAPI_INSTANCE_UNSUBSCRIBED",
|
|
22
|
+
ZAPI_DISCONNECTED = "ZAPI_DISCONNECTED",
|
|
23
|
+
ZAPI_MEDIA_REJECTED = "ZAPI_MEDIA_REJECTED",
|
|
24
|
+
ZAPI_INVALID_PAYLOAD = "ZAPI_INVALID_PAYLOAD",
|
|
25
|
+
ZAPI_UNAVAILABLE = "ZAPI_UNAVAILABLE",
|
|
26
|
+
UNKNOWN = "UNKNOWN"
|
|
9
27
|
}
|
|
10
28
|
export interface PaChangeNotificationStatusInput {
|
|
11
29
|
status: NotificationStatus;
|
|
12
30
|
date: Date;
|
|
31
|
+
failReason?: string;
|
|
32
|
+
failReasonType?: NotificationFailReason;
|
|
13
33
|
}
|
|
14
34
|
export interface PaChangeNotificationStatusResponse {
|
|
15
35
|
success: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NotificationStatus = void 0;
|
|
3
|
+
exports.NotificationFailReason = exports.NotificationStatus = void 0;
|
|
4
4
|
var NotificationStatus;
|
|
5
5
|
(function (NotificationStatus) {
|
|
6
6
|
NotificationStatus["NEW"] = "NEW";
|
|
@@ -10,4 +10,23 @@ var NotificationStatus;
|
|
|
10
10
|
NotificationStatus["READ"] = "READ";
|
|
11
11
|
NotificationStatus["ANSWERED"] = "ANSWERED";
|
|
12
12
|
NotificationStatus["CANCELED"] = "CANCELED";
|
|
13
|
+
NotificationStatus["FAILED"] = "FAILED";
|
|
13
14
|
})(NotificationStatus || (exports.NotificationStatus = NotificationStatus = {}));
|
|
15
|
+
var NotificationFailReason;
|
|
16
|
+
(function (NotificationFailReason) {
|
|
17
|
+
NotificationFailReason["META_ACCOUNT_UNLINKED"] = "META_ACCOUNT_UNLINKED";
|
|
18
|
+
NotificationFailReason["META_BILLING_ISSUE"] = "META_BILLING_ISSUE";
|
|
19
|
+
NotificationFailReason["META_TEMPLATE_REJECTED"] = "META_TEMPLATE_REJECTED";
|
|
20
|
+
NotificationFailReason["META_WINDOW_CLOSED"] = "META_WINDOW_CLOSED";
|
|
21
|
+
NotificationFailReason["META_INVALID_NUMBER"] = "META_INVALID_NUMBER";
|
|
22
|
+
NotificationFailReason["META_MEDIA_REJECTED"] = "META_MEDIA_REJECTED";
|
|
23
|
+
NotificationFailReason["META_RATE_LIMITED"] = "META_RATE_LIMITED";
|
|
24
|
+
NotificationFailReason["META_INVALID_PAYLOAD"] = "META_INVALID_PAYLOAD";
|
|
25
|
+
NotificationFailReason["META_UNAVAILABLE"] = "META_UNAVAILABLE";
|
|
26
|
+
NotificationFailReason["ZAPI_INSTANCE_UNSUBSCRIBED"] = "ZAPI_INSTANCE_UNSUBSCRIBED";
|
|
27
|
+
NotificationFailReason["ZAPI_DISCONNECTED"] = "ZAPI_DISCONNECTED";
|
|
28
|
+
NotificationFailReason["ZAPI_MEDIA_REJECTED"] = "ZAPI_MEDIA_REJECTED";
|
|
29
|
+
NotificationFailReason["ZAPI_INVALID_PAYLOAD"] = "ZAPI_INVALID_PAYLOAD";
|
|
30
|
+
NotificationFailReason["ZAPI_UNAVAILABLE"] = "ZAPI_UNAVAILABLE";
|
|
31
|
+
NotificationFailReason["UNKNOWN"] = "UNKNOWN";
|
|
32
|
+
})(NotificationFailReason || (exports.NotificationFailReason = NotificationFailReason = {}));
|
|
@@ -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;
|