Skip to content

Commit 73989ec

Browse files
committed
v1.0.7
1 parent 2a68d76 commit 73989ec

File tree

5 files changed

+27
-19
lines changed

5 files changed

+27
-19
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
## Change Log
22

3+
### v1.0.7(Jul 12, 2019)
4+
* Added `customFields` property to `Ticket`.
5+
36
### v1.0.6(May 13, 2019)
47
* Added `reopen()` in `Ticket`
5-
* Added `groupKey` and `customField` parameters to `Ticket.create()`.
8+
* Added `groupKey` and `customFields` parameters to `Ticket.create()`.
69
* Added `customFieldFilter` parameter to `getOpenedList()` and `getClosedList()` in `Ticket`.
710

811
### v1.0.5(Nov 23, 2018)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Ticket.create(ticketTitle, userName, (ticket, err) =>
6161
});
6262
```
6363

64-
> Note: `Ticket.create()` has 2 more parameters `groupKey` and `customField`. The values could be evaluated when a ticket is created though it's used only in Dashboard currently. `groupKey` is the key of an agent group so that the ticket is assigned to the agents in that group. `customField` holds customizable data for the individual ticket.
64+
> Note: `Ticket.create()` has 2 more parameters `groupKey` and `customFields`. The values could be evaluated when a ticket is created though it's used only in Dashboard currently. `groupKey` is the key of an agent group so that the ticket is assigned to the agents in that group. `customFields` holds customizable data for the individual ticket.
6565
6666
## Count of opened tickets
6767
When you need to display opened ticket count in your application, use `Ticket.getOpenCount()`.
@@ -90,7 +90,7 @@ Ticket.getClosedList(offset, (res, err) => {
9090
});
9191
```
9292

93-
> Note: Once you set `customField` to tickets, you can put `customFieldFilter` to `getOpenedList()` and `getClosedList()` in order to filter the tickets by `customField` values.
93+
> Note: Once you set `customFields` to tickets, you can put `customFieldFilter` to `getOpenedList()` and `getClosedList()` in order to filter the tickets by `customFields` values.
9494
9595
## Handling ticket event
9696
SendBird Desk SDK uses predefined AdminMessage custom type which can be derived by calling `message.customType`. Custom type for Desk AdminMessage is set to `SENDBIRD_DESK_ADMIN_MESSAGE_CUSTOM_TYPE`. And there are sub-types which indicate ticket events: assign, transfer, and close. Each event type is located in `message.data` which looks like below.

SendBird.Desk.d.ts

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Type Definitions for SendBird Desc SDK v1.0.6
2+
* Type Definitions for SendBird Desc SDK v1.0.7
33
* homepage: https://sendbird.com/
44
*/
55
export = SendBirdDesk;
@@ -30,8 +30,7 @@ declare namespace SendBirdDesk {
3030
type Callback = (res: Object, error: Error) => void;
3131
type TicketCallback = (ticket: TicketInstance, error: Error) => void;
3232
type TicketArrayCallback = (list: Array<TicketInstance>, error: Error) => void;
33-
34-
33+
3534
interface AgentStatic {
3635
new (json: Object): AgentInstance;
3736
}
@@ -46,7 +45,7 @@ declare namespace SendBirdDesk {
4645
isStatus(val: String): Boolean;
4746
clearCache(channelUrl: String): void;
4847
create(title: String, name: String, callback: TicketCallback): void;
49-
create(title: String, name: String, groupKey: String, customField: Object, callback: TicketCallback): void;
48+
create(title: String, name: String, groupKey: String, customFields: Object, callback: TicketCallback): void;
5049
getOpenCount(callback: Callback): void;
5150
getByChannelUrl(channelUrl: String, callback: TicketCallback): void;
5251
getOpenedList(offset: Number, callback: TicketArrayCallback): void;
@@ -63,7 +62,7 @@ declare namespace SendBirdDesk {
6362
ASSIGNED: String;
6463
OPEN: String;
6564
CLOSED: String;
66-
}
65+
};
6766
interface TicketInstance {
6867
id: String;
6968
title: String;
@@ -73,6 +72,7 @@ declare namespace SendBirdDesk {
7372
customer: Object;
7473
channel: Object;
7574
channelUrl: String;
75+
customFields: Object;
7676
updatedAt: Number;
7777
fetchFromJSON(json: Object): void;
7878
refresh(callback: TicketCallback): void;
@@ -81,24 +81,23 @@ declare namespace SendBirdDesk {
8181
type MessageStatic = {
8282
CustomType: MessageCustomType;
8383
DataType: MessageDataType;
84-
ClosureState : MessageClosureState;
85-
}
84+
ClosureState: MessageClosureState;
85+
};
8686
type MessageCustomType = {
8787
RICH_MESSAGE: String;
8888
ADMIN_MESSAGE: String;
89-
}
89+
};
9090
type MessageDataType = {
9191
TICKET_INQUIRE_CLOSURE: String;
9292
TICKET_ASSIGN: String;
9393
TICKET_TRANSFER: String;
9494
TICKET_CLOSE: String;
9595
URL_PREVIEW: String;
96-
}
96+
};
9797
type MessageClosureState = {
9898
WAITING: String;
9999
CONFIRMED: String;
100100
DECLINED: String;
101-
}
101+
};
102102
interface SendBirdDeskErrorStatic {}
103103
}
104-

SendBird.Desk.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sendbird-desk",
3-
"version": "1.0.6",
3+
"version": "1.0.7",
44
"description": "SendBird Desk SDK Integration Guide for JavaScript =========== SendBird Desk is a chat customer service platform built on SendBird SDK and API.",
55
"main": "SendBird.Desk.min.js",
66
"scripts": {
@@ -10,7 +10,13 @@
1010
"type": "git",
1111
"url": "git+https://github.com/sendbird/SendBird-Desk-SDK-JavaScript.git"
1212
},
13-
"keywords": ["sendbird", "sendbird.com", "messaging", "chat", "js"],
13+
"keywords": [
14+
"sendbird",
15+
"sendbird.com",
16+
"messaging",
17+
"chat",
18+
"js"
19+
],
1420
"author": "SendBird <[email protected]>",
1521
"license": "SEE LICENSE IN LICENSE.md",
1622
"bugs": {

0 commit comments

Comments
 (0)