sidechat.js 2.3.7 → 2.4.0
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/dist/classes/SidechatAPIClient.d.ts +23 -1
- package/dist/classes/SidechatAPIClient.d.ts.map +1 -1
- package/dist/classes/SidechatColorList.d.ts +7 -5
- package/dist/classes/SidechatColorList.d.ts.map +1 -1
- package/dist/index.cjs +132 -96
- package/dist/index.mjs +132 -96
- package/docs/sidechat.js/2.4.0/SidechatAPIClient.html +3 -0
- package/docs/sidechat.js/2.4.0/SidechatAPIError.html +3 -0
- package/docs/sidechat.js/{2.2.0/classes_SidechatAPIError.js.html → 2.4.0/SidechatColorList.html} +2 -15
- package/docs/sidechat.js/{2.3.1 → 2.4.0}/classes_SidechatAPIClient.js.html +316 -81
- package/docs/sidechat.js/{2.0.4 → 2.4.0}/classes_SidechatAPIError.js.html +2 -2
- package/docs/sidechat.js/{2.0.6/classes_SidechatAPIError.js.html → 2.4.0/classes_SidechatColorList.js.html} +75 -12
- package/docs/sidechat.js/2.4.0/data/search.json +1 -0
- package/docs/sidechat.js/2.4.0/global.html +3 -0
- package/docs/sidechat.js/{2.2.0 → 2.4.0}/index.html +2 -2
- package/docs/sidechat.js/{2.0.4 → 2.4.0}/tutorial-Authentication.html +4 -3
- package/docs/sidechat.js/{2.0.4 → 2.4.0}/tutorial-Email Registration.html +2 -2
- package/docs/sidechat.js/{2.2.1 → 2.4.0}/types_SidechatTypes.js.html +2 -2
- package/package.json +1 -1
- package/src/classes/SidechatAPIClient.js +127 -90
- package/src/classes/SidechatColorList.js +5 -6
- package/src/tests/postTest.js +2 -1
- package/docs/sidechat.js/2.0.4/SidechatAPIClient.html +0 -3
- package/docs/sidechat.js/2.0.4/SidechatAPIError.html +0 -3
- package/docs/sidechat.js/2.0.4/classes_SidechatAPIClient.js.html +0 -425
- package/docs/sidechat.js/2.0.4/data/search.json +0 -1
- package/docs/sidechat.js/2.0.4/global.html +0 -3
- package/docs/sidechat.js/2.0.4/index.html +0 -4
- package/docs/sidechat.js/2.0.4/types_SidechatTypes.js.html +0 -98
- package/docs/sidechat.js/2.0.6/SidechatAPIClient.html +0 -3
- package/docs/sidechat.js/2.0.6/SidechatAPIError.html +0 -3
- package/docs/sidechat.js/2.0.6/classes_SidechatAPIClient.js.html +0 -462
- package/docs/sidechat.js/2.0.6/data/search.json +0 -1
- package/docs/sidechat.js/2.0.6/fonts/Inconsolata-Regular.ttf +0 -0
- package/docs/sidechat.js/2.0.6/fonts/OpenSans-Regular.ttf +0 -0
- package/docs/sidechat.js/2.0.6/fonts/WorkSans-Bold.ttf +0 -0
- package/docs/sidechat.js/2.0.6/global.html +0 -3
- package/docs/sidechat.js/2.0.6/index.html +0 -4
- package/docs/sidechat.js/2.0.6/scripts/core.js +0 -702
- package/docs/sidechat.js/2.0.6/scripts/core.min.js +0 -23
- package/docs/sidechat.js/2.0.6/scripts/resize.js +0 -90
- package/docs/sidechat.js/2.0.6/scripts/search.js +0 -265
- package/docs/sidechat.js/2.0.6/scripts/search.min.js +0 -6
- package/docs/sidechat.js/2.0.6/scripts/third-party/Apache-License-2.0.txt +0 -202
- package/docs/sidechat.js/2.0.6/scripts/third-party/fuse.js +0 -9
- package/docs/sidechat.js/2.0.6/scripts/third-party/hljs-line-num-original.js +0 -369
- package/docs/sidechat.js/2.0.6/scripts/third-party/hljs-line-num.js +0 -1
- package/docs/sidechat.js/2.0.6/scripts/third-party/hljs-original.js +0 -5171
- package/docs/sidechat.js/2.0.6/scripts/third-party/hljs.js +0 -1
- package/docs/sidechat.js/2.0.6/scripts/third-party/popper.js +0 -5
- package/docs/sidechat.js/2.0.6/scripts/third-party/tippy.js +0 -1
- package/docs/sidechat.js/2.0.6/scripts/third-party/tocbot.js +0 -672
- package/docs/sidechat.js/2.0.6/scripts/third-party/tocbot.min.js +0 -1
- package/docs/sidechat.js/2.0.6/styles/clean-jsdoc-theme-base.css +0 -975
- package/docs/sidechat.js/2.0.6/styles/clean-jsdoc-theme-dark.css +0 -407
- package/docs/sidechat.js/2.0.6/styles/clean-jsdoc-theme-light.css +0 -388
- package/docs/sidechat.js/2.0.6/styles/clean-jsdoc-theme.min.css +0 -1
- package/docs/sidechat.js/2.0.6/tutorial-Authentication.html +0 -13
- package/docs/sidechat.js/2.0.6/tutorial-Email Registration.html +0 -6
- package/docs/sidechat.js/2.0.6/types_SidechatTypes.js.html +0 -114
- package/docs/sidechat.js/2.1.0/SidechatAPIClient.html +0 -3
- package/docs/sidechat.js/2.1.0/SidechatAPIError.html +0 -3
- package/docs/sidechat.js/2.1.0/classes_SidechatAPIClient.js.html +0 -528
- package/docs/sidechat.js/2.1.0/classes_SidechatAPIError.js.html +0 -16
- package/docs/sidechat.js/2.1.0/data/search.json +0 -1
- package/docs/sidechat.js/2.1.0/fonts/Inconsolata-Regular.ttf +0 -0
- package/docs/sidechat.js/2.1.0/fonts/OpenSans-Regular.ttf +0 -0
- package/docs/sidechat.js/2.1.0/fonts/WorkSans-Bold.ttf +0 -0
- package/docs/sidechat.js/2.1.0/global.html +0 -3
- package/docs/sidechat.js/2.1.0/index.html +0 -4
- package/docs/sidechat.js/2.1.0/scripts/core.js +0 -702
- package/docs/sidechat.js/2.1.0/scripts/core.min.js +0 -23
- package/docs/sidechat.js/2.1.0/scripts/resize.js +0 -90
- package/docs/sidechat.js/2.1.0/scripts/search.js +0 -265
- package/docs/sidechat.js/2.1.0/scripts/search.min.js +0 -6
- package/docs/sidechat.js/2.1.0/scripts/third-party/Apache-License-2.0.txt +0 -202
- package/docs/sidechat.js/2.1.0/scripts/third-party/fuse.js +0 -9
- package/docs/sidechat.js/2.1.0/scripts/third-party/hljs-line-num-original.js +0 -369
- package/docs/sidechat.js/2.1.0/scripts/third-party/hljs-line-num.js +0 -1
- package/docs/sidechat.js/2.1.0/scripts/third-party/hljs-original.js +0 -5171
- package/docs/sidechat.js/2.1.0/scripts/third-party/hljs.js +0 -1
- package/docs/sidechat.js/2.1.0/scripts/third-party/popper.js +0 -5
- package/docs/sidechat.js/2.1.0/scripts/third-party/tippy.js +0 -1
- package/docs/sidechat.js/2.1.0/scripts/third-party/tocbot.js +0 -672
- package/docs/sidechat.js/2.1.0/scripts/third-party/tocbot.min.js +0 -1
- package/docs/sidechat.js/2.1.0/styles/clean-jsdoc-theme-base.css +0 -975
- package/docs/sidechat.js/2.1.0/styles/clean-jsdoc-theme-dark.css +0 -407
- package/docs/sidechat.js/2.1.0/styles/clean-jsdoc-theme-light.css +0 -388
- package/docs/sidechat.js/2.1.0/styles/clean-jsdoc-theme.min.css +0 -1
- package/docs/sidechat.js/2.1.0/tutorial-Authentication.html +0 -13
- package/docs/sidechat.js/2.1.0/tutorial-Email Registration.html +0 -6
- package/docs/sidechat.js/2.1.0/types_SidechatTypes.js.html +0 -134
- package/docs/sidechat.js/2.2.0/SidechatAPIClient.html +0 -3
- package/docs/sidechat.js/2.2.0/SidechatAPIError.html +0 -3
- package/docs/sidechat.js/2.2.0/classes_SidechatAPIClient.js.html +0 -651
- package/docs/sidechat.js/2.2.0/data/search.json +0 -1
- package/docs/sidechat.js/2.2.0/fonts/Inconsolata-Regular.ttf +0 -0
- package/docs/sidechat.js/2.2.0/fonts/OpenSans-Regular.ttf +0 -0
- package/docs/sidechat.js/2.2.0/fonts/WorkSans-Bold.ttf +0 -0
- package/docs/sidechat.js/2.2.0/global.html +0 -3
- package/docs/sidechat.js/2.2.0/scripts/core.js +0 -702
- package/docs/sidechat.js/2.2.0/scripts/core.min.js +0 -23
- package/docs/sidechat.js/2.2.0/scripts/resize.js +0 -90
- package/docs/sidechat.js/2.2.0/scripts/search.js +0 -265
- package/docs/sidechat.js/2.2.0/scripts/search.min.js +0 -6
- package/docs/sidechat.js/2.2.0/scripts/third-party/Apache-License-2.0.txt +0 -202
- package/docs/sidechat.js/2.2.0/scripts/third-party/fuse.js +0 -9
- package/docs/sidechat.js/2.2.0/scripts/third-party/hljs-line-num-original.js +0 -369
- package/docs/sidechat.js/2.2.0/scripts/third-party/hljs-line-num.js +0 -1
- package/docs/sidechat.js/2.2.0/scripts/third-party/hljs-original.js +0 -5171
- package/docs/sidechat.js/2.2.0/scripts/third-party/hljs.js +0 -1
- package/docs/sidechat.js/2.2.0/scripts/third-party/popper.js +0 -5
- package/docs/sidechat.js/2.2.0/scripts/third-party/tippy.js +0 -1
- package/docs/sidechat.js/2.2.0/scripts/third-party/tocbot.js +0 -672
- package/docs/sidechat.js/2.2.0/scripts/third-party/tocbot.min.js +0 -1
- package/docs/sidechat.js/2.2.0/styles/clean-jsdoc-theme-base.css +0 -975
- package/docs/sidechat.js/2.2.0/styles/clean-jsdoc-theme-dark.css +0 -407
- package/docs/sidechat.js/2.2.0/styles/clean-jsdoc-theme-light.css +0 -388
- package/docs/sidechat.js/2.2.0/styles/clean-jsdoc-theme.min.css +0 -1
- package/docs/sidechat.js/2.2.0/tutorial-Authentication.html +0 -14
- package/docs/sidechat.js/2.2.0/tutorial-Email Registration.html +0 -6
- package/docs/sidechat.js/2.2.0/types_SidechatTypes.js.html +0 -134
- package/docs/sidechat.js/2.2.1/SidechatAPIClient.html +0 -3
- package/docs/sidechat.js/2.2.1/SidechatAPIError.html +0 -3
- package/docs/sidechat.js/2.2.1/classes_SidechatAPIClient.js.html +0 -688
- package/docs/sidechat.js/2.2.1/classes_SidechatAPIError.js.html +0 -16
- package/docs/sidechat.js/2.2.1/data/search.json +0 -1
- package/docs/sidechat.js/2.2.1/fonts/Inconsolata-Regular.ttf +0 -0
- package/docs/sidechat.js/2.2.1/fonts/OpenSans-Regular.ttf +0 -0
- package/docs/sidechat.js/2.2.1/fonts/WorkSans-Bold.ttf +0 -0
- package/docs/sidechat.js/2.2.1/global.html +0 -3
- package/docs/sidechat.js/2.2.1/index.html +0 -4
- package/docs/sidechat.js/2.2.1/scripts/core.js +0 -702
- package/docs/sidechat.js/2.2.1/scripts/core.min.js +0 -23
- package/docs/sidechat.js/2.2.1/scripts/resize.js +0 -90
- package/docs/sidechat.js/2.2.1/scripts/search.js +0 -265
- package/docs/sidechat.js/2.2.1/scripts/search.min.js +0 -6
- package/docs/sidechat.js/2.2.1/scripts/third-party/Apache-License-2.0.txt +0 -202
- package/docs/sidechat.js/2.2.1/scripts/third-party/fuse.js +0 -9
- package/docs/sidechat.js/2.2.1/scripts/third-party/hljs-line-num-original.js +0 -369
- package/docs/sidechat.js/2.2.1/scripts/third-party/hljs-line-num.js +0 -1
- package/docs/sidechat.js/2.2.1/scripts/third-party/hljs-original.js +0 -5171
- package/docs/sidechat.js/2.2.1/scripts/third-party/hljs.js +0 -1
- package/docs/sidechat.js/2.2.1/scripts/third-party/popper.js +0 -5
- package/docs/sidechat.js/2.2.1/scripts/third-party/tippy.js +0 -1
- package/docs/sidechat.js/2.2.1/scripts/third-party/tocbot.js +0 -672
- package/docs/sidechat.js/2.2.1/scripts/third-party/tocbot.min.js +0 -1
- package/docs/sidechat.js/2.2.1/styles/clean-jsdoc-theme-base.css +0 -975
- package/docs/sidechat.js/2.2.1/styles/clean-jsdoc-theme-dark.css +0 -407
- package/docs/sidechat.js/2.2.1/styles/clean-jsdoc-theme-light.css +0 -388
- package/docs/sidechat.js/2.2.1/styles/clean-jsdoc-theme.min.css +0 -1
- package/docs/sidechat.js/2.2.1/tutorial-Authentication.html +0 -14
- package/docs/sidechat.js/2.2.1/tutorial-Email Registration.html +0 -6
- package/docs/sidechat.js/2.2.3/SidechatAPIClient.html +0 -3
- package/docs/sidechat.js/2.2.3/SidechatAPIError.html +0 -3
- package/docs/sidechat.js/2.2.3/classes_SidechatAPIClient.js.html +0 -689
- package/docs/sidechat.js/2.2.3/classes_SidechatAPIError.js.html +0 -16
- package/docs/sidechat.js/2.2.3/data/search.json +0 -1
- package/docs/sidechat.js/2.2.3/fonts/Inconsolata-Regular.ttf +0 -0
- package/docs/sidechat.js/2.2.3/fonts/OpenSans-Regular.ttf +0 -0
- package/docs/sidechat.js/2.2.3/fonts/WorkSans-Bold.ttf +0 -0
- package/docs/sidechat.js/2.2.3/global.html +0 -3
- package/docs/sidechat.js/2.2.3/index.html +0 -4
- package/docs/sidechat.js/2.2.3/scripts/core.js +0 -702
- package/docs/sidechat.js/2.2.3/scripts/core.min.js +0 -23
- package/docs/sidechat.js/2.2.3/scripts/resize.js +0 -90
- package/docs/sidechat.js/2.2.3/scripts/search.js +0 -265
- package/docs/sidechat.js/2.2.3/scripts/search.min.js +0 -6
- package/docs/sidechat.js/2.2.3/scripts/third-party/Apache-License-2.0.txt +0 -202
- package/docs/sidechat.js/2.2.3/scripts/third-party/fuse.js +0 -9
- package/docs/sidechat.js/2.2.3/scripts/third-party/hljs-line-num-original.js +0 -369
- package/docs/sidechat.js/2.2.3/scripts/third-party/hljs-line-num.js +0 -1
- package/docs/sidechat.js/2.2.3/scripts/third-party/hljs-original.js +0 -5171
- package/docs/sidechat.js/2.2.3/scripts/third-party/hljs.js +0 -1
- package/docs/sidechat.js/2.2.3/scripts/third-party/popper.js +0 -5
- package/docs/sidechat.js/2.2.3/scripts/third-party/tippy.js +0 -1
- package/docs/sidechat.js/2.2.3/scripts/third-party/tocbot.js +0 -672
- package/docs/sidechat.js/2.2.3/scripts/third-party/tocbot.min.js +0 -1
- package/docs/sidechat.js/2.2.3/styles/clean-jsdoc-theme-base.css +0 -975
- package/docs/sidechat.js/2.2.3/styles/clean-jsdoc-theme-dark.css +0 -407
- package/docs/sidechat.js/2.2.3/styles/clean-jsdoc-theme-light.css +0 -388
- package/docs/sidechat.js/2.2.3/styles/clean-jsdoc-theme.min.css +0 -1
- package/docs/sidechat.js/2.2.3/tutorial-Authentication.html +0 -14
- package/docs/sidechat.js/2.2.3/tutorial-Email Registration.html +0 -6
- package/docs/sidechat.js/2.2.3/types_SidechatTypes.js.html +0 -134
- package/docs/sidechat.js/2.3.0/SidechatAPIClient.html +0 -3
- package/docs/sidechat.js/2.3.0/SidechatAPIError.html +0 -3
- package/docs/sidechat.js/2.3.0/classes_SidechatAPIClient.js.html +0 -720
- package/docs/sidechat.js/2.3.0/classes_SidechatAPIError.js.html +0 -16
- package/docs/sidechat.js/2.3.0/data/search.json +0 -1
- package/docs/sidechat.js/2.3.0/fonts/Inconsolata-Regular.ttf +0 -0
- package/docs/sidechat.js/2.3.0/fonts/OpenSans-Regular.ttf +0 -0
- package/docs/sidechat.js/2.3.0/fonts/WorkSans-Bold.ttf +0 -0
- package/docs/sidechat.js/2.3.0/global.html +0 -3
- package/docs/sidechat.js/2.3.0/index.html +0 -4
- package/docs/sidechat.js/2.3.0/scripts/core.js +0 -702
- package/docs/sidechat.js/2.3.0/scripts/core.min.js +0 -23
- package/docs/sidechat.js/2.3.0/scripts/resize.js +0 -90
- package/docs/sidechat.js/2.3.0/scripts/search.js +0 -265
- package/docs/sidechat.js/2.3.0/scripts/search.min.js +0 -6
- package/docs/sidechat.js/2.3.0/scripts/third-party/Apache-License-2.0.txt +0 -202
- package/docs/sidechat.js/2.3.0/scripts/third-party/fuse.js +0 -9
- package/docs/sidechat.js/2.3.0/scripts/third-party/hljs-line-num-original.js +0 -369
- package/docs/sidechat.js/2.3.0/scripts/third-party/hljs-line-num.js +0 -1
- package/docs/sidechat.js/2.3.0/scripts/third-party/hljs-original.js +0 -5171
- package/docs/sidechat.js/2.3.0/scripts/third-party/hljs.js +0 -1
- package/docs/sidechat.js/2.3.0/scripts/third-party/popper.js +0 -5
- package/docs/sidechat.js/2.3.0/scripts/third-party/tippy.js +0 -1
- package/docs/sidechat.js/2.3.0/scripts/third-party/tocbot.js +0 -672
- package/docs/sidechat.js/2.3.0/scripts/third-party/tocbot.min.js +0 -1
- package/docs/sidechat.js/2.3.0/styles/clean-jsdoc-theme-base.css +0 -975
- package/docs/sidechat.js/2.3.0/styles/clean-jsdoc-theme-dark.css +0 -407
- package/docs/sidechat.js/2.3.0/styles/clean-jsdoc-theme-light.css +0 -388
- package/docs/sidechat.js/2.3.0/styles/clean-jsdoc-theme.min.css +0 -1
- package/docs/sidechat.js/2.3.0/tutorial-Authentication.html +0 -14
- package/docs/sidechat.js/2.3.0/tutorial-Email Registration.html +0 -6
- package/docs/sidechat.js/2.3.0/types_SidechatTypes.js.html +0 -134
- package/docs/sidechat.js/2.3.1/SidechatAPIClient.html +0 -3
- package/docs/sidechat.js/2.3.1/SidechatAPIError.html +0 -3
- package/docs/sidechat.js/2.3.1/classes_SidechatAPIError.js.html +0 -16
- package/docs/sidechat.js/2.3.1/data/search.json +0 -1
- package/docs/sidechat.js/2.3.1/fonts/Inconsolata-Regular.ttf +0 -0
- package/docs/sidechat.js/2.3.1/fonts/OpenSans-Regular.ttf +0 -0
- package/docs/sidechat.js/2.3.1/fonts/WorkSans-Bold.ttf +0 -0
- package/docs/sidechat.js/2.3.1/global.html +0 -3
- package/docs/sidechat.js/2.3.1/index.html +0 -4
- package/docs/sidechat.js/2.3.1/scripts/core.js +0 -702
- package/docs/sidechat.js/2.3.1/scripts/core.min.js +0 -23
- package/docs/sidechat.js/2.3.1/scripts/resize.js +0 -90
- package/docs/sidechat.js/2.3.1/scripts/search.js +0 -265
- package/docs/sidechat.js/2.3.1/scripts/search.min.js +0 -6
- package/docs/sidechat.js/2.3.1/scripts/third-party/Apache-License-2.0.txt +0 -202
- package/docs/sidechat.js/2.3.1/scripts/third-party/fuse.js +0 -9
- package/docs/sidechat.js/2.3.1/scripts/third-party/hljs-line-num-original.js +0 -369
- package/docs/sidechat.js/2.3.1/scripts/third-party/hljs-line-num.js +0 -1
- package/docs/sidechat.js/2.3.1/scripts/third-party/hljs-original.js +0 -5171
- package/docs/sidechat.js/2.3.1/scripts/third-party/hljs.js +0 -1
- package/docs/sidechat.js/2.3.1/scripts/third-party/popper.js +0 -5
- package/docs/sidechat.js/2.3.1/scripts/third-party/tippy.js +0 -1
- package/docs/sidechat.js/2.3.1/scripts/third-party/tocbot.js +0 -672
- package/docs/sidechat.js/2.3.1/scripts/third-party/tocbot.min.js +0 -1
- package/docs/sidechat.js/2.3.1/styles/clean-jsdoc-theme-base.css +0 -975
- package/docs/sidechat.js/2.3.1/styles/clean-jsdoc-theme-dark.css +0 -407
- package/docs/sidechat.js/2.3.1/styles/clean-jsdoc-theme-light.css +0 -388
- package/docs/sidechat.js/2.3.1/styles/clean-jsdoc-theme.min.css +0 -1
- package/docs/sidechat.js/2.3.1/tutorial-Authentication.html +0 -14
- package/docs/sidechat.js/2.3.1/tutorial-Email Registration.html +0 -6
- package/docs/sidechat.js/2.3.1/types_SidechatTypes.js.html +0 -134
- /package/docs/sidechat.js/{2.0.4 → 2.4.0}/fonts/Inconsolata-Regular.ttf +0 -0
- /package/docs/sidechat.js/{2.0.4 → 2.4.0}/fonts/OpenSans-Regular.ttf +0 -0
- /package/docs/sidechat.js/{2.0.4 → 2.4.0}/fonts/WorkSans-Bold.ttf +0 -0
- /package/docs/sidechat.js/{2.0.4 → 2.4.0}/scripts/core.js +0 -0
- /package/docs/sidechat.js/{2.0.4 → 2.4.0}/scripts/core.min.js +0 -0
- /package/docs/sidechat.js/{2.0.4 → 2.4.0}/scripts/resize.js +0 -0
- /package/docs/sidechat.js/{2.0.4 → 2.4.0}/scripts/search.js +0 -0
- /package/docs/sidechat.js/{2.0.4 → 2.4.0}/scripts/search.min.js +0 -0
- /package/docs/sidechat.js/{2.0.4 → 2.4.0}/scripts/third-party/Apache-License-2.0.txt +0 -0
- /package/docs/sidechat.js/{2.0.4 → 2.4.0}/scripts/third-party/fuse.js +0 -0
- /package/docs/sidechat.js/{2.0.4 → 2.4.0}/scripts/third-party/hljs-line-num-original.js +0 -0
- /package/docs/sidechat.js/{2.0.4 → 2.4.0}/scripts/third-party/hljs-line-num.js +0 -0
- /package/docs/sidechat.js/{2.0.4 → 2.4.0}/scripts/third-party/hljs-original.js +0 -0
- /package/docs/sidechat.js/{2.0.4 → 2.4.0}/scripts/third-party/hljs.js +0 -0
- /package/docs/sidechat.js/{2.0.4 → 2.4.0}/scripts/third-party/popper.js +0 -0
- /package/docs/sidechat.js/{2.0.4 → 2.4.0}/scripts/third-party/tippy.js +0 -0
- /package/docs/sidechat.js/{2.0.4 → 2.4.0}/scripts/third-party/tocbot.js +0 -0
- /package/docs/sidechat.js/{2.0.4 → 2.4.0}/scripts/third-party/tocbot.min.js +0 -0
- /package/docs/sidechat.js/{2.0.4 → 2.4.0}/styles/clean-jsdoc-theme-base.css +0 -0
- /package/docs/sidechat.js/{2.0.4 → 2.4.0}/styles/clean-jsdoc-theme-dark.css +0 -0
- /package/docs/sidechat.js/{2.0.4 → 2.4.0}/styles/clean-jsdoc-theme-light.css +0 -0
- /package/docs/sidechat.js/{2.0.4 → 2.4.0}/styles/clean-jsdoc-theme.min.css +0 -0
|
@@ -8,8 +8,9 @@ declare class SidechatAPIClient {
|
|
|
8
8
|
/**
|
|
9
9
|
* Create a new instance of the API client
|
|
10
10
|
* @param {SidechatAuthToken} [token] - user bearer token
|
|
11
|
+
* @param {String} rootUrl - custom API root URL for mocking or using other server
|
|
11
12
|
*/
|
|
12
|
-
constructor(token?: SidechatAuthToken);
|
|
13
|
+
constructor(token?: SidechatAuthToken, rootUrl?: string);
|
|
13
14
|
/**
|
|
14
15
|
* User bearer token
|
|
15
16
|
* @type {SidechatAuthToken}
|
|
@@ -22,12 +23,25 @@ declare class SidechatAPIClient {
|
|
|
22
23
|
* @constant
|
|
23
24
|
*/
|
|
24
25
|
defaultHeaders: any;
|
|
26
|
+
/**
|
|
27
|
+
* Root URL for every API request
|
|
28
|
+
* @type {String}
|
|
29
|
+
* @default "https://api.sidechat.lol"
|
|
30
|
+
*/
|
|
31
|
+
apiRoot: string;
|
|
25
32
|
/**
|
|
26
33
|
* Manually set the currently signed in user's token. Generally try to avoid this and instead either pass a token to the constructor or login automatically through the auth functions
|
|
27
34
|
* @method
|
|
28
35
|
* @param {SidechatAuthToken} token - user bearer token
|
|
29
36
|
*/
|
|
30
37
|
setToken: (token: SidechatAuthToken) => void;
|
|
38
|
+
/**
|
|
39
|
+
* Manually set the root URL for all API requests. This can be used for mocking requests or redirecting them to a different server
|
|
40
|
+
* @method
|
|
41
|
+
* @param {String} url - new root URL to set
|
|
42
|
+
* @since 2.3.9
|
|
43
|
+
*/
|
|
44
|
+
setAPIRoot: (url: string) => void;
|
|
31
45
|
/**
|
|
32
46
|
* Initiate the login process with a phone number. Should be followed up with verifySMSCode().
|
|
33
47
|
* @method
|
|
@@ -160,6 +174,14 @@ declare class SidechatAPIClient {
|
|
|
160
174
|
* @returns {SidechatGroup}
|
|
161
175
|
*/
|
|
162
176
|
getGroupMetadata: (groupID?: string) => SidechatGroup;
|
|
177
|
+
/**
|
|
178
|
+
* Joins or leaves a group
|
|
179
|
+
* @method
|
|
180
|
+
* @param {String} groupID - alphanumeric ID of group to join or leave
|
|
181
|
+
* @param {Boolean} isMember - whether or not the user should be a member of the group
|
|
182
|
+
* @since 2.3.8
|
|
183
|
+
*/
|
|
184
|
+
setGroupMembership: (groupID: string, isMember: boolean) => Promise<any>;
|
|
163
185
|
/**
|
|
164
186
|
* Creates a comment on a post
|
|
165
187
|
* @method
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidechatAPIClient.d.ts","sourceRoot":"","sources":["../../src/classes/SidechatAPIClient.js"],"names":[],"mappings":";AAGA;;;;GAIG;AACH;
|
|
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"}
|
|
@@ -16,10 +16,12 @@ export type SidechatColor = {
|
|
|
16
16
|
*/
|
|
17
17
|
/**
|
|
18
18
|
* List of colors compatible with user conversation icons
|
|
19
|
-
* @
|
|
20
|
-
* @type {{ colors: SidechatColor[] }}
|
|
19
|
+
* @prop {SidechatColor[]} colors - list of color themes for user icons
|
|
21
20
|
*/
|
|
22
|
-
declare
|
|
23
|
-
colors:
|
|
24
|
-
|
|
21
|
+
declare class SidechatColorList {
|
|
22
|
+
colors: {
|
|
23
|
+
primary: string;
|
|
24
|
+
secondary: string;
|
|
25
|
+
}[];
|
|
26
|
+
}
|
|
25
27
|
//# sourceMappingURL=SidechatColorList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidechatColorList.d.ts","sourceRoot":"","sources":["../../src/classes/SidechatColorList.js"],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;GAIG;AAEH
|
|
1
|
+
{"version":3,"file":"SidechatColorList.d.ts","sourceRoot":"","sources":["../../src/classes/SidechatColorList.js"],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;GAIG;AAEH;;;GAGG;AACH;IACE;;;QA6DE;CACH"}
|
package/dist/index.cjs
CHANGED
|
@@ -25,6 +25,7 @@ class SidechatAPIClient {
|
|
|
25
25
|
* @type {SidechatAuthToken}
|
|
26
26
|
* */
|
|
27
27
|
userToken;
|
|
28
|
+
|
|
28
29
|
/**
|
|
29
30
|
* Default headers for every API request
|
|
30
31
|
* @type {Object}
|
|
@@ -38,14 +39,25 @@ class SidechatAPIClient {
|
|
|
38
39
|
Dnt: 1,
|
|
39
40
|
};
|
|
40
41
|
|
|
42
|
+
/**
|
|
43
|
+
* Root URL for every API request
|
|
44
|
+
* @type {String}
|
|
45
|
+
* @default "https://api.sidechat.lol"
|
|
46
|
+
*/
|
|
47
|
+
apiRoot = "https://api.sidechat.lol";
|
|
48
|
+
|
|
41
49
|
/**
|
|
42
50
|
* Create a new instance of the API client
|
|
43
51
|
* @param {SidechatAuthToken} [token] - user bearer token
|
|
52
|
+
* @param {String} rootUrl - custom API root URL for mocking or using other server
|
|
44
53
|
*/
|
|
45
|
-
constructor(token = "") {
|
|
54
|
+
constructor(token = "", rootUrl = "") {
|
|
46
55
|
if (token) {
|
|
47
56
|
this.userToken = token;
|
|
48
57
|
}
|
|
58
|
+
if (rootUrl) {
|
|
59
|
+
this.apiRoot = rootUrl;
|
|
60
|
+
}
|
|
49
61
|
}
|
|
50
62
|
|
|
51
63
|
/**
|
|
@@ -57,6 +69,16 @@ class SidechatAPIClient {
|
|
|
57
69
|
this.userToken = token;
|
|
58
70
|
};
|
|
59
71
|
|
|
72
|
+
/**
|
|
73
|
+
* Manually set the root URL for all API requests. This can be used for mocking requests or redirecting them to a different server
|
|
74
|
+
* @method
|
|
75
|
+
* @param {String} url - new root URL to set
|
|
76
|
+
* @since 2.3.9
|
|
77
|
+
*/
|
|
78
|
+
setAPIRoot = (url) => {
|
|
79
|
+
this.apiRoot = url;
|
|
80
|
+
};
|
|
81
|
+
|
|
60
82
|
/**
|
|
61
83
|
* Initiate the login process with a phone number. Should be followed up with verifySMSCode().
|
|
62
84
|
* @method
|
|
@@ -65,7 +87,7 @@ class SidechatAPIClient {
|
|
|
65
87
|
*/
|
|
66
88
|
loginViaSMS = async (phoneNumber) => {
|
|
67
89
|
try {
|
|
68
|
-
const res = await fetch(
|
|
90
|
+
const res = await fetch(`${this.apiRoot}/v1/login_register`, {
|
|
69
91
|
method: "POST",
|
|
70
92
|
headers: this.defaultHeaders,
|
|
71
93
|
body: JSON.stringify({
|
|
@@ -90,17 +112,14 @@ class SidechatAPIClient {
|
|
|
90
112
|
*/
|
|
91
113
|
verifySMSCode = async (phoneNumber, code) => {
|
|
92
114
|
try {
|
|
93
|
-
const res = await fetch(
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}),
|
|
102
|
-
}
|
|
103
|
-
);
|
|
115
|
+
const res = await fetch(`${this.apiRoot}/v1/verify_phone_number`, {
|
|
116
|
+
method: "POST",
|
|
117
|
+
headers: this.defaultHeaders,
|
|
118
|
+
body: JSON.stringify({
|
|
119
|
+
phone_number: `+1${phoneNumber}`,
|
|
120
|
+
code: code.toUpperCase(),
|
|
121
|
+
}),
|
|
122
|
+
});
|
|
104
123
|
const json = await res.json();
|
|
105
124
|
if (json?.logged_in_user?.token) {
|
|
106
125
|
this.userToken = json.logged_in_user.token;
|
|
@@ -124,17 +143,14 @@ class SidechatAPIClient {
|
|
|
124
143
|
throw new SidechatAPIError("You're too young to use Offsides.");
|
|
125
144
|
}
|
|
126
145
|
try {
|
|
127
|
-
const res = await fetch(
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}),
|
|
136
|
-
}
|
|
137
|
-
);
|
|
146
|
+
const res = await fetch(`${this.apiRoot}/v1/complete_registration`, {
|
|
147
|
+
method: "POST",
|
|
148
|
+
headers: this.defaultHeaders,
|
|
149
|
+
body: JSON.stringify({
|
|
150
|
+
age: Number(age),
|
|
151
|
+
registration_id: registrationID,
|
|
152
|
+
}),
|
|
153
|
+
});
|
|
138
154
|
const json = await res.json();
|
|
139
155
|
if (json.token) {
|
|
140
156
|
this.userToken = json.token;
|
|
@@ -158,19 +174,16 @@ class SidechatAPIClient {
|
|
|
158
174
|
throw new SidechatAPIError("User is not authenticated.");
|
|
159
175
|
}
|
|
160
176
|
try {
|
|
161
|
-
const res = await fetch(
|
|
162
|
-
|
|
163
|
-
{
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
}),
|
|
172
|
-
}
|
|
173
|
-
);
|
|
177
|
+
const res = await fetch(`${this.apiRoot}/v2/users/register_email`, {
|
|
178
|
+
method: "POST",
|
|
179
|
+
headers: {
|
|
180
|
+
...this.defaultHeaders,
|
|
181
|
+
Authorization: `Bearer ${this.userToken}`,
|
|
182
|
+
},
|
|
183
|
+
body: JSON.stringify({
|
|
184
|
+
email: email,
|
|
185
|
+
}),
|
|
186
|
+
});
|
|
174
187
|
const json = await res.json();
|
|
175
188
|
if (json.message) {
|
|
176
189
|
throw new SidechatAPIError(json.message);
|
|
@@ -192,16 +205,13 @@ class SidechatAPIClient {
|
|
|
192
205
|
throw new SidechatAPIError("User is not authenticated.");
|
|
193
206
|
}
|
|
194
207
|
try {
|
|
195
|
-
const res = await fetch(
|
|
196
|
-
|
|
197
|
-
{
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
},
|
|
203
|
-
}
|
|
204
|
-
);
|
|
208
|
+
const res = await fetch(`${this.apiRoot}/v1/users/check_email_verified`, {
|
|
209
|
+
method: "GET",
|
|
210
|
+
headers: {
|
|
211
|
+
...this.defaultHeaders,
|
|
212
|
+
Authorization: `Bearer ${this.userToken}`,
|
|
213
|
+
},
|
|
214
|
+
});
|
|
205
215
|
const json = await res.json();
|
|
206
216
|
if (json.verified_email_updates_response) {
|
|
207
217
|
return json.verified_email_updates_response;
|
|
@@ -225,21 +235,18 @@ class SidechatAPIClient {
|
|
|
225
235
|
throw new SidechatAPIError("User is not authenticated.");
|
|
226
236
|
}
|
|
227
237
|
try {
|
|
228
|
-
const res = await fetch(
|
|
229
|
-
|
|
230
|
-
{
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
}),
|
|
241
|
-
}
|
|
242
|
-
);
|
|
238
|
+
const res = await fetch(`${this.apiRoot}/v1/register_device_token`, {
|
|
239
|
+
method: "POST",
|
|
240
|
+
headers: {
|
|
241
|
+
...this.defaultHeaders,
|
|
242
|
+
Authorization: `Bearer ${this.userToken}`,
|
|
243
|
+
},
|
|
244
|
+
body: JSON.stringify({
|
|
245
|
+
build_type: "release",
|
|
246
|
+
bundle_id: "com.flowerave.sidechat",
|
|
247
|
+
device_token: deviceID,
|
|
248
|
+
}),
|
|
249
|
+
});
|
|
243
250
|
const json = await res.json();
|
|
244
251
|
await AsyncStorage.setItem("deviceID", deviceID);
|
|
245
252
|
return json;
|
|
@@ -273,7 +280,7 @@ class SidechatAPIClient {
|
|
|
273
280
|
}
|
|
274
281
|
try {
|
|
275
282
|
const res = await fetch(
|
|
276
|
-
|
|
283
|
+
`${this.apiRoot}/v1/updates?group_id=${groupID}`,
|
|
277
284
|
{
|
|
278
285
|
method: "GET",
|
|
279
286
|
headers: {
|
|
@@ -305,7 +312,7 @@ class SidechatAPIClient {
|
|
|
305
312
|
}
|
|
306
313
|
try {
|
|
307
314
|
const res = await fetch(
|
|
308
|
-
|
|
315
|
+
`${this.apiRoot}/v1/posts?group_id=${groupID}&type=${category}${
|
|
309
316
|
cursor ? "&cursor=" + cursor : ""
|
|
310
317
|
}`,
|
|
311
318
|
{
|
|
@@ -336,7 +343,7 @@ class SidechatAPIClient {
|
|
|
336
343
|
throw new SidechatAPIError("User is not authenticated.");
|
|
337
344
|
}
|
|
338
345
|
try {
|
|
339
|
-
const res = await fetch(
|
|
346
|
+
const res = await fetch(`${this.apiRoot}/v1/posts/set_vote`, {
|
|
340
347
|
method: "POST",
|
|
341
348
|
headers: {
|
|
342
349
|
...this.defaultHeaders,
|
|
@@ -369,7 +376,7 @@ class SidechatAPIClient {
|
|
|
369
376
|
}
|
|
370
377
|
try {
|
|
371
378
|
const res = await fetch(
|
|
372
|
-
|
|
379
|
+
`${this.apiRoot}/v1/posts/get?include_deleted=${includeDeleted}&post_id=${postID}`,
|
|
373
380
|
{
|
|
374
381
|
method: "GET",
|
|
375
382
|
headers: {
|
|
@@ -403,16 +410,13 @@ class SidechatAPIClient {
|
|
|
403
410
|
contentType = "my_comments";
|
|
404
411
|
}
|
|
405
412
|
try {
|
|
406
|
-
const res = await fetch(
|
|
407
|
-
|
|
408
|
-
{
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
},
|
|
414
|
-
}
|
|
415
|
-
);
|
|
413
|
+
const res = await fetch(`${this.apiRoot}/v1/posts&type=${contentType}`, {
|
|
414
|
+
method: "GET",
|
|
415
|
+
headers: {
|
|
416
|
+
...this.defaultHeaders,
|
|
417
|
+
Authorization: `Bearer ${this.userToken}`,
|
|
418
|
+
},
|
|
419
|
+
});
|
|
416
420
|
const json = await res.json();
|
|
417
421
|
return json.posts;
|
|
418
422
|
} catch (err) {
|
|
@@ -434,7 +438,7 @@ class SidechatAPIClient {
|
|
|
434
438
|
}
|
|
435
439
|
try {
|
|
436
440
|
const res = await fetch(
|
|
437
|
-
|
|
441
|
+
`${this.apiRoot}/v1/posts/comments/?post_id=${postID}`,
|
|
438
442
|
{
|
|
439
443
|
method: "GET",
|
|
440
444
|
headers: {
|
|
@@ -509,7 +513,7 @@ class SidechatAPIClient {
|
|
|
509
513
|
throw new SidechatAPIError("User is not authenticated.");
|
|
510
514
|
}
|
|
511
515
|
try {
|
|
512
|
-
const res = await fetch(
|
|
516
|
+
const res = await fetch(`${this.apiRoot}/v1/groups/explore`, {
|
|
513
517
|
method: "GET",
|
|
514
518
|
headers: {
|
|
515
519
|
...this.defaultHeaders,
|
|
@@ -536,7 +540,7 @@ class SidechatAPIClient {
|
|
|
536
540
|
throw new SidechatAPIError("User is not authenticated.");
|
|
537
541
|
}
|
|
538
542
|
try {
|
|
539
|
-
const res = await fetch(
|
|
543
|
+
const res = await fetch(`${this.apiRoot}/v1/assets/library`, {
|
|
540
544
|
method: "GET",
|
|
541
545
|
headers: {
|
|
542
546
|
...this.defaultHeaders,
|
|
@@ -562,7 +566,7 @@ class SidechatAPIClient {
|
|
|
562
566
|
throw new SidechatAPIError("User is not authenticated.");
|
|
563
567
|
}
|
|
564
568
|
try {
|
|
565
|
-
const res = await fetch(
|
|
569
|
+
const res = await fetch(`${this.apiRoot}/v1/users/me`, {
|
|
566
570
|
method: "GET",
|
|
567
571
|
headers: {
|
|
568
572
|
...this.defaultHeaders,
|
|
@@ -589,7 +593,7 @@ class SidechatAPIClient {
|
|
|
589
593
|
throw new SidechatAPIError("User is not authenticated.");
|
|
590
594
|
}
|
|
591
595
|
try {
|
|
592
|
-
const res = await fetch(
|
|
596
|
+
const res = await fetch(`${this.apiRoot}/v1/groups/${groupID}`, {
|
|
593
597
|
method: "GET",
|
|
594
598
|
headers: {
|
|
595
599
|
...this.defaultHeaders,
|
|
@@ -604,6 +608,39 @@ class SidechatAPIClient {
|
|
|
604
608
|
}
|
|
605
609
|
};
|
|
606
610
|
|
|
611
|
+
/**
|
|
612
|
+
* Joins or leaves a group
|
|
613
|
+
* @method
|
|
614
|
+
* @param {String} groupID - alphanumeric ID of group to join or leave
|
|
615
|
+
* @param {Boolean} isMember - whether or not the user should be a member of the group
|
|
616
|
+
* @since 2.3.8
|
|
617
|
+
*/
|
|
618
|
+
setGroupMembership = async (groupID, isMember) => {
|
|
619
|
+
if (!this.userToken) {
|
|
620
|
+
throw new SidechatAPIError("User is not authenticated.");
|
|
621
|
+
}
|
|
622
|
+
try {
|
|
623
|
+
const res = await fetch(
|
|
624
|
+
`${this.apiRoot}/v1/groups/${isMember ? "join" : "leave"}`,
|
|
625
|
+
{
|
|
626
|
+
method: "POST",
|
|
627
|
+
headers: {
|
|
628
|
+
...this.defaultHeaders,
|
|
629
|
+
Authorization: `Bearer ${this.userToken}`,
|
|
630
|
+
},
|
|
631
|
+
body: JSON.stringify({
|
|
632
|
+
group_id: groupID,
|
|
633
|
+
}),
|
|
634
|
+
}
|
|
635
|
+
);
|
|
636
|
+
const json = await res.json();
|
|
637
|
+
return await json;
|
|
638
|
+
} catch (err) {
|
|
639
|
+
console.error(err);
|
|
640
|
+
throw new SidechatAPIError(`Failed to modify group membership.`);
|
|
641
|
+
}
|
|
642
|
+
};
|
|
643
|
+
|
|
607
644
|
/**
|
|
608
645
|
* Creates a comment on a post
|
|
609
646
|
* @method
|
|
@@ -628,7 +665,7 @@ class SidechatAPIClient {
|
|
|
628
665
|
throw new SidechatAPIError("User is not authenticated.");
|
|
629
666
|
}
|
|
630
667
|
try {
|
|
631
|
-
const res = await fetch(
|
|
668
|
+
const res = await fetch(`${this.apiRoot}/v1/posts`, {
|
|
632
669
|
method: "POST",
|
|
633
670
|
headers: {
|
|
634
671
|
...this.defaultHeaders,
|
|
@@ -676,7 +713,7 @@ class SidechatAPIClient {
|
|
|
676
713
|
throw new SidechatAPIError("User is not authenticated.");
|
|
677
714
|
}
|
|
678
715
|
try {
|
|
679
|
-
const res = await fetch(
|
|
716
|
+
const res = await fetch(`${this.apiRoot}/v1/posts`, {
|
|
680
717
|
method: "POST",
|
|
681
718
|
headers: {
|
|
682
719
|
...this.defaultHeaders,
|
|
@@ -712,7 +749,7 @@ class SidechatAPIClient {
|
|
|
712
749
|
throw new SidechatAPIError("User is not authenticated.");
|
|
713
750
|
}
|
|
714
751
|
try {
|
|
715
|
-
const res = await fetch(
|
|
752
|
+
const res = await fetch(`${this.apiRoot}/v1/posts/delete`, {
|
|
716
753
|
method: "POST",
|
|
717
754
|
headers: {
|
|
718
755
|
...this.defaultHeaders,
|
|
@@ -744,7 +781,7 @@ class SidechatAPIClient {
|
|
|
744
781
|
throw new SidechatAPIError("User is not authenticated.");
|
|
745
782
|
}
|
|
746
783
|
try {
|
|
747
|
-
const res = await fetch(
|
|
784
|
+
const res = await fetch(`${this.apiRoot}/v1/users/${userID}`, {
|
|
748
785
|
method: "PATCH",
|
|
749
786
|
headers: {
|
|
750
787
|
...this.defaultHeaders,
|
|
@@ -781,7 +818,7 @@ class SidechatAPIClient {
|
|
|
781
818
|
}
|
|
782
819
|
try {
|
|
783
820
|
const res = await fetch(
|
|
784
|
-
|
|
821
|
+
`${this.apiRoot}/v1/users/username?username=${username}`,
|
|
785
822
|
{
|
|
786
823
|
method: "GET",
|
|
787
824
|
headers: {
|
|
@@ -813,7 +850,7 @@ class SidechatAPIClient {
|
|
|
813
850
|
throw new SidechatAPIError("User is not authenticated.");
|
|
814
851
|
}
|
|
815
852
|
try {
|
|
816
|
-
const res = await fetch(
|
|
853
|
+
const res = await fetch(`${this.apiRoot}/v1/users/${userID}`, {
|
|
817
854
|
method: "PATCH",
|
|
818
855
|
headers: {
|
|
819
856
|
...this.defaultHeaders,
|
|
@@ -842,7 +879,7 @@ class SidechatAPIClient {
|
|
|
842
879
|
throw new SidechatAPIError("User is not authenticated.");
|
|
843
880
|
}
|
|
844
881
|
try {
|
|
845
|
-
const res = await fetch(
|
|
882
|
+
const res = await fetch(`${this.apiRoot}/v1/activity/seen`, {
|
|
846
883
|
method: "POST",
|
|
847
884
|
headers: {
|
|
848
885
|
...this.defaultHeaders,
|
|
@@ -870,7 +907,7 @@ class SidechatAPIClient {
|
|
|
870
907
|
throw new SidechatAPIError("User is not authenticated.");
|
|
871
908
|
}
|
|
872
909
|
try {
|
|
873
|
-
const res = await fetch(
|
|
910
|
+
const res = await fetch(`${this.apiRoot}/v1/chats/explore`, {
|
|
874
911
|
method: "GET",
|
|
875
912
|
headers: {
|
|
876
913
|
...this.defaultHeaders,
|
|
@@ -901,7 +938,7 @@ class SidechatAPIClient {
|
|
|
901
938
|
throw new SidechatAPIError("User is not authenticated.");
|
|
902
939
|
}
|
|
903
940
|
try {
|
|
904
|
-
const res = await fetch(
|
|
941
|
+
const res = await fetch(`${this.apiRoot}/v1/chats/groups/join`, {
|
|
905
942
|
method: "GET",
|
|
906
943
|
headers: {
|
|
907
944
|
...this.defaultHeaders,
|
|
@@ -934,11 +971,10 @@ class SidechatAPIClient {
|
|
|
934
971
|
|
|
935
972
|
/**
|
|
936
973
|
* List of colors compatible with user conversation icons
|
|
937
|
-
* @
|
|
938
|
-
* @type {{ colors: SidechatColor[] }}
|
|
974
|
+
* @prop {SidechatColor[]} colors - list of color themes for user icons
|
|
939
975
|
*/
|
|
940
|
-
|
|
941
|
-
colors
|
|
976
|
+
class SidechatColorList {
|
|
977
|
+
colors = [
|
|
942
978
|
{
|
|
943
979
|
primary: "#74DEEE",
|
|
944
980
|
secondary: "#239EAB",
|
|
@@ -999,8 +1035,8 @@ const SidechatColorList = {
|
|
|
999
1035
|
primary: "#0968E5",
|
|
1000
1036
|
secondary: "#091970",
|
|
1001
1037
|
},
|
|
1002
|
-
]
|
|
1003
|
-
}
|
|
1038
|
+
];
|
|
1039
|
+
}
|
|
1004
1040
|
|
|
1005
1041
|
exports.SidechatAPIClient = SidechatAPIClient;
|
|
1006
1042
|
exports.SidechatAPIError = SidechatAPIError;
|