sidechat.js 2.4.0 → 2.4.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.
@@ -192,9 +192,10 @@ declare class SidechatAPIClient {
192
192
  * @param {String} [replyCommentID] - alphanumeric ID of comment to reply to. Falls back to parentPostID
193
193
  * @param {SidechatSimpleAsset[]} [assetList] - list of assets to attach
194
194
  * @param {Boolean} [disableDMs] - prevent direct messages being sent to comment's author
195
+ * @param {Boolean} [anonymous] - whether or not to hide user's name and icon on comment
195
196
  * @returns {SidechatPostOrComment} created comment
196
197
  */
197
- createComment: (parentPostID: string, text: string, groupID: string, replyCommentID?: string, assetList?: SidechatSimpleAsset[], disableDMs?: boolean) => SidechatPostOrComment;
198
+ createComment: (parentPostID: string, text: string, groupID: string, replyCommentID?: string, assetList?: SidechatSimpleAsset[], disableDMs?: boolean, anonymous?: boolean) => SidechatPostOrComment;
198
199
  /**
199
200
  * Creates a new post in the specified group
200
201
  * @method
@@ -1 +1 @@
1
- {"version":3,"file":"SidechatAPIClient.d.ts","sourceRoot":"","sources":["../../src/classes/SidechatAPIClient.js"],"names":[],"mappings":";AAGA;;;;GAIG;AACH;IA2BE;;;;OAIG;IACH,yDAOC;IAtCD;;;SAGK;IACL,6BAAU;IAEV;;;;;OAKG;IACH,oBAKE;IAEF;;;;OAIG;IACH,gBAAqC;IAgBrC;;;;OAIG;IACH,6CAEE;IAEF;;;;;OAKG;IACH,kCAEE;IAEF;;;;;OAKG;IACH,mDAgBE;IAEF;;;;;;OAMG;IACH,mEAmBE;IAEF;;;;;;OAMG;IACH,8DAsBE;IAEF;;;;;;OAMG;IACH,+CAwBE;IAEF;;;;OAIG;IACH,2CAsBE;IAEF;;;;;OAKG;IACH,6CAwBE;IAEF;;;;;;OAMG;IACH,oDAGE;IAEF;;;;;OAKG;IACH,+CAqBE;IAEF;;;;;;;;OAQG;IACH,4CAJW,KAAK,GAAC,QAAQ,GAAC,KAAK,2DA2B7B;IAEF;;;;;;OAMG;IACH,sEAsBE;IAEF;;;;;;;OAOG;IACH,6EAqBE;IAEF;;;;;;OAMG;IACH,8BAHW,OAAO,GAAC,UAAU,KAChB,uBAAuB,CAyBlC;IAEF;;;;;;OAMG;IACH,qCAFa,uBAAuB,CAqElC;IAEF;;;;;;OAMG;IACH,2CAFa,eAAe,CAqB1B;IAEF;;;;;OAKG;IACH,uBAFa,sBAAsB,CAoBjC;IAEF;;;;;OAKG;IACH,0CAkBE;IAEF;;;;;;OAMG;IACH,sDAkBE;IAEF;;;;;;OAMG;IACH,yEAwBE;IAEF;;;;;;;;;;;OAWG;IACH,0GAJW,qBAAqB,iDAsC9B;IAEF;;;;;;;;;;;OAWG;IACH,wDANW,qBAAqB,iGAyC9B;IAEF;;;;;OAKG;IACH,+DAqBE;IAEF;;;;;;;;OAQG;IACH,2GA2BE;IAEF;;;;;;OAMG;IACH,6CAwBE;IAEF;;;;;;OAMG;IACH,gEAqBE;IAEF;;;;;OAKG;IACH,mDAqBE;IAEF;;;;OAIG;IACH,kCAkBE;IAEF;;;;OAIG;IACH,wHAiCE;CACH"}
1
+ {"version":3,"file":"SidechatAPIClient.d.ts","sourceRoot":"","sources":["../../src/classes/SidechatAPIClient.js"],"names":[],"mappings":";AAGA;;;;GAIG;AACH;IA2BE;;;;OAIG;IACH,yDAOC;IAtCD;;;SAGK;IACL,6BAAU;IAEV;;;;;OAKG;IACH,oBAKE;IAEF;;;;OAIG;IACH,gBAAqC;IAgBrC;;;;OAIG;IACH,6CAEE;IAEF;;;;;OAKG;IACH,kCAEE;IAEF;;;;;OAKG;IACH,mDAgBE;IAEF;;;;;;OAMG;IACH,mEAmBE;IAEF;;;;;;OAMG;IACH,8DAsBE;IAEF;;;;;;OAMG;IACH,+CAwBE;IAEF;;;;OAIG;IACH,2CAsBE;IAEF;;;;;OAKG;IACH,6CAwBE;IAEF;;;;;;OAMG;IACH,oDAGE;IAEF;;;;;OAKG;IACH,+CAqBE;IAEF;;;;;;;;OAQG;IACH,4CAJW,KAAK,GAAC,QAAQ,GAAC,KAAK,2DA2B7B;IAEF;;;;;;OAMG;IACH,sEAsBE;IAEF;;;;;;;OAOG;IACH,6EAqBE;IAEF;;;;;;OAMG;IACH,8BAHW,OAAO,GAAC,UAAU,KAChB,uBAAuB,CAyBlC;IAEF;;;;;;OAMG;IACH,qCAFa,uBAAuB,CAqElC;IAEF;;;;;;OAMG;IACH,2CAFa,eAAe,CAqB1B;IAEF;;;;;OAKG;IACH,uBAFa,sBAAsB,CAoBjC;IAEF;;;;;OAKG;IACH,0CAkBE;IAEF;;;;;;OAMG;IACH,sDAkBE;IAEF;;;;;;OAMG;IACH,yEAwBE;IAEF;;;;;;;;;;;;OAYG;IACH,0GALW,qBAAqB,sEAyC9B;IAEF;;;;;;;;;;;OAWG;IACH,wDANW,qBAAqB,iGAyC9B;IAEF;;;;;OAKG;IACH,+DAqBE;IAEF;;;;;;;;OAQG;IACH,2GA2BE;IAEF;;;;;;OAMG;IACH,6CAwBE;IAEF;;;;;;OAMG;IACH,gEAqBE;IAEF;;;;;OAKG;IACH,mDAqBE;IAEF;;;;OAIG;IACH,kCAkBE;IAEF;;;;OAIG;IACH,wHAiCE;CACH"}
package/dist/index.cjs CHANGED
@@ -651,6 +651,7 @@ class SidechatAPIClient {
651
651
  * @param {String} [replyCommentID] - alphanumeric ID of comment to reply to. Falls back to parentPostID
652
652
  * @param {SidechatSimpleAsset[]} [assetList] - list of assets to attach
653
653
  * @param {Boolean} [disableDMs] - prevent direct messages being sent to comment's author
654
+ * @param {Boolean} [anonymous] - whether or not to hide user's name and icon on comment
654
655
  * @returns {SidechatPostOrComment} created comment
655
656
  */
656
657
  createComment = async (
@@ -659,7 +660,8 @@ class SidechatAPIClient {
659
660
  groupID,
660
661
  replyCommentID = parentPostID,
661
662
  assetList = [],
662
- disableDMs = false
663
+ disableDMs = false,
664
+ anonymous = false
663
665
  ) => {
664
666
  if (!this.userToken) {
665
667
  throw new SidechatAPIError("User is not authenticated.");
@@ -679,6 +681,7 @@ class SidechatAPIClient {
679
681
  reply_post_id: replyCommentID,
680
682
  parent_post_id: parentPostID,
681
683
  dms_disabled: disableDMs,
684
+ using_identity: !anonymous,
682
685
  }),
683
686
  });
684
687
  const json = await res.json();
package/dist/index.mjs CHANGED
@@ -647,6 +647,7 @@ class SidechatAPIClient {
647
647
  * @param {String} [replyCommentID] - alphanumeric ID of comment to reply to. Falls back to parentPostID
648
648
  * @param {SidechatSimpleAsset[]} [assetList] - list of assets to attach
649
649
  * @param {Boolean} [disableDMs] - prevent direct messages being sent to comment's author
650
+ * @param {Boolean} [anonymous] - whether or not to hide user's name and icon on comment
650
651
  * @returns {SidechatPostOrComment} created comment
651
652
  */
652
653
  createComment = async (
@@ -655,7 +656,8 @@ class SidechatAPIClient {
655
656
  groupID,
656
657
  replyCommentID = parentPostID,
657
658
  assetList = [],
658
- disableDMs = false
659
+ disableDMs = false,
660
+ anonymous = false
659
661
  ) => {
660
662
  if (!this.userToken) {
661
663
  throw new SidechatAPIError("User is not authenticated.");
@@ -675,6 +677,7 @@ class SidechatAPIClient {
675
677
  reply_post_id: replyCommentID,
676
678
  parent_post_id: parentPostID,
677
679
  dms_disabled: disableDMs,
680
+ using_identity: !anonymous,
678
681
  }),
679
682
  });
680
683
  const json = await res.json();
package/package.json CHANGED
@@ -1,54 +1,54 @@
1
- {
2
- "name": "sidechat.js",
3
- "version": "2.4.0",
4
- "description": "A reverse-engineered API wrapper for Sidechat",
5
- "type": "module",
6
- "source": "./src/index.js",
7
- "main": "./dist/index.cjs",
8
- "module": "./dist/index.mjs",
9
- "types": "./dist/index.d.ts",
10
- "exports": {
11
- ".": {
12
- "import": {
13
- "types": "./dist/index.d.mts",
14
- "default": "./dist/index.mjs"
15
- },
16
- "require": {
17
- "types": "./dist/index.d.ts",
18
- "default": "./dist/index.cjs"
19
- }
20
- },
21
- "./src/types": {
22
- "types": "./dist/types/SidechatTypes.d.ts",
23
- "default": "./src/types/SidechatTypes.js"
24
- }
25
- },
26
- "scripts": {
27
- "build": "rollup -c",
28
- "dev": "rollup -c --watch",
29
- "docs": "jsdoc --configure jsdoc.json --verbose",
30
- "prepublish": "tsc",
31
- "typegen": "tsc"
32
- },
33
- "repository": {
34
- "type": "git",
35
- "url": "git+https://github.com/micahlt/sidechat.js.git"
36
- },
37
- "author": "Micah Lindley",
38
- "license": "MIT",
39
- "bugs": {
40
- "url": "https://github.com/micahlt/sidechat.js/issues"
41
- },
42
- "homepage": "https://github.com/micahlt/sidechat.js#readme",
43
- "engines": {
44
- "node": ">=18.0.0"
45
- },
46
- "devDependencies": {
47
- "clean-jsdoc-theme": "^4.2.17",
48
- "dotenv": "^16.4.5",
49
- "prompt-sync": "^4.2.0",
50
- "rollup": "^2.79.1",
51
- "rollup-plugin-copy": "^3.5.0",
52
- "typescript": "^5.4.2"
53
- }
54
- }
1
+ {
2
+ "name": "sidechat.js",
3
+ "version": "2.4.1",
4
+ "description": "A reverse-engineered API wrapper for Sidechat",
5
+ "type": "module",
6
+ "source": "./src/index.js",
7
+ "main": "./dist/index.cjs",
8
+ "module": "./dist/index.mjs",
9
+ "types": "./dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "import": {
13
+ "types": "./dist/index.d.mts",
14
+ "default": "./dist/index.mjs"
15
+ },
16
+ "require": {
17
+ "types": "./dist/index.d.ts",
18
+ "default": "./dist/index.cjs"
19
+ }
20
+ },
21
+ "./src/types": {
22
+ "types": "./dist/types/SidechatTypes.d.ts",
23
+ "default": "./src/types/SidechatTypes.js"
24
+ }
25
+ },
26
+ "scripts": {
27
+ "build": "rollup -c",
28
+ "dev": "rollup -c --watch",
29
+ "docs": "jsdoc --configure jsdoc.json --verbose",
30
+ "prepublish": "tsc",
31
+ "typegen": "tsc"
32
+ },
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "git+https://github.com/micahlt/sidechat.js.git"
36
+ },
37
+ "author": "Micah Lindley",
38
+ "license": "MIT",
39
+ "bugs": {
40
+ "url": "https://github.com/micahlt/sidechat.js/issues"
41
+ },
42
+ "homepage": "https://github.com/micahlt/sidechat.js#readme",
43
+ "engines": {
44
+ "node": ">=18.0.0"
45
+ },
46
+ "devDependencies": {
47
+ "clean-jsdoc-theme": "^4.2.18",
48
+ "dotenv": "^16.4.5",
49
+ "prompt-sync": "^4.2.0",
50
+ "rollup": "^2.79.1",
51
+ "rollup-plugin-copy": "^3.5.0",
52
+ "typescript": "^5.4.5"
53
+ }
54
+ }
@@ -638,6 +638,7 @@ class SidechatAPIClient {
638
638
  * @param {String} [replyCommentID] - alphanumeric ID of comment to reply to. Falls back to parentPostID
639
639
  * @param {SidechatSimpleAsset[]} [assetList] - list of assets to attach
640
640
  * @param {Boolean} [disableDMs] - prevent direct messages being sent to comment's author
641
+ * @param {Boolean} [anonymous] - whether or not to hide user's name and icon on comment
641
642
  * @returns {SidechatPostOrComment} created comment
642
643
  */
643
644
  createComment = async (
@@ -646,7 +647,8 @@ class SidechatAPIClient {
646
647
  groupID,
647
648
  replyCommentID = parentPostID,
648
649
  assetList = [],
649
- disableDMs = false
650
+ disableDMs = false,
651
+ anonymous = false
650
652
  ) => {
651
653
  if (!this.userToken) {
652
654
  throw new SidechatAPIError("User is not authenticated.");
@@ -666,6 +668,7 @@ class SidechatAPIClient {
666
668
  reply_post_id: replyCommentID,
667
669
  parent_post_id: parentPostID,
668
670
  dms_disabled: disableDMs,
671
+ using_identity: !anonymous,
669
672
  }),
670
673
  });
671
674
  const json = await res.json();