Skip to content

Commit ed3aeb1

Browse files
Merge pull request #5 from sendbird/feat/scope-update
feat: run build and scope update
2 parents e5ce063 + 325b9a1 commit ed3aeb1

15 files changed

+1207
-54
lines changed

CHANGELOG

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# 📦 CHANGELOG
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
---
6+
7+
## [2.0.0] - 2024-06-24
8+
9+
### Added
10+
- Test code
11+
12+
### Fixed
13+
- Miss types
14+
15+
---
16+
17+
## [1.0.27] - 2024-09-24
18+
19+
### Added
20+
- Optional fields for channel/user updates:
21+
- `PUT /group_channels/{channel_url}` and `PUT /open_channels/{channel_url}`: all fields except `channel_url` are now optional.
22+
- `PUT /users/{user_id}`: `nickname` and `profile_url` made optional.
23+
- `GET /group_channels/{channel_url}/messages/unread_count`: now supports multiple `user_ids`.
24+
- `read_receipt` added to `GroupChannel` model.
25+
- Support for multiple file messages via `files` array.
26+
- `GET /{channel_type}/{channel_url}/messages`:
27+
- New support for `include_reply_type`, `include_parent_message_info`, and `parent_message_info`.
28+
- `GET /{channel_type}/{channel_url}/messages/{message_id}`: `include_parent_message_info` now supported.
29+
- New typing indicator endpoints:
30+
- `POST /v3/group_channels/{channel_url}/typing`
31+
- `PUT /v3/group_channels/{channel_url}/typing`
32+
- `POST /v3/group_channels/{channel_url}/invite`: `users`, `invitation_status`, `hidden_status` are now optional.
33+
- `PUT /v3/users/{user_id}/push_preference`: `block_push_from_bots`, `push_blocked_bot_ids` are optional.
34+
- `/v3/bots/{bot_userid}/send`: added support for `extended_message_payload` and `target_message_id`.
35+
36+
### Fixed
37+
- OG image type was missing from metadata in `GET /{channel_type}/{channel_url}/messages`.
38+
- Incorrect date types in API responses.
39+
- Removed `isFrozen` property (use `freeze` instead).
40+
- Fixed `DELETE /users/{user_id}/push/{token_type}/{token}`: `token` must now be a string, not an array.
41+
42+
### Changed
43+
- `apiToken()` is no longer required in every request.
44+
45+
---
46+
47+
## [1.0.15] - 2023-10-25
48+
49+
### Changed
50+
- Switched to group parameter format.
51+
52+
---
53+
54+
## [0.0.14] - 2023-10-10
55+
56+
### Added
57+
- Tagged release. No additional notes.
58+
59+
---
60+
61+
## [1.0.7] - 2023-08-03
62+
63+
### Changed
64+
- Internal improvements via OpenAPI generator (PR #12).
65+
66+
---
67+
68+
## [1.0.3] - 2023-06-29
69+
70+
### Added
71+
- Introduced:
72+
- Announcement API
73+
- Metadata API
74+
75+
### Changed
76+
- Restructured Moderation APIs under dedicated Moderation module.
77+
78+
---
79+
80+
> This CHANGELOG follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) principles.

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@
66
[![NPM](https://img.shields.io/npm/v/sendbird-platform-sdk.svg)](https://www.npmjs.com/package/sendbird-platform-sdk)
77

88
This is a Node.js package that makes talking to the [Sendbird Platform API](https://sendbird.com/docs/chat/v3/platform-api/getting-started/prepare-to-use-api) easier. With this library you can extend your Sendbird integration to include advanced features like channel automation and user management.
9+
10+
>__Note__: Platform API SDK v2 includes only the APIs that were actively used in v1. If you need help getting started with the new SDK, [contact us](https://dashboard.sendbird.com/settings/contact_us).
11+
912
# Install
10-
```npm install sendbird-platform-sdk```
13+
```npm install @sendbird/sendbird-platform-sdk-javascript```
1114

1215
# 🔥 Quick start
1316

1417
```javascript
15-
import SendbirdPlatformSdk from 'sendbird-platform-sdk';
18+
import SendbirdPlatformSdk from '@sendbird/sendbird-platform-sdk-javascript';
1619

1720
const userId = "1234";
1821
const name = "bob";
@@ -59,10 +62,10 @@ You will need [Node.js](https://nodejs.org/en/download/) installed. This has bee
5962
You can install the SDK directly from npm:
6063
```
6164
# Using npm
62-
npm install sendbird-platform-sdk
65+
npm install @sendbird/sendbird-platform-sdk-javascript
6366
6467
# Using yarn
65-
yarn add sendbird-platform-sdk
68+
yarn add @sendbird/sendbird-platform-sdk-javascript
6669
```
6770
> ⚠️ This SDK is intended for use in server-side environments only. Do not use it in browsers or frontend applications.
6871

dist/api/GroupChannelApi.js

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -618,12 +618,6 @@ var GroupChannelApi = exports["default"] = /*#__PURE__*/function () {
618618
* @param {String} opts.metacounterValueLt Searches for group channels with metacounter containing an item with the key specified by the metadata_key parameter, where the value of that item is lower than the value specified by this parameter. To use this parameter, the metacounter_key parameter should be specified.
619619
* @param {String} opts.metacounterValueLte Searches for group channels with metacounter containing an item with the key specified by the metadata_key parameter, where the value of that item is lower than or equal to the value specified by this parameter. To use this parameter, the metacounter_key parameter should be specified.
620620
* @param {Boolean} opts.includeSortedMetaarrayInLastMessage Determines whether to include the sorted_metaarray as one of the last_message’s properties in the response.
621-
* @param {String} opts.customType (Deprecated) Returns channels whose custom_type matches the given value. If this field is not specified, all channels are returned, regardless of their custom type. The string passed here must be urlencoded.
622-
* @param {Boolean} opts.readReceipt (Deprecated) Superseded by show_read_receipt.
623-
* @param {Boolean} opts.member (Deprecated) Superseded by show_member.
624-
* @param {Boolean} opts.isDistinct (Deprecated) Superseded by distinct_mode.
625-
* @param {String} opts.membersIn (Deprecated) Superseded by members_exactly_in.
626-
* @param {String} opts.userId (Deprecated) Restricts the search scope to only retrieve the target user's group channels. It's recommended to use the list group channels by user action instead.
627621
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GroupChatListChannelsResponse} and HTTP response
628622
*/
629623
}, {
@@ -672,13 +666,7 @@ var GroupChannelApi = exports["default"] = /*#__PURE__*/function () {
672666
'metacounter_value_gte': opts['metacounterValueGte'],
673667
'metacounter_value_lt': opts['metacounterValueLt'],
674668
'metacounter_value_lte': opts['metacounterValueLte'],
675-
'include_sorted_metaarray_in_last_message': opts['includeSortedMetaarrayInLastMessage'],
676-
'custom_type': opts['customType'],
677-
'read_receipt': opts['readReceipt'],
678-
'member': opts['member'],
679-
'is_distinct': opts['isDistinct'],
680-
'members_in': opts['membersIn'],
681-
'user_id': opts['userId']
669+
'include_sorted_metaarray_in_last_message': opts['includeSortedMetaarrayInLastMessage']
682670
};
683671
var headerParams = {
684672
'api-token': apiToken
@@ -732,12 +720,6 @@ var GroupChannelApi = exports["default"] = /*#__PURE__*/function () {
732720
* @param {String} opts.metacounterValueLt Searches for group channels with metacounter containing an item with the key specified by the metadata_key parameter, where the value of that item is lower than the value specified by this parameter. To use this parameter, the metacounter_key parameter should be specified.
733721
* @param {String} opts.metacounterValueLte Searches for group channels with metacounter containing an item with the key specified by the metadata_key parameter, where the value of that item is lower than or equal to the value specified by this parameter. To use this parameter, the metacounter_key parameter should be specified.
734722
* @param {Boolean} opts.includeSortedMetaarrayInLastMessage Determines whether to include the sorted_metaarray as one of the last_message’s properties in the response.
735-
* @param {String} opts.customType (Deprecated) Returns channels whose custom_type matches the given value. If this field is not specified, all channels are returned, regardless of their custom type. The string passed here must be urlencoded.
736-
* @param {Boolean} opts.readReceipt (Deprecated) Superseded by show_read_receipt.
737-
* @param {Boolean} opts.member (Deprecated) Superseded by show_member.
738-
* @param {Boolean} opts.isDistinct (Deprecated) Superseded by distinct_mode.
739-
* @param {String} opts.membersIn (Deprecated) Superseded by members_exactly_in.
740-
* @param {String} opts.userId (Deprecated) Restricts the search scope to only retrieve the target user's group channels. It's recommended to use the list group channels by user action instead.
741723
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GroupChatListChannelsResponse}
742724
*/
743725
}, {

dist/api/MessageApi.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ var _AddExtraDataToAMessageResponse = _interopRequireDefault(require("../model/A
1010
var _GetTotalNumberOfMessagesInAChannelResponse = _interopRequireDefault(require("../model/GetTotalNumberOfMessagesInAChannelResponse"));
1111
var _ListMessagesResponse = _interopRequireDefault(require("../model/ListMessagesResponse"));
1212
var _MarkChannelMessagesAsReadRequest = _interopRequireDefault(require("../model/MarkChannelMessagesAsReadRequest"));
13+
var _MigrateMessagesRequest = _interopRequireDefault(require("../model/MigrateMessagesRequest"));
1314
var _SendAMessageRequest = _interopRequireDefault(require("../model/SendAMessageRequest"));
1415
var _SendbirdMessageResponse = _interopRequireDefault(require("../model/SendbirdMessageResponse"));
1516
var _UpdateAMessageRequest = _interopRequireDefault(require("../model/UpdateAMessageRequest"));
@@ -490,14 +491,14 @@ var MessageApi = exports["default"] = /*#__PURE__*/function () {
490491
* @param {String} targetChannelUrl (Required)
491492
* @param {Object} opts Optional parameters
492493
* @param {String} opts.apiToken
493-
* @param {Object.<String, Object>} opts.body
494+
* @param {module:model/MigrateMessagesRequest} opts.migrateMessagesRequest
494495
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
495496
*/
496497
}, {
497498
key: "migrateMessagesWithHttpInfo",
498499
value: function migrateMessagesWithHttpInfo(targetChannelUrl, opts) {
499500
opts = opts || {};
500-
var postBody = opts['body'];
501+
var postBody = opts['migrateMessagesRequest'];
501502
// verify the required parameter 'targetChannelUrl' is set
502503
if (targetChannelUrl === undefined || targetChannelUrl === null) {
503504
throw new Error("Missing the required parameter 'targetChannelUrl' when calling migrateMessages");
@@ -523,7 +524,7 @@ var MessageApi = exports["default"] = /*#__PURE__*/function () {
523524
* @param {String} targetChannelUrl (Required)
524525
* @param {Object} opts Optional parameters
525526
* @param {String} opts.apiToken
526-
* @param {Object.<String, Object>} opts.body
527+
* @param {module:model/MigrateMessagesRequest} opts.migrateMessagesRequest
527528
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
528529
*/
529530
}, {

dist/api/MetadataApi.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,10 @@ var MetadataApi = exports["default"] = /*#__PURE__*/function () {
126126
}
127127
var pathParams = {
128128
'channel_type': channelType,
129-
'channel_url': channelUrl
130-
};
131-
var queryParams = {
129+
'channel_url': channelUrl,
132130
'key': opts['key']
133131
};
132+
var queryParams = {};
134133
var headerParams = {
135134
'api-token': opts['apiToken']
136135
};

0 commit comments

Comments
 (0)