@kohost/api-client 3.1.15 → 3.1.17
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/cjs/AMQPClient/index.js +4 -18
- package/dist/cjs/schemas/OrganizationSchema.d.ts +4 -0
- package/dist/cjs/schemas/TicketSchema.d.ts +2 -0
- package/dist/cjs/schemas/organization.json +9 -0
- package/dist/cjs/schemas/ticket.json +6 -0
- package/dist/esm/Models.js +15 -0
- package/dist/esm/Models.js.map +2 -2
- package/package.json +1 -1
|
@@ -86,25 +86,11 @@ class KohostAMQPClient {
|
|
|
86
86
|
|
|
87
87
|
debug("parseError", type, message, options);
|
|
88
88
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
return new Errors.RequestError(message, options);
|
|
92
|
-
|
|
93
|
-
case "AuthenticationError":
|
|
94
|
-
return new Errors.AuthenticationError(message, options);
|
|
95
|
-
|
|
96
|
-
case "ValidationError":
|
|
97
|
-
return new Errors.ValidationError(message, options);
|
|
98
|
-
|
|
99
|
-
case "NotFoundError":
|
|
100
|
-
return new Errors.NotFoundError(message, options);
|
|
101
|
-
|
|
102
|
-
case "UnprocessableRequestError":
|
|
103
|
-
return new Errors.UnprocessableRequestError(message, options);
|
|
104
|
-
|
|
105
|
-
default:
|
|
106
|
-
return new Error(message, options);
|
|
89
|
+
if (type && Errors[type]) {
|
|
90
|
+
return new Errors[type](message, options);
|
|
107
91
|
}
|
|
92
|
+
|
|
93
|
+
return new Error(message, options);
|
|
108
94
|
}
|
|
109
95
|
|
|
110
96
|
static parseMessage(message) {
|
|
@@ -17,6 +17,7 @@ export type Date =
|
|
|
17
17
|
export interface Ticket {
|
|
18
18
|
id: string;
|
|
19
19
|
type?: "ticket";
|
|
20
|
+
number?: string;
|
|
20
21
|
conversation: (
|
|
21
22
|
| {
|
|
22
23
|
[k: string]: unknown;
|
|
@@ -53,6 +54,7 @@ export interface Ticket {
|
|
|
53
54
|
rating?: number;
|
|
54
55
|
ratingComment?: string;
|
|
55
56
|
tipAmount?: string;
|
|
57
|
+
scheduleDate?: Date;
|
|
56
58
|
createdAt: Date;
|
|
57
59
|
updatedAt: Date;
|
|
58
60
|
solvedAt?: Date;
|
|
@@ -135,6 +135,15 @@
|
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
},
|
|
138
|
+
"tickets": {
|
|
139
|
+
"type": "object",
|
|
140
|
+
"properties": {
|
|
141
|
+
"nextTicketNumber": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"default": "1"
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
},
|
|
138
147
|
"credentials": {
|
|
139
148
|
"type": "object",
|
|
140
149
|
"additionalProperties": true
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
"enum": ["ticket"],
|
|
14
14
|
"default": "ticket"
|
|
15
15
|
},
|
|
16
|
+
"number": {
|
|
17
|
+
"type": "string"
|
|
18
|
+
},
|
|
16
19
|
"conversation": {
|
|
17
20
|
"type": "array",
|
|
18
21
|
"default": [],
|
|
@@ -155,6 +158,9 @@
|
|
|
155
158
|
"tipAmount": {
|
|
156
159
|
"type": "string"
|
|
157
160
|
},
|
|
161
|
+
"scheduleDate": {
|
|
162
|
+
"$ref": "definitions.json#/definitions/date"
|
|
163
|
+
},
|
|
158
164
|
"createdAt": {
|
|
159
165
|
"$ref": "definitions.json#/definitions/date"
|
|
160
166
|
},
|
package/dist/esm/Models.js
CHANGED
|
@@ -11297,6 +11297,9 @@ var require_ticket = __commonJS({
|
|
|
11297
11297
|
enum: ["ticket"],
|
|
11298
11298
|
default: "ticket"
|
|
11299
11299
|
},
|
|
11300
|
+
number: {
|
|
11301
|
+
type: "string"
|
|
11302
|
+
},
|
|
11300
11303
|
conversation: {
|
|
11301
11304
|
type: "array",
|
|
11302
11305
|
default: [],
|
|
@@ -11438,6 +11441,9 @@ var require_ticket = __commonJS({
|
|
|
11438
11441
|
tipAmount: {
|
|
11439
11442
|
type: "string"
|
|
11440
11443
|
},
|
|
11444
|
+
scheduleDate: {
|
|
11445
|
+
$ref: "definitions.json#/definitions/date"
|
|
11446
|
+
},
|
|
11441
11447
|
createdAt: {
|
|
11442
11448
|
$ref: "definitions.json#/definitions/date"
|
|
11443
11449
|
},
|
|
@@ -13449,6 +13455,15 @@ var require_organization = __commonJS({
|
|
|
13449
13455
|
}
|
|
13450
13456
|
}
|
|
13451
13457
|
},
|
|
13458
|
+
tickets: {
|
|
13459
|
+
type: "object",
|
|
13460
|
+
properties: {
|
|
13461
|
+
nextTicketNumber: {
|
|
13462
|
+
type: "string",
|
|
13463
|
+
default: "1"
|
|
13464
|
+
}
|
|
13465
|
+
}
|
|
13466
|
+
},
|
|
13452
13467
|
credentials: {
|
|
13453
13468
|
type: "object",
|
|
13454
13469
|
additionalProperties: true
|