@usesocial/cli 0.18.0 → 0.18.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/CHANGELOG.md +6 -0
- package/dist/index.mjs +14 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @usesocial/cli
|
|
2
2
|
|
|
3
|
+
## 0.18.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#98](https://github.com/usesocial/monorepo/pull/98) [`ec79564`](https://github.com/usesocial/monorepo/commit/ec79564b1840edb08721357a6d9416afeab6350e) Thanks [@CyrusNuevoDia](https://github.com/CyrusNuevoDia)! - Mark LinkedIn chats read after sending a message.
|
|
8
|
+
|
|
3
9
|
## 0.18.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/dist/index.mjs
CHANGED
|
@@ -454,7 +454,7 @@ const productBrand = {
|
|
|
454
454
|
const brand = {
|
|
455
455
|
org,
|
|
456
456
|
name: productBrand.name,
|
|
457
|
-
tagline: "
|
|
457
|
+
tagline: "Agentic founder-led distribution",
|
|
458
458
|
description: productBrand.description
|
|
459
459
|
};
|
|
460
460
|
const brandURLs = {
|
|
@@ -15677,6 +15677,16 @@ const buildSql$1 = (deps, platform) => defineCommand({
|
|
|
15677
15677
|
}
|
|
15678
15678
|
}
|
|
15679
15679
|
});
|
|
15680
|
+
const patchChatReadStatus = async (deps, chatId, headers, read) => {
|
|
15681
|
+
const response = await deps.api.patch("linkedin/chats/".concat(encodeURIComponent(chatId)), {
|
|
15682
|
+
headers,
|
|
15683
|
+
json: { read_status: read }
|
|
15684
|
+
});
|
|
15685
|
+
return {
|
|
15686
|
+
data: await response.json(),
|
|
15687
|
+
response
|
|
15688
|
+
};
|
|
15689
|
+
};
|
|
15680
15690
|
const buildMark = (deps) => {
|
|
15681
15691
|
const schemaContract = {
|
|
15682
15692
|
inputSchema: schemas$1.MessagesMarkInput,
|
|
@@ -15767,11 +15777,7 @@ const buildMark = (deps) => {
|
|
|
15767
15777
|
});
|
|
15768
15778
|
const accountIdHeader = selectedAccount.selector;
|
|
15769
15779
|
const headers = { ...accountIdHeader === void 0 ? {} : { "x-social-account-id": accountIdHeader } };
|
|
15770
|
-
const response = await deps.
|
|
15771
|
-
headers,
|
|
15772
|
-
json: { read_status: input.status === "read" }
|
|
15773
|
-
});
|
|
15774
|
-
const data = await response.json();
|
|
15780
|
+
const { data, response } = await patchChatReadStatus(deps, chat_id, headers, input.status === "read");
|
|
15775
15781
|
await deps.printResult({
|
|
15776
15782
|
account: selectedAccount,
|
|
15777
15783
|
contract: schemaContractFrom(cmd),
|
|
@@ -16286,6 +16292,7 @@ const buildMessage$1 = (deps, sendCommand) => {
|
|
|
16286
16292
|
const data = await response.json();
|
|
16287
16293
|
const messageId = responseStringOrFirst(data, ["message_id"]);
|
|
16288
16294
|
const chatId = classified.kind === "thread" ? classified.id : responseString$1(data, ["chat_id", "id"]);
|
|
16295
|
+
if (responseSucceeded$1(response) && chatId !== void 0) await patchChatReadStatus(deps, chatId, headers, true);
|
|
16289
16296
|
if (responseSucceeded$1(response) && messageId !== void 0 && chatId !== void 0) {
|
|
16290
16297
|
const ownAccountId = requireAccountSelector$1(own.accountIdHeader);
|
|
16291
16298
|
writeThroughLinkedinCache({
|
|
@@ -24265,7 +24272,7 @@ function createEnv(opts) {
|
|
|
24265
24272
|
}
|
|
24266
24273
|
//#endregion
|
|
24267
24274
|
//#region package.json
|
|
24268
|
-
var version$1 = "0.18.
|
|
24275
|
+
var version$1 = "0.18.1";
|
|
24269
24276
|
//#endregion
|
|
24270
24277
|
//#region src/lib/env.ts
|
|
24271
24278
|
const URLWithTrailingSlash = url().transform(ensureTrailingSlash);
|