@twilio/conversations 2.6.0 → 2.6.1
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/README.md +1 -1
- package/builds/browser.esm.js +11 -5
- package/builds/browser.esm.js.map +1 -1
- package/builds/browser.js +11 -5
- package/builds/browser.js.map +1 -1
- package/builds/lib.d.ts +5 -0
- package/builds/lib.esm.d.ts +5 -0
- package/builds/lib.esm.js +11 -5
- package/builds/lib.js +11 -5
- package/builds/lib.js.map +1 -1
- package/builds/twilio-conversations.js +13 -6
- package/builds/twilio-conversations.js.map +1 -0
- package/builds/twilio-conversations.min.js +2 -1
- package/builds/twilio-conversations.min.js.map +1 -0
- package/dist/aggregated-delivery-receipt.js +0 -2
- package/dist/aggregated-delivery-receipt.js.map +1 -1
- package/dist/channel-metadata-client.js +0 -3
- package/dist/channel-metadata-client.js.map +1 -1
- package/dist/client.js +1 -37
- package/dist/client.js.map +1 -1
- package/dist/command-executor.js +0 -5
- package/dist/command-executor.js.map +1 -1
- package/dist/configuration.js +0 -7
- package/dist/configuration.js.map +1 -1
- package/dist/content-client.js +0 -7
- package/dist/content-client.js.map +1 -1
- package/dist/content-template.js +0 -4
- package/dist/content-template.js.map +1 -1
- package/dist/conversation.js +0 -34
- package/dist/conversation.js.map +1 -1
- package/dist/data/conversations.js +9 -3
- package/dist/data/conversations.js.map +1 -1
- package/dist/data/messages.js +0 -6
- package/dist/data/messages.js.map +1 -1
- package/dist/data/participants.js +0 -6
- package/dist/data/participants.js.map +1 -1
- package/dist/data/users.js +0 -6
- package/dist/data/users.js.map +1 -1
- package/dist/detailed-delivery-receipt.js +0 -2
- package/dist/detailed-delivery-receipt.js.map +1 -1
- package/dist/interfaces/rules.js +0 -9
- package/dist/interfaces/rules.js.map +1 -1
- package/dist/logger.js +0 -23
- package/dist/logger.js.map +1 -1
- package/dist/media.js +0 -7
- package/dist/media.js.map +1 -1
- package/dist/message-builder.js +0 -12
- package/dist/message-builder.js.map +1 -1
- package/dist/message-recipients-client.js +0 -4
- package/dist/message-recipients-client.js.map +1 -1
- package/dist/message.js +0 -21
- package/dist/message.js.map +1 -1
- package/dist/packages/conversations/package.json.js +1 -1
- package/dist/participant.js +0 -13
- package/dist/participant.js.map +1 -1
- package/dist/push-notification.js +0 -5
- package/dist/push-notification.js.map +1 -1
- package/dist/rest-paginator.js +0 -6
- package/dist/rest-paginator.js.map +1 -1
- package/dist/services/network.js +0 -7
- package/dist/services/network.js.map +1 -1
- package/dist/services/typing-indicator.js +2 -1
- package/dist/services/typing-indicator.js.map +1 -1
- package/dist/unsent-message.js +0 -5
- package/dist/unsent-message.js.map +1 -1
- package/dist/user.js +0 -11
- package/dist/user.js.map +1 -1
- package/dist/util/deferred.js +0 -6
- package/dist/util/deferred.js.map +1 -1
- package/docs/assets/js/search.js +1 -1
- package/docs/index.html +2 -2
- package/docs/interfaces/CreateConversationOptions.html +17 -0
- package/docs/modules.html +1 -1
- package/package.json +2 -2
package/builds/lib.d.ts
CHANGED
@@ -2691,6 +2691,11 @@ interface CreateConversationOptions {
|
|
2691
2691
|
* A unique identifier of the conversation.
|
2692
2692
|
*/
|
2693
2693
|
uniqueName?: string;
|
2694
|
+
/**
|
2695
|
+
* The access control for the conversation.
|
2696
|
+
* null for existing conversations, 'restricted' for conversations that need to support users with restricted access
|
2697
|
+
*/
|
2698
|
+
access?: string;
|
2694
2699
|
}
|
2695
2700
|
/**
|
2696
2701
|
* A client is the starting point to the Twilio Conversations functionality.
|
package/builds/lib.esm.d.ts
CHANGED
@@ -2691,6 +2691,11 @@ interface CreateConversationOptions {
|
|
2691
2691
|
* A unique identifier of the conversation.
|
2692
2692
|
*/
|
2693
2693
|
uniqueName?: string;
|
2694
|
+
/**
|
2695
|
+
* The access control for the conversation.
|
2696
|
+
* null for existing conversations, 'restricted' for conversations that need to support users with restricted access
|
2697
|
+
*/
|
2698
|
+
access?: string;
|
2694
2699
|
}
|
2695
2700
|
/**
|
2696
2701
|
* A client is the starting point to the Twilio Conversations functionality.
|
package/builds/lib.esm.js
CHANGED
@@ -6819,6 +6819,7 @@ var Conversations = /*#__PURE__*/function (_ReplayEventEmitter) {
|
|
6819
6819
|
return this.services.commandExecutor.mutateResource("post", this.configuration.links.conversations, {
|
6820
6820
|
friendly_name: options.friendlyName,
|
6821
6821
|
unique_name: options.uniqueName,
|
6822
|
+
access: options.access,
|
6822
6823
|
attributes: typeof attributes !== "undefined" ? JSON.stringify(attributes) : undefined
|
6823
6824
|
});
|
6824
6825
|
|
@@ -7103,6 +7104,8 @@ var Conversations = /*#__PURE__*/function (_ReplayEventEmitter) {
|
|
7103
7104
|
createdBy: body.created_by,
|
7104
7105
|
attributes: body.attributes,
|
7105
7106
|
channel: body.sync_objects.conversation,
|
7107
|
+
roster: body.sync_objects.participants,
|
7108
|
+
messages: body.sync_objects.messages,
|
7106
7109
|
notificationLevel: body === null || body === void 0 ? void 0 : body.notification_level,
|
7107
7110
|
sid: sid
|
7108
7111
|
};
|
@@ -7148,8 +7151,10 @@ var Conversations = /*#__PURE__*/function (_ReplayEventEmitter) {
|
|
7148
7151
|
uniqueName: body.unique_name,
|
7149
7152
|
createdBy: body.created_by,
|
7150
7153
|
attributes: body.attributes,
|
7151
|
-
channel: "".concat(sid, ".channel"),
|
7152
|
-
|
7154
|
+
channel: body.sync_objects.conversation || "".concat(sid, ".channel"),
|
7155
|
+
roster: body.sync_objects.participants,
|
7156
|
+
messages: body.sync_objects.messages,
|
7157
|
+
notificationLevel: body === null || body === void 0 ? void 0 : body.notification_level,
|
7153
7158
|
sid: sid
|
7154
7159
|
};
|
7155
7160
|
return _context6.abrupt("return", this._upsertConversation("sync", sid, data));
|
@@ -7486,7 +7491,7 @@ var Conversations = /*#__PURE__*/function (_ReplayEventEmitter) {
|
|
7486
7491
|
status: conversationDescriptor.status,
|
7487
7492
|
channel: conversationDescriptor.sync_objects.conversation,
|
7488
7493
|
messages: conversationDescriptor.sync_objects.messages,
|
7489
|
-
roster: "".concat(conversationDescriptor.conversation_sid, ".roster"),
|
7494
|
+
roster: conversationDescriptor.sync_objects.participants || "".concat(conversationDescriptor.conversation_sid, ".roster"),
|
7490
7495
|
lastConsumedMessageIndex: conversationDescriptor.last_read_message_index,
|
7491
7496
|
notificationLevel: conversationDescriptor.notification_level
|
7492
7497
|
};
|
@@ -7909,7 +7914,7 @@ var TypingIndicator = /*#__PURE__*/function () {
|
|
7909
7914
|
}
|
7910
7915
|
|
7911
7916
|
conversation._participants.forEach(function (participant) {
|
7912
|
-
if (participant.identity !== message.identity) {
|
7917
|
+
if (participant.identity !== message.identity && participant.type !== "apple") {
|
7913
7918
|
return;
|
7914
7919
|
}
|
7915
7920
|
|
@@ -8025,7 +8030,7 @@ function PushNotification(data) {
|
|
8025
8030
|
this.data = data.data || {};
|
8026
8031
|
});
|
8027
8032
|
|
8028
|
-
var version = "2.6.
|
8033
|
+
var version = "2.6.1";
|
8029
8034
|
|
8030
8035
|
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
8031
8036
|
|
@@ -10435,6 +10440,7 @@ var Client = Client_1 = (_class = /*#__PURE__*/function (_ReplayEventEmitter) {
|
|
10435
10440
|
this._conversationsPromise = this._conversationsEntity.fetchConversations().then(function () {
|
10436
10441
|
return _this3._conversationsEntity;
|
10437
10442
|
}).catch(function (error) {
|
10443
|
+
console.error("Failed to fetch conversations _conversationsPromise -> client.ts", error);
|
10438
10444
|
throw error;
|
10439
10445
|
});
|
10440
10446
|
_context17.next = 30;
|
package/builds/lib.js
CHANGED
@@ -6858,6 +6858,7 @@ var Conversations = /*#__PURE__*/function (_ReplayEventEmitter) {
|
|
6858
6858
|
return this.services.commandExecutor.mutateResource("post", this.configuration.links.conversations, {
|
6859
6859
|
friendly_name: options.friendlyName,
|
6860
6860
|
unique_name: options.uniqueName,
|
6861
|
+
access: options.access,
|
6861
6862
|
attributes: typeof attributes !== "undefined" ? JSON.stringify(attributes) : undefined
|
6862
6863
|
});
|
6863
6864
|
|
@@ -7142,6 +7143,8 @@ var Conversations = /*#__PURE__*/function (_ReplayEventEmitter) {
|
|
7142
7143
|
createdBy: body.created_by,
|
7143
7144
|
attributes: body.attributes,
|
7144
7145
|
channel: body.sync_objects.conversation,
|
7146
|
+
roster: body.sync_objects.participants,
|
7147
|
+
messages: body.sync_objects.messages,
|
7145
7148
|
notificationLevel: body === null || body === void 0 ? void 0 : body.notification_level,
|
7146
7149
|
sid: sid
|
7147
7150
|
};
|
@@ -7187,8 +7190,10 @@ var Conversations = /*#__PURE__*/function (_ReplayEventEmitter) {
|
|
7187
7190
|
uniqueName: body.unique_name,
|
7188
7191
|
createdBy: body.created_by,
|
7189
7192
|
attributes: body.attributes,
|
7190
|
-
channel: "".concat(sid, ".channel"),
|
7191
|
-
|
7193
|
+
channel: body.sync_objects.conversation || "".concat(sid, ".channel"),
|
7194
|
+
roster: body.sync_objects.participants,
|
7195
|
+
messages: body.sync_objects.messages,
|
7196
|
+
notificationLevel: body === null || body === void 0 ? void 0 : body.notification_level,
|
7192
7197
|
sid: sid
|
7193
7198
|
};
|
7194
7199
|
return _context6.abrupt("return", this._upsertConversation("sync", sid, data));
|
@@ -7525,7 +7530,7 @@ var Conversations = /*#__PURE__*/function (_ReplayEventEmitter) {
|
|
7525
7530
|
status: conversationDescriptor.status,
|
7526
7531
|
channel: conversationDescriptor.sync_objects.conversation,
|
7527
7532
|
messages: conversationDescriptor.sync_objects.messages,
|
7528
|
-
roster: "".concat(conversationDescriptor.conversation_sid, ".roster"),
|
7533
|
+
roster: conversationDescriptor.sync_objects.participants || "".concat(conversationDescriptor.conversation_sid, ".roster"),
|
7529
7534
|
lastConsumedMessageIndex: conversationDescriptor.last_read_message_index,
|
7530
7535
|
notificationLevel: conversationDescriptor.notification_level
|
7531
7536
|
};
|
@@ -7948,7 +7953,7 @@ var TypingIndicator = /*#__PURE__*/function () {
|
|
7948
7953
|
}
|
7949
7954
|
|
7950
7955
|
conversation._participants.forEach(function (participant) {
|
7951
|
-
if (participant.identity !== message.identity) {
|
7956
|
+
if (participant.identity !== message.identity && participant.type !== "apple") {
|
7952
7957
|
return;
|
7953
7958
|
}
|
7954
7959
|
|
@@ -8064,7 +8069,7 @@ function PushNotification(data) {
|
|
8064
8069
|
this.data = data.data || {};
|
8065
8070
|
});
|
8066
8071
|
|
8067
|
-
var version = "2.6.
|
8072
|
+
var version = "2.6.1";
|
8068
8073
|
|
8069
8074
|
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
8070
8075
|
|
@@ -10474,6 +10479,7 @@ exports.Client = Client_1 = (_class = /*#__PURE__*/function (_ReplayEventEmitter
|
|
10474
10479
|
this._conversationsPromise = this._conversationsEntity.fetchConversations().then(function () {
|
10475
10480
|
return _this3._conversationsEntity;
|
10476
10481
|
}).catch(function (error) {
|
10482
|
+
console.error("Failed to fetch conversations _conversationsPromise -> client.ts", error);
|
10477
10483
|
throw error;
|
10478
10484
|
});
|
10479
10485
|
_context17.next = 30;
|