diff --git a/.gitignore b/.gitignore
index 708d4472..e1a8ea33 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,4 @@
sandbox
.env
node_modules
-docs/vitepress/cache
\ No newline at end of file
+docs/.vitepress/cache
\ No newline at end of file
diff --git a/README.md b/README.md
index 18e23351..4893047b 120000
--- a/README.md
+++ b/README.md
@@ -1 +1 @@
-packages/linejs/README.md
\ No newline at end of file
+packages/linejs/README.md
diff --git a/deno.json b/deno.json
index cf831740..6134d6cd 100644
--- a/deno.json
+++ b/deno.json
@@ -4,7 +4,8 @@
"singleQuote": false,
"useTabs": true,
"exclude": [
- "./docs/"
+ "./docs/docs/",
+ "./docs/ja/"
]
},
"imports": {
diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts
index b2959072..5529ef8b 100644
--- a/docs/.vitepress/config.mts
+++ b/docs/.vitepress/config.mts
@@ -9,42 +9,128 @@ export default defineConfig({
sitemap: {
hostname: "https://linejs.evex.land",
},
+ locales: {
+ root: {
+ label: "English",
+ lang: "en",
+ link: "/",
+ themeConfig: {
+ nav: [
+ { text: "Home", link: "/" },
+ { text: "Docs", link: "/docs/start" },
+ {
+ text: "Examples",
+ link: "https://github.com/evex-dev/linejs/tree/main/examples",
+ },
+ ],
+ },
+ },
+ ja: {
+ label: "日本語",
+ lang: "ja",
+ link: "/ja",
+ themeConfig: {
+ nav: [
+ { text: "ホーム", link: "/ja/" },
+ { text: "ドキュメント", link: "/ja/docs/start" },
+ {
+ text: "サンプル",
+ link: "https://github.com/evex-dev/linejs/tree/main/examples",
+ },
+ ],
+ docFooter: {
+ prev: "前のページ",
+ next: "次のページ",
+ },
+ darkModeSwitchLabel: "切り替え",
+ darkModeSwitchTitle: "ダークモードにする",
+ lightModeSwitchTitle: "ライトモードにする",
+ sidebarMenuLabel: "メニュー",
+ langMenuLabel: "言語を選択",
+ outlineTitle: "ページ内",
+ returnToTopLabel: "トップに戻る",
+ skipToContentLabel: "コンテンツをスキップ",
+ },
+ },
+ },
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
siteTitle: "LINEJS Docs",
search: {
provider: "local",
- },
-
- nav: [
- { text: "Home", link: "/" },
- { text: "Docs", link: "/docs/start" },
- {
- text: "Examples",
- link: "https://github.com/evex-dev/linejs/tree/main/examples",
+ options: {
+ locales: {
+ ja: {
+ translations: {
+ button: {
+ buttonText: "検索",
+ buttonAriaLabel: "検索",
+ },
+ modal: {
+ displayDetails: "詳細を表示",
+ resetButtonTitle: "検索をリセット",
+ backButtonTitle: "検索を閉じる",
+ noResultsText: "結果が見つかりません",
+ footer: {
+ selectText: "決定",
+ selectKeyAriaLabel: "入力",
+ navigateText: "移動",
+ navigateUpKeyAriaLabel: "上矢印",
+ navigateDownKeyAriaLabel: "下矢印",
+ closeText: "閉じる",
+ closeKeyAriaLabel: "esc",
+ },
+ },
+ },
+ },
+ },
},
- ],
-
- sidebar: [
- {
- text: "Docs",
- items: [
- { text: "Getting Started", link: "/docs/start" },
- { text: "Next Steps", link: "/docs/start-2" },
- { text: "Message Event", link: "/docs/message-event" },
- { text: "Client Options", link: "/docs/client-options" },
- // { text: "Utils", link: "/docs/utils" },
- { text: "Client Methods", link: "/docs/methods" },
- ],
- },
- {
- text: "Guides",
- items: [
- { text: "Authors", link: "/docs/authors" },
- { text: "Question", link: "/docs/question" },
- ],
- },
- ],
+ },
+ sidebar: {
+ "/docs/": [
+ {
+ text: "Docs",
+ items: [
+ { text: "Getting Started", link: "/docs/start" },
+ { text: "Next Steps", link: "/docs/start-2" },
+ { text: "Message Event", link: "/docs/message-event" },
+ { text: "Client Options", link: "/docs/client-options" },
+ // { text: "Utils", link: "/docs/utils" },
+ { text: "Client Methods", link: "/docs/methods" },
+ ],
+ },
+ {
+ text: "Guides",
+ items: [
+ { text: "Authors", link: "/docs/authors" },
+ { text: "Question", link: "/docs/question" },
+ ],
+ },
+ ],
+ "/ja/docs/": [
+ {
+ text: "ドキュメント",
+ items: [
+ { text: "はじめに", link: "/ja/docs/start" },
+ { text: "次のステップ", link: "/ja/docs/start-2" },
+ { text: "メッセージイベント", link: "/ja/docs/message-event" },
+ {
+ text: "クライアントのオプション",
+ link: "/ja/docs/client-options",
+ },
+ // { text: "ユーティリティ", link: "/ja/docs/utils" },
+ { text: "メソッド", link: "/ja/docs/methods" },
+ ],
+ },
+ {
+ text: "ガイド",
+ items: [
+ { text: "作成者", link: "/ja/docs/authors" },
+ { text: "お問い合わせ", link: "/ja/docs/question" },
+ ],
+ },
+ ],
+ },
editLink: {
pattern: "https://github.com/evex-dev/linejs/edit/main/docs/:path",
diff --git a/docs/.vitepress/theme/style.css b/docs/.vitepress/theme/style.css
index e9b8b383..a6adad35 100644
--- a/docs/.vitepress/theme/style.css
+++ b/docs/.vitepress/theme/style.css
@@ -8,7 +8,7 @@
*
* Each colors have exact same color scale system with 3 levels of solid
* colors with different brightness, and 1 soft color.
- *
+ *
* - `XXX-1`: The most solid color used mainly for colored text. It must
* satisfy the contrast ratio against when used on top of `XXX-soft`.
*
@@ -43,31 +43,31 @@
* in custom container, badges, etc.
* -------------------------------------------------------------------------- */
- :root {
- --vp-c-default-1: var(--vp-c-gray-1);
- --vp-c-default-2: var(--vp-c-gray-2);
- --vp-c-default-3: var(--vp-c-gray-3);
- --vp-c-default-soft: var(--vp-c-gray-soft);
-
- --vp-c-brand-1: var(--vp-c-indigo-1);
- --vp-c-brand-2: var(--vp-c-indigo-2);
- --vp-c-brand-3: var(--vp-c-indigo-3);
- --vp-c-brand-soft: var(--vp-c-indigo-soft);
-
- --vp-c-tip-1: var(--vp-c-brand-1);
- --vp-c-tip-2: var(--vp-c-brand-2);
- --vp-c-tip-3: var(--vp-c-brand-3);
- --vp-c-tip-soft: var(--vp-c-brand-soft);
-
- --vp-c-warning-1: var(--vp-c-yellow-1);
- --vp-c-warning-2: var(--vp-c-yellow-2);
- --vp-c-warning-3: var(--vp-c-yellow-3);
- --vp-c-warning-soft: var(--vp-c-yellow-soft);
-
- --vp-c-danger-1: var(--vp-c-red-1);
- --vp-c-danger-2: var(--vp-c-red-2);
- --vp-c-danger-3: var(--vp-c-red-3);
- --vp-c-danger-soft: var(--vp-c-red-soft);
+:root {
+ --vp-c-default-1: var(--vp-c-gray-1);
+ --vp-c-default-2: var(--vp-c-gray-2);
+ --vp-c-default-3: var(--vp-c-gray-3);
+ --vp-c-default-soft: var(--vp-c-gray-soft);
+
+ --vp-c-brand-1: var(--vp-c-indigo-1);
+ --vp-c-brand-2: var(--vp-c-indigo-2);
+ --vp-c-brand-3: var(--vp-c-indigo-3);
+ --vp-c-brand-soft: var(--vp-c-indigo-soft);
+
+ --vp-c-tip-1: var(--vp-c-brand-1);
+ --vp-c-tip-2: var(--vp-c-brand-2);
+ --vp-c-tip-3: var(--vp-c-brand-3);
+ --vp-c-tip-soft: var(--vp-c-brand-soft);
+
+ --vp-c-warning-1: var(--vp-c-yellow-1);
+ --vp-c-warning-2: var(--vp-c-yellow-2);
+ --vp-c-warning-3: var(--vp-c-yellow-3);
+ --vp-c-warning-soft: var(--vp-c-yellow-soft);
+
+ --vp-c-danger-1: var(--vp-c-red-1);
+ --vp-c-danger-2: var(--vp-c-red-2);
+ --vp-c-danger-3: var(--vp-c-red-3);
+ --vp-c-danger-soft: var(--vp-c-red-soft);
}
/**
@@ -75,15 +75,15 @@
* -------------------------------------------------------------------------- */
:root {
- --vp-button-brand-border: transparent;
- --vp-button-brand-text: var(--vp-c-white);
- --vp-button-brand-bg: #006200;
- --vp-button-brand-hover-border: transparent;
- --vp-button-brand-hover-text: var(--vp-c-white);
- --vp-button-brand-hover-bg: #076907;
- --vp-button-brand-active-border: transparent;
- --vp-button-brand-active-text: var(--vp-c-white);
- --vp-button-brand-active-bg: #479947;
+ --vp-button-brand-border: transparent;
+ --vp-button-brand-text: var(--vp-c-white);
+ --vp-button-brand-bg: #006200;
+ --vp-button-brand-hover-border: transparent;
+ --vp-button-brand-hover-text: var(--vp-c-white);
+ --vp-button-brand-hover-bg: #076907;
+ --vp-button-brand-active-border: transparent;
+ --vp-button-brand-active-text: var(--vp-c-white);
+ --vp-button-brand-active-bg: #479947;
}
/**
@@ -91,31 +91,31 @@
* -------------------------------------------------------------------------- */
:root {
- --vp-home-hero-name-color: transparent;
- --vp-home-hero-name-background: -webkit-linear-gradient(
- 120deg,
- #41d1ff 30%,
- #00B900
- );
-
- --vp-home-hero-image-background-image: linear-gradient(
- -45deg,
- #ffB9ff 50%,
- #69dbff 50%
- );
- --vp-home-hero-image-filter: blur(45px);
+ --vp-home-hero-name-color: transparent;
+ --vp-home-hero-name-background: -webkit-linear-gradient(
+ 120deg,
+ #41d1ff 30%,
+ #00b900
+ );
+
+ --vp-home-hero-image-background-image: linear-gradient(
+ -45deg,
+ #ffb9ff 50%,
+ #69dbff 50%
+ );
+ --vp-home-hero-image-filter: blur(45px);
}
@media (min-width: 640px) {
- :root {
- --vp-home-hero-image-filter: blur(56px);
- }
+ :root {
+ --vp-home-hero-image-filter: blur(56px);
+ }
}
@media (min-width: 960px) {
- :root {
- --vp-home-hero-image-filter: blur(68px);
- }
+ :root {
+ --vp-home-hero-image-filter: blur(68px);
+ }
}
/**
@@ -123,10 +123,10 @@
* -------------------------------------------------------------------------- */
:root {
- --vp-custom-block-tip-border: transparent;
- --vp-custom-block-tip-text: var(--vp-c-text-1);
- --vp-custom-block-tip-bg: var(--vp-c-brand-soft);
- --vp-custom-block-tip-code-bg: var(--vp-c-brand-soft);
+ --vp-custom-block-tip-border: transparent;
+ --vp-custom-block-tip-text: var(--vp-c-text-1);
+ --vp-custom-block-tip-bg: var(--vp-c-brand-soft);
+ --vp-custom-block-tip-code-bg: var(--vp-c-brand-soft);
}
/**
@@ -134,6 +134,5 @@
* -------------------------------------------------------------------------- */
.DocSearch {
- --docsearch-primary-color: var(--vp-c-brand-1) !important;
+ --docsearch-primary-color: var(--vp-c-brand-1) !important;
}
-
diff --git a/docs/docs/message-event.md b/docs/docs/message-event.md
index 14c91832..25acf5b0 100644
--- a/docs/docs/message-event.md
+++ b/docs/docs/message-event.md
@@ -3,8 +3,10 @@
The next step is to finally receive the message.\
The atmosphere is becoming more and more like a bot!
-:::warning Note, however, that to receive the group's message, the decrypt key
-in `FileStorage` or so on, as described in [Start 2](/docs/start-2). :::
+:::warning
+however, that to receive the group's message, the decrypt key
+in `FileStorage` or so on, as described in [Start 2](/docs/start-2).
+:::
First, let's create a bot that only receives “!ping” and returns “pong!”.
@@ -45,7 +47,7 @@ client.on("message", (message) => {
const text = message.text;
if (text === "!ping") {
- ...
+ ...
}
});
```
@@ -101,5 +103,7 @@ There are many more features!
Stay tuned for our next journey.
-:::tip If you encounter problems, please refer to [Question](/docs/question),
-not only here. :::
+:::tip
+If you encounter problems, please refer to [Question](/docs/question),
+not only here.
+:::
diff --git a/docs/docs/start-2.md b/docs/docs/start-2.md
index 98c993ac..698392df 100644
--- a/docs/docs/start-2.md
+++ b/docs/docs/start-2.md
@@ -105,11 +105,13 @@ This concludes our first trip.\
But there is still a journey left to be made.\
Enjoy.
-:::tip\
+:::tip
If you want to create your own storage such as connecting to the cloud api,\
import `BaseStorage` and extend it to create your own storage. (Please ask for
-details.) :::
+details.)
+:::
-:::info\
+:::info
If you want to use v1, please ask for details at
-[discord.gg/evex](https://discord.gg/evex). :::
+[discord.gg/evex](https://discord.gg/evex).
+:::
diff --git a/docs/docs/start.md b/docs/docs/start.md
index 410398b9..086f2696 100644
--- a/docs/docs/start.md
+++ b/docs/docs/start.md
@@ -46,4 +46,5 @@ console.log(chats[0].name)
This library is still in its infancy!\
If you find any bugs or missing parts, please let us know on our
-server! (Roles will be given to those who suggest bugs and features!)
+server! \
+(Roles will be given to those who suggest bugs and features!)
diff --git a/docs/docs/utils.md b/docs/docs/utils.md
index fc92fb62..d4ab2226 100644
--- a/docs/docs/utils.md
+++ b/docs/docs/utils.md
@@ -1,13 +1,13 @@
# Utils of LINEJS
-LINEJS is not only a self-bot.
-From building internal URIs to building OBS, open chat search, regex for picking emid, ticket, and more.
-I will explain one by one.
+LINEJS is not only a self-bot. \
+From building internal URIs to building OBS, open chat search, regex for picking emid, ticket, and more.
+I will explain one by one.
## LINE_OBS
-Utils to retrieve images and videos from obs hash.
-You can retrieve them as follows
+Utils to retrieve images and videos from obs hash.
+You can retrieve them as follows
```ts
import { LINE_OBS } from "@evex/linejs/utils";
diff --git a/docs/index.md b/docs/index.md
index 97951405..92e7f351 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -1,7 +1,6 @@
---
# https://vitepress.dev/reference/default-theme-home-page
layout: home
-
hero:
image: /favicon.png
name: "LINEJS Documentation"
@@ -12,8 +11,7 @@ hero:
link: /docs/start
- theme: alt
text: Examples
- link: https://github.com/evex-dev/linejs
-
+ link: https://github.com/evex-dev/linejs/tree/main/examples
features:
- title: Works on All Platforms
icon: 🌎
@@ -24,4 +22,4 @@ features:
- title: Safety Locked
icon: 🔒
details: Defaults to safety locked (RateLimit and others).
----
\ No newline at end of file
+---
diff --git a/docs/ja/docs/auth.md b/docs/ja/docs/auth.md
new file mode 100644
index 00000000..5232a186
--- /dev/null
+++ b/docs/ja/docs/auth.md
@@ -0,0 +1,49 @@
+# 認証
+
+いくつかの方法で認証を受けることができます。
+
+## Login
+
+LINEJSには2つのログイン方法があります。
+
+### `loginWithPassword`
+
+メアドとパスワードが必要です。
+
+例:
+```ts
+import { loginWithPassword } from "@evex/linejs";
+
+const client = loginWithPassword({
+ email: 'you@example.com', // メアド
+ password: 'password', // パスワード
+ onPincodeRequest(pincode) {
+ console.log('Enter this pincode to your LINE app:', pincode)
+ }
+})
+```
+
+
+`onPincodeRequest`はPinを受け取ることができます。\
+初回ログイン時、スマホ版のLINEでPinを入力し、e2eeを有効にする必要があります。
+
+### `loginWithQR`
+
+メアドとパスワードは必要ありません。
+
+```ts
+import { loginWithQR } from '@evex/linejs'
+
+const client = loginWithQR({
+ onReceiveQRURL(url) {
+ console.log('Access to this URL:', url)
+ }
+})
+```
+
+この関数はスマホ版LINEで読み込む為のURLを表示します。\
+LINEJSではQRコードの作成をサポートしていないため、画像として表示したい場合は自分で作成する必要があります。
+
+## With authToken
+
+短時間に何度もログインを試みるとアカウントがBANされる可能性があるため、認証にはauthTokenを使用することをおすすめします。
diff --git a/docs/ja/docs/authors.md b/docs/ja/docs/authors.md
new file mode 100644
index 00000000..3eae2c95
--- /dev/null
+++ b/docs/ja/docs/authors.md
@@ -0,0 +1,13 @@
+# Authors
+
+**LINEJS**の開発者たち
+
+## Maintainers
+
+- Owner & Developer [Piloking](https://github.com/piloking)
+- Developer [EdamAme-x](https://github.com/EdamAme-x)
+
+## Sub-maintainers
+
+- Developer [MocA-Love](https://github.com/MocA-Love)
+- Developer [Hafusun](https://github.com/hafusun)
diff --git a/docs/ja/docs/client-options.md b/docs/ja/docs/client-options.md
new file mode 100644
index 00000000..e856f01b
--- /dev/null
+++ b/docs/ja/docs/client-options.md
@@ -0,0 +1,64 @@
+# クライアントオプション
+
+次に、クライアントのオプションについて説明します。
+
+```ts
+const client = new Client({
+ device: "...",
+ ...
+});
+```
+
+オプションは数種類あり、**storage for the data**や**OBS Endpoint**、通信用の**Endpoint**、CORSやプロキシのための**customFetch**、レート制限のための**RateLimitter**などがあります。
+
+これらを一つずつ説明します。
+
+## Storage
+
+復号キーやキャッシュなどの内部処理のためのストレージです。\
+デフォルトでは`MemoryStorage`が使用され、プログラム停止時は最初からログインする必要があります。
+
+`FileStorage`を使用することもできます:
+
+```ts
+import { FileStorage } from "@evex/linejs/storage";
+
+const client = new Client({
+ device: "IOSIPAD",
+ storage: new FileStorage("./storage.json"), // ストレージファイルへのパス(秘密ファイル)
+});
+```
+
+クラウドやデータストレージAPIを使用してストレージに保存したい場合は、`BaseStorage`を拡張して自分の好みに作成できます。
+
+## Endpoint
+
+通常、変更する必要はありませんが、通信のエンドポイントです。
+
+プロキシサーバーを試したい場合:
+
+```ts
+const client = new Client({
+ endpoint: "legy-jp.line-apps.com",
+});
+```
+
+## Custom Fetch
+
+CORS回避やプロキシのためのものです。fetchを置き換える関数を定義します:
+
+```ts
+...
+
+const client = new Client({
+ fetch: async (url, options) => {
+ return await fetch(url, {
+ ...options,
+ ...proxyAgent
+ });
+ }
+});
+```
+
+オプションの説明は以上です!\
+次のセクションでは、さまざまなメソッドを紹介します。
diff --git a/docs/ja/docs/message-event.md b/docs/ja/docs/message-event.md
new file mode 100644
index 00000000..95747a81
--- /dev/null
+++ b/docs/ja/docs/message-event.md
@@ -0,0 +1,108 @@
+# メッセージイベントの受信
+
+次のステップは、メッセージを受信してみましょう。\
+ますますボットらしくなってきましたね!
+
+:::warning
+グループのメッセージを受信するには、`FileStorage`などにある復号キーが必要です。\
+詳細は[こちら](/ja/docs/start-2)を参照してください。
+:::
+
+「!ping」を受信し「pong!」と返すだけのボットを作成してみましょう。
+
+## Chat
+
+まずは、メッセージを受信してみましょう。
+
+```ts
+client.on("message", (message) => {
+ ...
+});
+
+await client.login({...})
+client.polling(["square","talk"])
+```
+
+メッセージを受信し、表示してみます。
+
+```ts
+client.on("message", (message) => {
+ const text = message.text;
+
+ console.log(text);
+});
+```
+
+コンソールに送信されたメッセージが表示されるはずです!
+
+```console
+Hello MaguRo
+I love you! :D
+```
+
+次に、メッセージが「!ping」かどうかを確認しましょう。
+
+```ts
+client.on("message", (message) => {
+ const text = message.text;
+
+ if (text === "!ping") {
+ ...
+ }
+});
+```
+
+完璧ですね!今度はリプライをさせてみましょう。
+
+リプライをするには`messageId`と`relatedMessageId`を使用しますが、もっと便利な方法があります。
+
+```ts
+client.on("message", (message) => {
+ const text = message.text;
+
+ if (text === "!ping") {
+ message.reply("pong!");
+ }
+});
+```
+
+美しいシンプルなコードの完成です!\
+非同期関数で囲むことで、さらに美しくすることが可能です。
+
+```ts
+client.on("message", async (message) => {
+ const text = message.text;
+
+ if (text === "!ping") {
+ await message.reply("pong!");
+ }
+});
+```
+
+これで完了です!\
+他にも`send`や`reaction`などのメソッドがあります。\
+他の章でこれらのメソッドについて説明します。
+
+## Square
+
+さて、Square(オープンチャット)ではどうすればいいのでしょうか?\
+基本的には同じことです。
+
+```ts
+client.on("square:message", async (message) => {
+ const text = message.text;
+
+ if (text === "!ping") {
+ await message.reply("pong!");
+ }
+});
+```
+
+これだけで基本的なBOTを作成できます。\
+他にもたくさんの機能があります!
+
+次の体験をお楽しみに。
+
+:::tip
+問題が発生した場合は、[お問い合わせ](/ja/docs/question)を参照してください。
+:::
diff --git a/docs/ja/docs/methods.md b/docs/ja/docs/methods.md
new file mode 100644
index 00000000..cd33de15
--- /dev/null
+++ b/docs/ja/docs/methods.md
@@ -0,0 +1,33 @@
+# メソッド
+
+## Talk Method
+
+TalkServiceのすべての関数は`client.talk`にあります。
+
+例:
+
+```js
+await client.talk.sendMessage({
+ to: "u...",
+ text: "Hello, LINEJS!",
+ e2ee: true,
+});
+```
+
+上記はテキストメッセージをe2eeで暗号化してユーザーに送信する例です。
+
+## Square Method
+
+SquareServiceのすべての関数は`client.square`にあります。
+
+例:
+
+```js
+await client.square.findSquareByInvitationTicket({
+ request: {
+ invitationTicket: "INVITATION_TICKET",
+ },
+});
+```
+
+上記は招待コードからスクエアを取得する例です。
diff --git a/docs/ja/docs/question.md b/docs/ja/docs/question.md
new file mode 100644
index 00000000..8d824001
--- /dev/null
+++ b/docs/ja/docs/question.md
@@ -0,0 +1,5 @@
+# お問い合わせ
+
+私たちのサーバーで気軽に質問してください!
+
+[https://discord.gg/evex](https://discord.gg/evex)
diff --git a/docs/ja/docs/start-2.md b/docs/ja/docs/start-2.md
new file mode 100644
index 00000000..3a90903f
--- /dev/null
+++ b/docs/ja/docs/start-2.md
@@ -0,0 +1,118 @@
+# クライアントメソッドの使い方
+
+次のように呼び出すだけです。簡単です。
+
+```ts
+import { Client } from "@evex/linejs";
+
+const client = new Client({ device: "IOSIPAD" });
+
+client.on("pincall", (pincode) => {
+ console.log(`pincode: ${pincode}`);
+});
+
+client.on("ready", async (user) => {
+ console.log(`Logged in as ${user.displayName} (${user.mid});`);
+
+ console.log(await client.getProfile());
+});
+
+await client.login({
+ email: "YOUR_EMAIL",
+ password: "YOUR_PASSWORD",
+});
+
+// もしくはQRコードを使用してログインできます。
+await client.login({
+ qr: true,
+});
+```
+
+出力:
+
+```console
+{
+ mid: "u**********",
+ phone: "***********",
+ regionCode: "JP",
+ ...
+}
+```
+
+メアドでのログインを繰り返すと、不正ログインと見なされる可能性があり、\
+アカウントが一時的にBANされることがあります(数日間だけですが...)
+
+なので**AuthToken**を使用するのが良いログイン方法です。
+
+メアドログインでは、期限が切れると停止する一時的なトークンが使用されます。\
+長期間動作させたい場合は、v1トークンを使用する必要があります。
+
+開発時はv2トークンを使用するのが良いでしょう。\
+繰り返しにはなりますが、メアドログインを何度も繰り返すことは強くおすすめしていません。
+
+それでは、トークンを取得する方法を見てみましょう。
+
+次のように書くだけです。
+
+```ts
+client.on("update:authtoken", (authtoken) => {
+ console.log("AuthToken", authtoken);
+});
+```
+
+出力:
+
+```console
+AuthToken **********.********
+```
+
+上記はv2トークンです。次のように使用できます。
+
+```ts
+await client.login({
+ authToken: "YOUR_AUTH_TOKEN",
+});
+```
+
+## 注意点
+
+このログイン方法には落とし穴があります。LINEは_e2ee_を使用して暗号化していますが、\
+これを解読するキーはPin付きのメアドログインまたはQRログインでしか取得できません。
+
+したがって、authTokenだけでログインすると、グループトークイベントを取得できません。\
+(Square(オープンチャット)は可能です。)
+
+解決策は簡単です。
+
+内部ストレージを使って、最初の一回だけメアドでログインすれば良いのです。
+
+LINEJSには内部ストレージがあり、キャッシュを保存します。\
+デフォルトでは`MemoryStorage`で、一度の実行後にすべて消えます。
+
+次のように`FileStorage`にすることもできます。
+
+```ts
+import { FileStorage } from "@evex/linejs/storage";
+
+const client = new Client({
+ device: "IOSIPAD",
+ storage: new FileStorage("./storage.json"), // ストレージファイルへのパス(秘密ファイル)
+});
+```
+
+最初の一回だけメールでログインし、その後はauthTokenを使用すれば良いのです。
+
+
+
+::: tip
+クラウドAPIに接続するなど、自分のストレージを作成したい場合は、
+`BaseStorage`をインポートし、それを拡張して自分のストレージを作成してください。(詳細はお問い合わせください。)
+:::
+
+:::info
+v1トークンを使用したい場合は、
+[discord.gg/evex](https://discord.gg/evex)で詳細をお問い合わせください。
+:::
+
+これで最初の体験は終わりです。まだ続きます!\
+お楽しみに!
\ No newline at end of file
diff --git a/docs/ja/docs/start.md b/docs/ja/docs/start.md
new file mode 100644
index 00000000..19295497
--- /dev/null
+++ b/docs/ja/docs/start.md
@@ -0,0 +1,48 @@
+# はじめに
+
+
+まずは、LINEJSライブラリを選んでくれてありがとうございます!
+
+## インストール
+
+LINEJSはJSRに公開されています。npmではありません。npm、yarn、pnpm、Bun、DenoでLINEJSをインストールできます。
+```bash
+npx jsr add @evex/linejs # npmを使う場合
+bunx --bun jsr add @evex/linejs # Bunを使う場合
+deno add @evex/linejs # Denoを使う場合
+```
+
+完了後、ライブラリが利用可能になります。
+
+## 使い方
+
+自分のプロフィールを取得するだけのスクリプトを作成してみましょう。
+
+クライアントの作成には`loginWithPassword`を使用します。
+```ts
+import { loginWithPassword } from "@evex/linejs";
+
+const client = loginWithPassword({
+ email: 'you@example.com', // メアド
+ password: 'password', // パスワード
+ onPincodeRequest(pincode) {
+ console.log('Enter this pincode to your LINE app:', pincode)
+ }
+})
+```
+
+複雑なプロセスなので認証については[こちら](./auth.md)を読んでください。
+
+クライアント作成後は、様々な機能を使うことが可能になります。
+
+例えば、参加しているチャットの情報を取得する例:
+```ts
+const chats = await client.fetchChats()
+console.log(chats[0].name)
+```
+
+---
+
+このライブラリはまだ初期段階です!\
+バグや不足している部分を見つけた場合は、Discordサーバーでお知らせください!\
+(バグや機能を提案してくれた方にはロールが付与されるかもしれません)
\ No newline at end of file
diff --git a/docs/ja/docs/utils.md b/docs/ja/docs/utils.md
new file mode 100644
index 00000000..2f7b2824
--- /dev/null
+++ b/docs/ja/docs/utils.md
@@ -0,0 +1,84 @@
+# ユーティリティ
+
+LINEJSは単なるself-bot用ライブラリではありません。\
+内部URIの構築からOBSの構築やオープンチャット検索、emid、チケットを取得するための正規表現など、多岐にわたります。
+順番に説明していきます。
+
+## LINE_OBS
+
+obsハッシュから画像や動画を取得するためのもの。
+以下のように取得できます。\
+すべてのメソッドは[こちら](https://github.com/evex-dev/linejs/blob/main/packages/linejs/utils/obs/index.ts)
+
+```ts
+import { LINE_OBS } from "@evex/linejs/utils";
+
+const OBS = new LINE_OBS(); // endpoint is optional
+
+const OBS_IMAGE_URI = OBS.getURI("0hy28TkoGoJh0FLTatCdtZSjt7ezN-Xj8PeFUrfHAvey8pHDUcMEppKXR-eisuFGJObRhheCh6KngqGzY"); // obs hash
+
+const OBS_PROFILE_IAMGE_URI = OBS.getProfileImage("u**********"); // メンバーID (mid)
+
+const OBS_SQUARE_PROFILE_IAMGE_URI = OBS.getSquareMemberImage("p**********"); // squareメンバーID (pid)
+
+// その他メソッド
+```
+
+
+
+## LINE_SCHEME
+
+LINEのスキームURIを構築するためのもの。\
+すべてのメソッドは[こちら](https://github.com/evex-dev/linejs/blob/main/packages/linejs/utils/scheme/index.ts)
+
+```ts
+import { LINE_SCHEME } from "@evex/linejs/utils";
+
+const SCHEME = new LINE_SCHEME();
+
+const SCHEME_HOME_URI = SCHEME.getHome();
+
+const SCHEME_PROFILE_POPUP_URI = SCHEME.getProfilePopup("u**********");
+
+// その他メソッド
+```
+
+
+
+## LINE_REGEX
+
+URLからチケットやemidを抽出するためのもの。\
+すべてのメソッドは[こちら](https://github.com/evex-dev/linejs/blob/main/packages/linejs/utils/regex/index.ts)
+
+```ts
+import { LINE_REGEX } from "@evex/linejs/utils";
+
+const REGEX = new LINE_REGEX();
+
+console.log(REGEX.getTicket("Square Invitation https://line.me/ti/g2/*************")); // *************
+
+console.log(REGEX.getEmid(".../emid=*************")); // *************
+```
+
+
+
+## LINE_FUNCTIONS
+
+LINEに関連する外部APIに接続するためのもの。\
+すべてのメソッドは[こちら](https://github.com/evex-dev/linejs/blob/main/packages/linejs/utils/functions/index.ts)
+
+```ts
+import Utils from '@evex/linejs/utils';
+
+const squareList = await Utils.LINE_FUNCTIONS.searchSquare("Developer", 100);
+
+if (squareList.error === null) {
+ const squareInfo = await Utils.LINE_FUNCTIONS.getSquare(squareList.data.squares[0].square.emid, false, {
+ "x-line-channeltoken": "..."
+ });
+
+ console.log(squareInfo);
+}
+```
+
+次のセクションでは、他のさまざまなメソッドを紹介します。
diff --git a/docs/ja/index.md b/docs/ja/index.md
new file mode 100644
index 00000000..4638b213
--- /dev/null
+++ b/docs/ja/index.md
@@ -0,0 +1,27 @@
+---
+# https://vitepress.dev/reference/default-theme-home-page
+layout: home
+
+hero:
+ image: /favicon.png
+ name: "LINEJS \nドキュメント"
+ tagline: LINEJSはLINE SelfBotのための画期的なJSライブラリ
+ actions:
+ - theme: brand
+ text: ドキュメントを見る
+ link: /ja/docs/start
+ - theme: alt
+ text: 例を見る
+ link: https://github.com/evex-dev/linejs/tree/main/examples
+
+features:
+ - title: 様々なプラットフォームで動作
+ icon: 🌎
+ details: Node.js、Deno、Bunなど
+ - title: 強固な型付け
+ icon: 🧩
+ details: TypeScriptをサポート
+ - title: セーフティロック
+ icon: 🔒
+ details: デフォルトでレートリミットなどを実装
+---
diff --git a/packages/linejs/base/core/mod.ts b/packages/linejs/base/core/mod.ts
index 7e8c1e96..6cb2a4e5 100644
--- a/packages/linejs/base/core/mod.ts
+++ b/packages/linejs/base/core/mod.ts
@@ -121,16 +121,16 @@ export class BaseClient extends TypedEventEmitter {
readonly endpoint: string;
/**
* Initializes a new instance of the class.
- *
+ *
* @param init - The initialization parameters.
* @param init.device - The device type.
* @param init.version - The version of the device.
* @param init.fetch - Optional custom fetch function.
* @param init.endpoint - Optional endpoint URL.
* @param init.storage - Optional storage mechanism.
- *
+ *
* @throws {Error} If the device is unsupported.
- *
+ *
* @example
* ```typescript
* const client = new Client({
diff --git a/packages/linejs/base/obs/mod.ts b/packages/linejs/base/obs/mod.ts
index 2b7bbc1a..708e7167 100644
--- a/packages/linejs/base/obs/mod.ts
+++ b/packages/linejs/base/obs/mod.ts
@@ -343,8 +343,7 @@ export class LineObs {
.uploadObjectForService({
data: edata,
oType: "file",
- obsPath:
- `${serviceName}/${obsNamespace}/${tempId}__ud-preview`,
+ obsPath: `${serviceName}/${obsNamespace}/${tempId}__ud-preview`,
params,
});
if (objId !== objId2) {
diff --git a/packages/linejs/base/polling/mod.ts b/packages/linejs/base/polling/mod.ts
index e7b712bb..c6a2b67b 100644
--- a/packages/linejs/base/polling/mod.ts
+++ b/packages/linejs/base/polling/mod.ts
@@ -26,12 +26,12 @@ export class Polling {
/**
* Listens to square events and yields them as they are received.
- *
+ *
* @param options - Configuration options for listening to square events.
* @param options.signal - An AbortSignal to cancel the polling.
* @param options.onError - A callback function to handle errors.
* @param options.pollingInterval - The interval in milliseconds between polling requests. Defaults to 1000ms.
- *
+ *
* @yields {SquareEvent} - The events received from the square.
*/
async *listenSquareEvents(options: {
@@ -70,14 +70,14 @@ export class Polling {
/**
* Listens for talk events by polling the server at a specified interval.
- *
+ *
* @param {Object} [options] - Configuration options for the polling.
* @param {AbortSignal} [options.signal] - An AbortSignal to cancel the polling.
* @param {(error: unknown) => void} [options.onError] - A callback function to handle errors.
* @param {number} [options.pollingInterval=1000] - The interval in milliseconds between each poll.
- *
+ *
* @yields {Operation} - Yields each operation event received from the server.
- *
+ *
* @returns {AsyncGenerator} - An async generator that yields operation events.
*/
async *listenTalkEvents(options: {
diff --git a/packages/linejs/base/service/liff/mod.ts b/packages/linejs/base/service/liff/mod.ts
index facb14d7..6697d2bb 100644
--- a/packages/linejs/base/service/liff/mod.ts
+++ b/packages/linejs/base/service/liff/mod.ts
@@ -20,8 +20,7 @@ export class LiffService implements BaseService {
protocolType: ProtocolKey = 4;
errorName = "LiffServiceError";
liffId = "2006747340-AoraPvdD";
- csrfRegExp =
- //;
+ csrfRegExp = //;
client: BaseClient;
@@ -150,9 +149,7 @@ export class LiffService implements BaseService {
}
throw new InternalError(
this.errorName,
- `Failed to get LiffToken: ${liffId}${
- chatMid ? "@" + chatMid : ""
- }`,
+ `Failed to get LiffToken: ${liffId}${chatMid ? "@" + chatMid : ""}`,
);
}
}
@@ -278,9 +275,7 @@ export class LiffService implements BaseService {
allPermission.map((e) => "allPermission=" + e)
.join("&")
}&${
- approvedPermission.map((e) =>
- "approvedPermission=" + e
- ).join("&")
+ approvedPermission.map((e) => "approvedPermission=" + e).join("&")
}&__WLS=&channelId=2006747340&__csrf=${csrfToken}&allow=true`,
headers,
},
diff --git a/packages/linejs/base/thrift/readwrite/struct.ts b/packages/linejs/base/thrift/readwrite/struct.ts
index 43aa9b6a..cd2b6ba0 100644
--- a/packages/linejs/base/thrift/readwrite/struct.ts
+++ b/packages/linejs/base/thrift/readwrite/struct.ts
@@ -1,6365 +1,8907 @@
+import * as LINETypes from "@evex/linejs-types";
+import { type NestedArray } from "../mod.ts";
+function map(
+ call: ((v: any) => NestedArray) | ((v: any) => number),
+ value: any,
+): Record {
+ const tMap: Record = {};
+ for (const key in value) {
+ const e = value[key];
+ tMap[key] = call(e);
+ }
+ return tMap;
+}
+type PartialDeep = {
+ [P in keyof T]?: T[P] extends Array ? Array>
+ : T[P] extends ReadonlyArray ? ReadonlyArray>
+ : PartialDeep;
+};
- import * as LINETypes from "@evex/linejs-types"
- import {
- type NestedArray,
- } from "../mod.ts";
- function map(call: ((v:any)=>NestedArray) | ((v:any)=>number), value:any):Record{
- const tMap: Record = {}
- for (const key in value) {
- const e = value[key];
- tMap[key] = call(e);
- }
- return tMap
- }
- type PartialDeep = {
- [P in keyof T]?: T[P] extends Array ? Array>
- : T[P] extends ReadonlyArray ? ReadonlyArray>
- : PartialDeep;
- };
-
- export function AcceptChatInvitationByTicketRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [8, 1, param.reqSeq],
- [11, 2, param.chatMid],
- [11, 3, param.ticketId]
- ]
- }
- export function AcceptChatInvitationRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [8, 1, param.reqSeq],
- [11, 2, param.chatMid]
- ]
- }
- export function AcceptSpeakersRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid],
- [11, 2, param.sessionId],
- [14, 3, [11, param.targetMids]]
- ]
- }
- export function AcceptToChangeRoleRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid],
- [11, 2, param.sessionId],
- [11, 3, param.inviteRequestId]
- ]
- }
- export function AcceptToListenRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid],
- [11, 2, param.sessionId],
- [11, 3, param.inviteRequestId]
- ]
- }
- export function AcceptToSpeakRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid],
- [11, 2, param.sessionId],
- [11, 3, param.inviteRequestId]
- ]
- }
- export function LiveTalkType(param: LINETypes.LiveTalkType | undefined): LINETypes.LiveTalkType&number | undefined {
- return typeof param === "string" ? LINETypes.enums.LiveTalkType[param] : param
- }
- export function LiveTalkSpeakerSetting(param: LINETypes.LiveTalkSpeakerSetting | undefined): LINETypes.LiveTalkSpeakerSetting&number | undefined {
- return typeof param === "string" ? LINETypes.enums.LiveTalkSpeakerSetting[param] : param
- }
- export function AcquireLiveTalkRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid],
- [11, 2, param.title],
- [8, 3, LiveTalkType(param.type)],
- [8, 4, LiveTalkSpeakerSetting(param.speakerSetting)]
- ]
- }
- export function CancelToSpeakRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid],
- [11, 2, param.sessionId]
- ]
- }
- export function FetchLiveTalkEventsRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid],
- [11, 2, param.sessionId],
- [11, 3, param.syncToken],
- [8, 4, param.limit]
- ]
- }
- export function FindLiveTalkByInvitationTicketRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.invitationTicket]
- ]
- }
- export function ForceEndLiveTalkRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid],
- [11, 2, param.sessionId]
- ]
- }
- export function GetLiveTalkInfoForNonMemberRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid],
- [11, 2, param.sessionId],
- [15, 3, [11, param.speakers]]
- ]
- }
- export function GetLiveTalkInvitationUrlRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid],
- [11, 2, param.sessionId]
- ]
- }
- export function GetLiveTalkSpeakersForNonMemberRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid],
- [11, 2, param.sessionId],
- [15, 3, [11, param.speakers]]
- ]
- }
- export function GetSquareInfoByChatMidRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid]
- ]
- }
- export function LiveTalkRole(param: LINETypes.LiveTalkRole | undefined): LINETypes.LiveTalkRole&number | undefined {
- return typeof param === "string" ? LINETypes.enums.LiveTalkRole[param] : param
- }
- export function InviteToChangeRoleRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid],
- [11, 2, param.sessionId],
- [11, 3, param.targetMid],
- [8, 4, LiveTalkRole(param.targetRole)]
- ]
- }
- export function InviteToListenRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid],
- [11, 2, param.sessionId],
- [11, 3, param.targetMid]
- ]
- }
- export function InviteToLiveTalkRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid],
- [11, 2, param.sessionId],
- [15, 3, [11, param.invitees]]
- ]
- }
- export function InviteToSpeakRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid],
- [11, 2, param.sessionId],
- [11, 3, param.targetMid]
- ]
- }
- export function BooleanState(param: LINETypes.BooleanState | undefined): LINETypes.BooleanState&number | undefined {
- return typeof param === "string" ? LINETypes.enums.BooleanState[param] : param
- }
- export function JoinLiveTalkRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid],
- [11, 2, param.sessionId],
- [2, 3, param.wantToSpeak],
- [8, 4, BooleanState(param.claimAdult)]
- ]
- }
- export function LiveTalkParticipant(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.mid]
- ]
- }
- export function AllNonMemberLiveTalkParticipants(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function LiveTalkKickOutTarget(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [12, 1, LiveTalkParticipant(param.liveTalkParticipant)],
- [12, 2, AllNonMemberLiveTalkParticipants(param.allNonMemberLiveTalkParticipants)]
- ]
- }
- export function KickOutLiveTalkParticipantsRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid],
- [11, 2, param.sessionId],
- [12, 3, LiveTalkKickOutTarget(param.target)]
- ]
- }
- export function RejectSpeakersRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid],
- [11, 2, param.sessionId],
- [14, 3, [11, param.targetMids]]
- ]
- }
- export function RejectToSpeakRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid],
- [11, 2, param.sessionId],
- [11, 3, param.inviteRequestId]
- ]
- }
- export function RemoveLiveTalkSubscriptionRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid],
- [11, 2, param.sessionId]
- ]
- }
- export function LiveTalkReportType(param: LINETypes.LiveTalkReportType | undefined): LINETypes.LiveTalkReportType&number | undefined {
- return typeof param === "string" ? LINETypes.enums.LiveTalkReportType[param] : param
- }
- export function ReportLiveTalkRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid],
- [11, 2, param.sessionId],
- [8, 3, LiveTalkReportType(param.reportType)]
- ]
- }
- export function ReportLiveTalkSpeakerRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid],
- [11, 2, param.sessionId],
- [11, 3, param.speakerMemberMid],
- [8, 4, LiveTalkReportType(param.reportType)]
- ]
- }
- export function RequestToListenRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid],
- [11, 2, param.sessionId]
- ]
- }
- export function RequestToSpeakRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid],
- [11, 2, param.sessionId]
- ]
- }
- export function LiveTalkAttribute(param: LINETypes.LiveTalkAttribute | undefined): LINETypes.LiveTalkAttribute&number | undefined {
- return typeof param === "string" ? LINETypes.enums.LiveTalkAttribute[param] : param
- }
- export function LiveTalk(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid],
- [11, 2, param.sessionId],
- [11, 3, param.title],
- [8, 4, LiveTalkType(param.type)],
- [8, 5, LiveTalkSpeakerSetting(param.speakerSetting)],
- [2, 6, param.allowRequestToSpeak],
- [11, 7, param.hostMemberMid],
- [11, 8, param.announcement],
- [8, 9, param.participantCount],
- [10, 10, param.revision],
- [10, 11, param.startedAt]
- ]
- }
- export function UpdateLiveTalkAttrsRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [14, 1, [8, param.updatedAttrs&&(param.updatedAttrs).map(e=>LiveTalkAttribute(e))]],
- [12, 2, LiveTalk(param.liveTalk)]
- ]
- }
- export function Pb1_D4(param: LINETypes.Pb1_D4 | undefined): LINETypes.Pb1_D4&number | undefined {
- return typeof param === "string" ? LINETypes.enums.Pb1_D4[param] : param
- }
- export function Pb1_EnumC13222w4(param: LINETypes.Pb1_EnumC13222w4 | undefined): LINETypes.Pb1_EnumC13222w4&number | undefined {
- return typeof param === "string" ? LINETypes.enums.Pb1_EnumC13222w4[param] : param
- }
- export function Pb1_EnumC13237x5(param: LINETypes.Pb1_EnumC13237x5 | undefined): LINETypes.Pb1_EnumC13237x5&number | undefined {
- return typeof param === "string" ? LINETypes.enums.Pb1_EnumC13237x5[param] : param
- }
- export function AcquireOACallRouteRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.searchId],
- [13, 2, [11, 11, param.fromEnvInfo]],
- [11, 3, param.otp]
- ]
- }
- export function PaidCallType(param: LINETypes.PaidCallType | undefined): LINETypes.PaidCallType&number | undefined {
- return typeof param === "string" ? LINETypes.enums.PaidCallType[param] : param
- }
- export function og_EnumC32661b(param: LINETypes.og_EnumC32661b | undefined): LINETypes.og_EnumC32661b&number | undefined {
- return typeof param === "string" ? LINETypes.enums.og_EnumC32661b[param] : param
- }
- export function ActivateSubscriptionRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.uniqueKey],
- [8, 2, og_EnumC32661b(param.activeStatus)]
- ]
- }
- export function AdTypeOptOutClickEventRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.moduleAdId],
- [11, 2, param.targetId]
- ]
- }
- export function AddMetaInvalid(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.hint]
- ]
- }
- export function AddMetaByPhone(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.phone]
- ]
- }
- export function AddMetaBySearchId(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.searchId]
- ]
- }
- export function AddMetaByUserTicket(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.ticket]
- ]
- }
- export function AddMetaGroupMemberList(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.chatMid]
- ]
- }
- export function LN0_P(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function LN0_L(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function LN0_G(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function LN0_C11282h(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function LN0_C11300q(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function LN0_C11307u(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function AddMetaShareContact(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.messageId],
- [11, 2, param.chatMid],
- [11, 3, param.senderMid]
- ]
- }
- export function AddMetaStrangerMessage(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.messageId],
- [11, 2, param.chatMid]
- ]
- }
- export function AddMetaStrangerCall(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.messageId]
- ]
- }
- export function AddMetaMentionInChat(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.chatMid],
- [11, 2, param.messageId]
- ]
- }
- export function LN0_O(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function LN0_Q(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function LN0_C11313x(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function LN0_A(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function AddMetaGroupVideoCall(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.chatMid]
- ]
- }
- export function LN0_r(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function LN0_C11315y(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function LN0_C11316z(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function LN0_B(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function LN0_C11280g(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function LN0_T(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function LN0_C11276e(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function LN0_S(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function AddMetaProfileUndefined(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.hint]
- ]
- }
- export function LN0_F(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function LN0_C11294n(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function LN0_C11290l(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function LN0_C11309v(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function LN0_C11292m(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function AddMetaChatNote(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.chatMid]
- ]
- }
- export function AddMetaChatNoteMenu(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.chatMid]
- ]
- }
- export function LN0_U(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function LN0_E(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function AddMetaSearchIdInUnifiedSearch(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.searchId]
- ]
- }
- export function LN0_D(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function LN0_C11278f(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function LN0_H(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function LN0_C11274d(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [12, 1, AddMetaInvalid(param.invalid)],
- [12, 2, AddMetaByPhone(param.byPhone)],
- [12, 3, AddMetaBySearchId(param.bySearchId)],
- [12, 4, AddMetaByUserTicket(param.byUserTicket)],
- [12, 5, AddMetaGroupMemberList(param.groupMemberList)],
- [12, 6, LN0_P(param.timelineCPF)],
- [12, 7, LN0_L(param.smartChannelCPF)],
- [12, 8, LN0_G(param.openchatCPF)],
- [12, 9, LN0_C11282h(param.beaconBanner)],
- [12, 10, LN0_C11300q(param.friendRecommendation)],
- [12, 11, LN0_C11307u(param.homeRecommendation)],
- [12, 12, AddMetaShareContact(param.shareContact)],
- [12, 13, AddMetaStrangerMessage(param.strangerMessage)],
- [12, 14, AddMetaStrangerCall(param.strangerCall)],
- [12, 15, AddMetaMentionInChat(param.mentionInChat)],
- [12, 16, LN0_O(param.timeline)],
- [12, 17, LN0_Q(param.unifiedSearch)],
- [12, 18, LN0_C11313x(param.lineLab)],
- [12, 19, LN0_A(param.lineToCall)],
- [12, 20, AddMetaGroupVideoCall(param.groupVideo)],
- [12, 21, LN0_r(param.friendRequest)],
- [12, 22, LN0_C11315y(param.liveViewer)],
- [12, 23, LN0_C11316z(param.lineThings)],
- [12, 24, LN0_B(param.mediaCapture)],
- [12, 25, LN0_C11280g(param.avatarOASetting)],
- [12, 26, LN0_T(param.urlScheme)],
- [12, 27, LN0_C11276e(param.addressBook)],
- [12, 28, LN0_S(param.unifiedSearchOATab)],
- [12, 29, AddMetaProfileUndefined(param.profileUndefined)],
- [12, 30, LN0_F(param.DEPRECATED_oaChatHeader)],
- [12, 31, LN0_C11294n(param.chatMenu)],
- [12, 32, LN0_C11290l(param.chatHeader)],
- [12, 33, LN0_C11309v(param.homeTabCPF)],
- [12, 34, LN0_C11292m(param.chatList)],
- [12, 35, AddMetaChatNote(param.chatNote)],
- [12, 36, AddMetaChatNoteMenu(param.chatNoteMenu)],
- [12, 37, LN0_U(param.walletTabCPF)],
- [12, 38, LN0_E(param.oaCall)],
- [12, 39, AddMetaSearchIdInUnifiedSearch(param.searchIdInUnifiedSearch)],
- [12, 40, LN0_D(param.newsDigestADCPF)],
- [12, 41, LN0_C11278f(param.albumCPF)],
- [12, 42, LN0_H(param.premiumAgreement)]
- ]
- }
- export function AddFriendTracking(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.reference],
- [12, 2, LN0_C11274d(param.trackingMeta)]
- ]
- }
- export function AddFriendByMidRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [8, 1, param.reqSeq],
- [11, 2, param.userMid],
- [12, 3, AddFriendTracking(param.tracking)]
- ]
- }
- export function Ob1_O0(param: LINETypes.Ob1_O0 | undefined): LINETypes.Ob1_O0&number | undefined {
- return typeof param === "string" ? LINETypes.enums.Ob1_O0[param] : param
- }
- export function AddItemToCollectionRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.collectionId],
- [8, 2, Ob1_O0(param.productType)],
- [11, 3, param.productId],
- [11, 4, param.itemId]
- ]
- }
- export function NZ0_C12155c(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function AddProductToSubscriptionSlotRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [8, 1, Ob1_O0(param.productType)],
- [11, 2, param.productId],
- [11, 3, param.oldProductId],
-
- ]
- }
- export function AddThemeToSubscriptionSlotRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.productId],
- [11, 2, param.currentlyAppliedProductId],
-
- ]
- }
- export function Pb1_A4(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.mid],
- [11, 2, param.eMid]
- ]
- }
- export function AddToFollowBlacklistRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [12, 1, Pb1_A4(param.followMid)]
- ]
- }
- export function TermsAgreement(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function AgreeToTermsRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- ,
- [12, 2, TermsAgreement(param.termsAgreement)]
- ]
- }
- export function ApproveSquareMembersRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.squareMid],
- [15, 3, [11, param.requestedMemberMids]]
- ]
- }
- export function CheckJoinCodeRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.squareMid],
- [11, 3, param.joinCode]
- ]
- }
- export function TextMessageAnnouncementContents(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.messageId],
- [11, 2, param.text],
- [11, 3, param.senderSquareMemberMid],
- [10, 4, param.createdAt]
- ]
- }
- export function SquareChatAnnouncementContents(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [12, 1, TextMessageAnnouncementContents(param.textMessageAnnouncementContents)]
- ]
- }
- export function SquareChatAnnouncement(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [10, 1, param.announcementSeq],
- [8, 2, param.type],
- [12, 3, SquareChatAnnouncementContents(param.contents)],
- [10, 4, param.createdAt],
- [11, 5, param.creator]
- ]
- }
- export function CreateSquareChatAnnouncementRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [8, 1, param.reqSeq],
- [11, 2, param.squareChatMid],
- [12, 3, SquareChatAnnouncement(param.squareChatAnnouncement)]
- ]
- }
- export function SquareChatType(param: LINETypes.SquareChatType | undefined): LINETypes.SquareChatType&number | undefined {
- return typeof param === "string" ? LINETypes.enums.SquareChatType[param] : param
- }
- export function SquareChatState(param: LINETypes.SquareChatState | undefined): LINETypes.SquareChatState&number | undefined {
- return typeof param === "string" ? LINETypes.enums.SquareChatState[param] : param
- }
- export function MessageVisibility(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [2, 1, param.showJoinMessage],
- [2, 2, param.showLeaveMessage],
- [2, 3, param.showKickoutMessage]
- ]
- }
- export function SquareChat(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid],
- [11, 2, param.squareMid],
- [8, 3, SquareChatType(param.type)],
- [11, 4, param.name],
- [11, 5, param.chatImageObsHash],
- [10, 6, param.squareChatRevision],
- [8, 7, param.maxMemberCount],
- [8, 8, SquareChatState(param.state)],
- [11, 9, param.invitationUrl],
- [12, 10, MessageVisibility(param.messageVisibility)],
- [8, 11, BooleanState(param.ableToSearchMessage)]
- ]
- }
- export function CreateSquareChatRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [8, 1, param.reqSeq],
- [12, 2, SquareChat(param.squareChat)],
- [15, 3, [11, param.squareMemberMids]]
- ]
- }
- export function SquareType(param: LINETypes.SquareType | undefined): LINETypes.SquareType&number | undefined {
- return typeof param === "string" ? LINETypes.enums.SquareType[param] : param
- }
- export function SquareState(param: LINETypes.SquareState | undefined): LINETypes.SquareState&number | undefined {
- return typeof param === "string" ? LINETypes.enums.SquareState[param] : param
- }
- export function SquareEmblem(param: LINETypes.SquareEmblem | undefined): LINETypes.SquareEmblem&number | undefined {
- return typeof param === "string" ? LINETypes.enums.SquareEmblem[param] : param
- }
- export function SquareJoinMethodType(param: LINETypes.SquareJoinMethodType | undefined): LINETypes.SquareJoinMethodType&number | undefined {
- return typeof param === "string" ? LINETypes.enums.SquareJoinMethodType[param] : param
- }
- export function ApprovalValue(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.message]
- ]
- }
- export function CodeValue(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.code]
- ]
- }
- export function SquareJoinMethodValue(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [12, 1, ApprovalValue(param.approvalValue)],
- [12, 2, CodeValue(param.codeValue)]
- ]
- }
- export function SquareJoinMethod(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [8, 1, SquareJoinMethodType(param.type)],
- [12, 2, SquareJoinMethodValue(param.value)]
- ]
- }
- export function Square(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.mid],
- [11, 2, param.name],
- [11, 3, param.welcomeMessage],
- [11, 4, param.profileImageObsHash],
- [11, 5, param.desc],
- [2, 6, param.searchable],
- [8, 7, SquareType(param.type)],
- [8, 8, param.categoryId],
- [11, 9, param.invitationURL],
- [10, 10, param.revision],
- [2, 11, param.ableToUseInvitationTicket],
- [8, 12, SquareState(param.state)],
- [15, 13, [8, param.emblems&&(param.emblems).map(e=>SquareEmblem(e))]],
- [12, 14, SquareJoinMethod(param.joinMethod)],
- [8, 15, BooleanState(param.adultOnly)],
- [15, 16, [11, param.svcTags]],
- [10, 17, param.createdAt]
- ]
- }
- export function SquareMembershipState(param: LINETypes.SquareMembershipState | undefined): LINETypes.SquareMembershipState&number | undefined {
- return typeof param === "string" ? LINETypes.enums.SquareMembershipState[param] : param
- }
- export function SquareMemberRole(param: LINETypes.SquareMemberRole | undefined): LINETypes.SquareMemberRole&number | undefined {
- return typeof param === "string" ? LINETypes.enums.SquareMemberRole[param] : param
- }
- export function SquarePreference(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [10, 1, param.favoriteTimestamp],
- [2, 2, param.notiForNewJoinRequest]
- ]
- }
- export function SquareMember(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareMemberMid],
- [11, 2, param.squareMid],
- [11, 3, param.displayName],
- [11, 4, param.profileImageObsHash],
- [2, 5, param.ableToReceiveMessage],
- [8, 7, SquareMembershipState(param.membershipState)],
- [8, 8, SquareMemberRole(param.role)],
- [10, 9, param.revision],
- [12, 10, SquarePreference(param.preference)],
- [11, 11, param.joinMessage],
- [10, 12, param.createdAt]
- ]
- }
- export function CreateSquareRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [8, 1, param.reqSeq],
- [12, 2, Square(param.square)],
- [12, 3, SquareMember(param.creator)]
- ]
- }
- export function DeleteSquareChatAnnouncementRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.squareChatMid],
- [10, 3, param.announcementSeq]
- ]
- }
- export function DeleteSquareChatRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.squareChatMid],
- [10, 3, param.revision]
- ]
- }
- export function DeleteSquareRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.mid],
- [10, 3, param.revision]
- ]
- }
- export function DestroyMessageRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.squareChatMid],
- [11, 4, param.messageId],
- [11, 5, param.threadMid]
- ]
- }
- export function DestroyMessagesRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.squareChatMid],
- [14, 4, [11, param.messageIds]],
- [11, 5, param.threadMid]
- ]
- }
- export function FetchMyEventsRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [10, 1, param.subscriptionId],
- [11, 2, param.syncToken],
- [8, 3, param.limit],
- [11, 4, param.continuationToken]
- ]
- }
- export function FetchDirection(param: LINETypes.FetchDirection | undefined): LINETypes.FetchDirection&number | undefined {
- return typeof param === "string" ? LINETypes.enums.FetchDirection[param] : param
- }
- export function FetchType(param: LINETypes.FetchType | undefined): LINETypes.FetchType&number | undefined {
- return typeof param === "string" ? LINETypes.enums.FetchType[param] : param
- }
- export function FetchSquareChatEventsRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [10, 1, param.subscriptionId],
- [11, 2, param.squareChatMid],
- [11, 3, param.syncToken],
- [8, 4, param.limit],
- [8, 5, FetchDirection(param.direction)],
- [8, 6, BooleanState(param.inclusive)],
- [11, 7, param.continuationToken],
- [8, 8, FetchType(param.fetchType)],
- [11, 9, param.threadMid]
- ]
- }
- export function FindSquareByEmidRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.emid]
- ]
- }
- export function FindSquareByInvitationTicketRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.invitationTicket]
- ]
- }
- export function FindSquareByInvitationTicketV2Request(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.invitationTicket]
- ]
- }
- export function AdScreen(param: LINETypes.AdScreen | undefined): LINETypes.AdScreen&number | undefined {
- return typeof param === "string" ? LINETypes.enums.AdScreen[param] : param
- }
- export function GetGoogleAdOptionsRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareMid],
- [11, 2, param.chatMid],
- [8, 3, AdScreen(param.adScreen)]
- ]
- }
- export function GetInvitationTicketUrlRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.mid]
- ]
- }
- export function GetJoinableSquareChatsRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareMid],
- [11, 10, param.continuationToken],
- [8, 11, param.limit]
- ]
- }
- export function GetJoinedSquareChatsRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.continuationToken],
- [8, 3, param.limit]
- ]
- }
- export function GetJoinedSquaresRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.continuationToken],
- [8, 3, param.limit]
- ]
- }
- export function MessageReactionType(param: LINETypes.MessageReactionType | undefined): LINETypes.MessageReactionType&number | undefined {
- return typeof param === "string" ? LINETypes.enums.MessageReactionType[param] : param
- }
- export function GetMessageReactionsRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid],
- [11, 2, param.messageId],
- [8, 3, MessageReactionType(param.type)],
- [11, 4, param.continuationToken],
- [8, 5, param.limit],
- [11, 6, param.threadMid]
- ]
- }
- export function GetNoteStatusRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.squareMid]
- ]
- }
- export function GetPopularKeywordsRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function GetSquareAuthoritiesRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [14, 2, [11, param.squareMids]]
- ]
- }
- export function GetSquareAuthorityRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareMid]
- ]
- }
- export function GetSquareCategoriesRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function GetSquareChatAnnouncementsRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.squareChatMid]
- ]
- }
- export function GetSquareChatEmidRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid]
- ]
- }
- export function GetSquareChatFeatureSetRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.squareChatMid]
- ]
- }
- export function GetSquareChatMemberRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.squareMemberMid],
- [11, 3, param.squareChatMid]
- ]
- }
- export function GetSquareChatMembersRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid],
- [11, 2, param.continuationToken],
- [8, 3, param.limit]
- ]
- }
- export function GetSquareChatRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid]
- ]
- }
- export function GetSquareChatStatusRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.squareChatMid]
- ]
- }
- export function GetSquareEmidRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareMid]
- ]
- }
- export function GetSquareFeatureSetRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.squareMid]
- ]
- }
- export function GetSquareMemberRelationRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.squareMid],
- [11, 3, param.targetSquareMemberMid]
- ]
- }
- export function SquareMemberRelationState(param: LINETypes.SquareMemberRelationState | undefined): LINETypes.SquareMemberRelationState&number | undefined {
- return typeof param === "string" ? LINETypes.enums.SquareMemberRelationState[param] : param
- }
- export function GetSquareMemberRelationsRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [8, 2, SquareMemberRelationState(param.state)],
- [11, 3, param.continuationToken],
- [8, 4, param.limit]
- ]
- }
- export function GetSquareMemberRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.squareMemberMid]
- ]
- }
- export function GetSquareMembersBySquareRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.squareMid],
- [14, 3, [11, param.squareMemberMids]]
- ]
- }
- export function GetSquareMembersRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [14, 2, [11, param.mids]]
- ]
- }
- export function GetSquareRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.mid]
- ]
- }
- export function GetSquareStatusRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.squareMid]
- ]
- }
- export function GetSquareThreadMidRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.chatMid],
- [11, 2, param.messageId]
- ]
- }
- export function GetSquareThreadRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.threadMid],
- [2, 2, param.includeRootMessage]
- ]
- }
- export function GetUserSettingsRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function HideSquareMemberContentsRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareMemberMid]
- ]
- }
- export function InviteIntoSquareChatRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [15, 1, [11, param.inviteeMids]],
- [11, 2, param.squareChatMid]
- ]
- }
- export function InviteToSquareRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.squareMid],
- [15, 3, [11, param.invitees]],
- [11, 4, param.squareChatMid]
- ]
- }
- export function JoinSquareChatRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid]
- ]
- }
- export function JoinSquareRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.squareMid],
- [12, 3, SquareMember(param.member)],
- [11, 4, param.squareChatMid],
- [12, 5, SquareJoinMethodValue(param.joinValue)],
- [8, 6, BooleanState(param.claimAdult)]
- ]
- }
- export function JoinSquareThreadRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.chatMid],
- [11, 2, param.threadMid]
- ]
- }
- export function LeaveSquareChatRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.squareChatMid],
- [2, 3, param.sayGoodbye],
- [10, 4, param.squareChatMemberRevision]
- ]
- }
- export function LeaveSquareRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.squareMid]
- ]
- }
- export function LeaveSquareThreadRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.chatMid],
- [11, 2, param.threadMid]
- ]
- }
- export function ManualRepairRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.syncToken],
- [8, 2, param.limit],
- [11, 3, param.continuationToken]
- ]
- }
- export function MarkAsReadRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.squareChatMid],
- [11, 4, param.messageId],
- [11, 5, param.threadMid]
- ]
- }
- export function MarkChatsAsReadRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [14, 2, [11, param.chatMids]]
- ]
- }
- export function MarkThreadsAsReadRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.chatMid]
- ]
- }
- export function ReactToMessageRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [8, 1, param.reqSeq],
- [11, 2, param.squareChatMid],
- [11, 3, param.messageId],
- [8, 4, MessageReactionType(param.reactionType)],
- [11, 5, param.threadMid]
- ]
- }
- export function RefreshSubscriptionsRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [15, 2, [10, param.subscriptions]]
- ]
- }
- export function RejectSquareMembersRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.squareMid],
- [15, 3, [11, param.requestedMemberMids]]
- ]
- }
- export function RemoveSubscriptionsRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [15, 2, [10, param.unsubscriptions]]
- ]
- }
- export function MessageSummaryReportType(param: LINETypes.MessageSummaryReportType | undefined): LINETypes.MessageSummaryReportType&number | undefined {
- return typeof param === "string" ? LINETypes.enums.MessageSummaryReportType[param] : param
- }
- export function ReportMessageSummaryRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.chatEmid],
- [10, 2, param.messageSummaryRangeTo],
- [8, 3, MessageSummaryReportType(param.reportType)]
- ]
- }
- export function ReportType(param: LINETypes.ReportType | undefined): LINETypes.ReportType&number | undefined {
- return typeof param === "string" ? LINETypes.enums.ReportType[param] : param
- }
- export function ReportSquareChatRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.squareMid],
- [11, 3, param.squareChatMid],
- [8, 5, ReportType(param.reportType)],
- [11, 6, param.otherReason]
- ]
- }
- export function ReportSquareMemberRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.squareMemberMid],
- [8, 3, ReportType(param.reportType)],
- [11, 4, param.otherReason],
- [11, 5, param.squareChatMid],
- [11, 6, param.threadMid]
- ]
- }
- export function ReportSquareMessageRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.squareMid],
- [11, 3, param.squareChatMid],
- [11, 4, param.squareMessageId],
- [8, 5, ReportType(param.reportType)],
- [11, 6, param.otherReason],
- [11, 7, param.threadMid]
- ]
- }
- export function ReportSquareRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.squareMid],
- [8, 3, ReportType(param.reportType)],
- [11, 4, param.otherReason]
- ]
- }
- export function SquareChatMemberSearchOption(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.displayName],
- [2, 2, param.includingMe]
- ]
- }
- export function SearchSquareChatMembersRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid],
- [12, 2, SquareChatMemberSearchOption(param.searchOption)],
- [11, 3, param.continuationToken],
- [8, 4, param.limit]
- ]
- }
- export function SquareChatMentionableSearchOption(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.displayName]
- ]
- }
- export function SearchSquareChatMentionablesRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareChatMid],
- [12, 2, SquareChatMentionableSearchOption(param.searchOption)],
- [11, 3, param.continuationToken],
- [8, 4, param.limit]
- ]
- }
- export function SquareMemberSearchOption(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [8, 1, SquareMembershipState(param.membershipState)],
- [14, 2, [8, param.memberRoles&&(param.memberRoles).map(e=>SquareMemberRole(e))]],
- [11, 3, param.displayName],
- [8, 4, BooleanState(param.ableToReceiveMessage)],
- [8, 5, BooleanState(param.ableToReceiveFriendRequest)],
- [11, 6, param.chatMidToExcludeMembers],
- [2, 7, param.includingMe],
- [2, 8, param.excludeBlockedMembers],
- [2, 9, param.includingMeOnlyMatch]
- ]
- }
- export function SearchSquareMembersRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.squareMid],
- [12, 3, SquareMemberSearchOption(param.searchOption)],
- [11, 4, param.continuationToken],
- [8, 5, param.limit]
- ]
- }
- export function SearchSquaresRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.query],
- [11, 3, param.continuationToken],
- [8, 4, param.limit]
- ]
- }
- export function MIDType(param: LINETypes.MIDType | undefined): LINETypes.MIDType&number | undefined {
- return typeof param === "string" ? LINETypes.enums.MIDType[param] : param
- }
- export function Pb1_D6(param: LINETypes.Pb1_D6 | undefined): LINETypes.Pb1_D6&number | undefined {
- return typeof param === "string" ? LINETypes.enums.Pb1_D6[param] : param
- }
- export function Pb1_EnumC13050k(param: LINETypes.Pb1_EnumC13050k | undefined): LINETypes.Pb1_EnumC13050k&number | undefined {
- return typeof param === "string" ? LINETypes.enums.Pb1_EnumC13050k[param] : param
- }
- export function GeolocationAccuracy(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [4, 1, param.radiusMeters],
- [4, 2, param.radiusConfidence],
- [4, 3, param.altitudeAccuracy],
- [4, 4, param.velocityAccuracy],
- [4, 5, param.bearingAccuracy],
- [8, 6, Pb1_EnumC13050k(param.accuracyMode)]
- ]
- }
- export function Location(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.title],
- [11, 2, param.address],
- [4, 3, param.latitude],
- [4, 4, param.longitude],
- [11, 5, param.phone],
- [11, 6, param.categoryId],
- [8, 7, Pb1_D6(param.provider)],
- [12, 8, GeolocationAccuracy(param.accuracy)],
- [4, 9, param.altitudeMeters]
- ]
- }
- export function ContentType(param: LINETypes.ContentType | undefined): LINETypes.ContentType&number | undefined {
- return typeof param === "string" ? LINETypes.enums.ContentType[param] : param
- }
- export function Pb1_EnumC13015h6(param: LINETypes.Pb1_EnumC13015h6 | undefined): LINETypes.Pb1_EnumC13015h6&number | undefined {
- return typeof param === "string" ? LINETypes.enums.Pb1_EnumC13015h6[param] : param
- }
- export function Pb1_E7(param: LINETypes.Pb1_E7 | undefined): LINETypes.Pb1_E7&number | undefined {
- return typeof param === "string" ? LINETypes.enums.Pb1_E7[param] : param
- }
- export function Pb1_B(param: LINETypes.Pb1_B | undefined): LINETypes.Pb1_B&number | undefined {
- return typeof param === "string" ? LINETypes.enums.Pb1_B[param] : param
- }
- export function ReactionType(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [8, 1, MessageReactionType(param.predefinedReactionType)]
- ]
- }
- export function Reaction(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.fromUserMid],
- [10, 2, param.atMillis],
- [12, 3, ReactionType(param.reactionType)]
- ]
- }
- export function Message(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.from],
- [11, 2, param.to],
- [8, 3, MIDType(param.toType)],
- [11, 4, param.id],
- [10, 5, param.createdTime],
- [10, 6, param.deliveredTime],
- [11, 10, param.text],
- [12, 11, Location(param.location)],
- [2, 14, param.hasContent],
- [8, 15, ContentType(param.contentType)],
- [11, 17, param.contentPreview],
- [13, 18, [11, 11, param.contentMetadata]],
- [3, 19, param.sessionId],
- [15, 20, [11, param.chunks]],
- [11, 21, param.relatedMessageId],
- [8, 22, Pb1_EnumC13015h6(param.messageRelationType)],
- [8, 23, param.readCount],
- [8, 24, Pb1_E7(param.relatedMessageServiceCode)],
- [8, 25, Pb1_B(param.appExtensionType)],
- [15, 27, [12, param.reactions&&(param.reactions).map(e=>Reaction(e))]]
- ]
- }
- export function SquareMessageState(param: LINETypes.SquareMessageState | undefined): LINETypes.SquareMessageState&number | undefined {
- return typeof param === "string" ? LINETypes.enums.SquareMessageState[param] : param
- }
- export function SquareMessageThreadInfo(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.chatThreadMid],
- [2, 2, param.threadRoot]
- ]
- }
- export function SquareMessage(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [12, 1, Message(param.message)],
- [8, 3, MIDType(param.fromType)],
- [10, 4, param.squareMessageRevision],
- [8, 5, SquareMessageState(param.state)],
- [12, 6, SquareMessageThreadInfo(param.threadInfo)]
- ]
- }
- export function SendMessageRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [8, 1, param.reqSeq],
- [11, 2, param.squareChatMid],
- [12, 3, SquareMessage(param.squareMessage)]
- ]
- }
- export function SendSquareThreadMessageRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [8, 1, param.reqSeq],
- [11, 2, param.chatMid],
- [11, 3, param.threadMid],
- [12, 4, SquareMessage(param.threadMessage)]
- ]
- }
- export function SyncSquareMembersRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareMid],
- [13, 2, [11, 10, param.squareMembers]]
- ]
- }
- export function UnhideSquareMemberContentsRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareMemberMid]
- ]
- }
- export function UnsendMessageRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.squareChatMid],
- [11, 3, param.messageId],
- [11, 4, param.threadMid]
- ]
- }
- export function SquareAuthorityAttribute(param: LINETypes.SquareAuthorityAttribute | undefined): LINETypes.SquareAuthorityAttribute&number | undefined {
- return typeof param === "string" ? LINETypes.enums.SquareAuthorityAttribute[param] : param
- }
- export function SquareAuthority(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareMid],
- [8, 2, SquareMemberRole(param.updateSquareProfile)],
- [8, 3, SquareMemberRole(param.inviteNewMember)],
- [8, 4, SquareMemberRole(param.approveJoinRequest)],
- [8, 5, SquareMemberRole(param.createPost)],
- [8, 6, SquareMemberRole(param.createOpenSquareChat)],
- [8, 7, SquareMemberRole(param.deleteSquareChatOrPost)],
- [8, 8, SquareMemberRole(param.removeSquareMember)],
- [8, 9, SquareMemberRole(param.grantRole)],
- [8, 10, SquareMemberRole(param.enableInvitationTicket)],
- [10, 11, param.revision],
- [8, 12, SquareMemberRole(param.createSquareChatAnnouncement)],
- [8, 13, SquareMemberRole(param.updateMaxChatMemberCount)],
- [8, 14, SquareMemberRole(param.useReadonlyDefaultChat)],
- [8, 15, SquareMemberRole(param.sendAllMention)]
- ]
- }
- export function UpdateSquareAuthorityRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [14, 2, [8, param.updateAttributes&&(param.updateAttributes).map(e=>SquareAuthorityAttribute(e))]],
- [12, 3, SquareAuthority(param.authority)]
- ]
- }
- export function SquareChatMemberAttribute(param: LINETypes.SquareChatMemberAttribute | undefined): LINETypes.SquareChatMemberAttribute&number | undefined {
- return typeof param === "string" ? LINETypes.enums.SquareChatMemberAttribute[param] : param
- }
- export function SquareChatMembershipState(param: LINETypes.SquareChatMembershipState | undefined): LINETypes.SquareChatMembershipState&number | undefined {
- return typeof param === "string" ? LINETypes.enums.SquareChatMembershipState[param] : param
- }
- export function SquareChatMember(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareMemberMid],
- [11, 2, param.squareChatMid],
- [10, 3, param.revision],
- [8, 4, SquareChatMembershipState(param.membershipState)],
- [2, 5, param.notificationForMessage],
- [2, 6, param.notificationForNewMember]
- ]
- }
- export function UpdateSquareChatMemberRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [14, 2, [8, param.updatedAttrs&&(param.updatedAttrs).map(e=>SquareChatMemberAttribute(e))]],
- [12, 3, SquareChatMember(param.chatMember)]
- ]
- }
- export function SquareChatAttribute(param: LINETypes.SquareChatAttribute | undefined): LINETypes.SquareChatAttribute&number | undefined {
- return typeof param === "string" ? LINETypes.enums.SquareChatAttribute[param] : param
- }
- export function UpdateSquareChatRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [14, 2, [8, param.updatedAttrs&&(param.updatedAttrs).map(e=>SquareChatAttribute(e))]],
- [12, 3, SquareChat(param.squareChat)]
- ]
- }
- export function SquareFeatureSetAttribute(param: LINETypes.SquareFeatureSetAttribute | undefined): LINETypes.SquareFeatureSetAttribute&number | undefined {
- return typeof param === "string" ? LINETypes.enums.SquareFeatureSetAttribute[param] : param
- }
- export function SquareFeatureControlState(param: LINETypes.SquareFeatureControlState | undefined): LINETypes.SquareFeatureControlState&number | undefined {
- return typeof param === "string" ? LINETypes.enums.SquareFeatureControlState[param] : param
- }
- export function SquareFeature(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [8, 1, SquareFeatureControlState(param.controlState)],
- [8, 2, BooleanState(param.booleanValue)]
- ]
- }
- export function SquareFeatureSet(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.squareMid],
- [10, 2, param.revision],
- [12, 11, SquareFeature(param.creatingSecretSquareChat)],
- [12, 12, SquareFeature(param.invitingIntoOpenSquareChat)],
- [12, 13, SquareFeature(param.creatingSquareChat)],
- [12, 14, SquareFeature(param.readonlyDefaultChat)],
- [12, 15, SquareFeature(param.showingAdvertisement)],
- [12, 16, SquareFeature(param.delegateJoinToPlug)],
- [12, 17, SquareFeature(param.delegateKickOutToPlug)],
- [12, 18, SquareFeature(param.disableUpdateJoinMethod)],
- [12, 19, SquareFeature(param.disableTransferAdmin)],
- [12, 20, SquareFeature(param.creatingLiveTalk)],
- [12, 21, SquareFeature(param.disableUpdateSearchable)],
- [12, 22, SquareFeature(param.summarizingMessages)],
- [12, 23, SquareFeature(param.creatingSquareThread)],
- [12, 24, SquareFeature(param.enableSquareThread)],
- [12, 25, SquareFeature(param.disableChangeRoleCoAdmin)]
- ]
- }
- export function UpdateSquareFeatureSetRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [14, 2, [8, param.updateAttributes&&(param.updateAttributes).map(e=>SquareFeatureSetAttribute(e))]],
- [12, 3, SquareFeatureSet(param.squareFeatureSet)]
- ]
- }
- export function SquareMemberRelation(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [8, 1, SquareMemberRelationState(param.state)],
- [10, 2, param.revision]
- ]
- }
- export function UpdateSquareMemberRelationRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 2, param.squareMid],
- [11, 3, param.targetSquareMemberMid],
- [14, 4, [8, param.updatedAttrs]],
- [12, 5, SquareMemberRelation(param.relation)]
- ]
- }
- export function SquareMemberAttribute(param: LINETypes.SquareMemberAttribute | undefined): LINETypes.SquareMemberAttribute&number | undefined {
- return typeof param === "string" ? LINETypes.enums.SquareMemberAttribute[param] : param
- }
- export function SquarePreferenceAttribute(param: LINETypes.SquarePreferenceAttribute | undefined): LINETypes.SquarePreferenceAttribute&number | undefined {
- return typeof param === "string" ? LINETypes.enums.SquarePreferenceAttribute[param] : param
- }
- export function UpdateSquareMemberRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [14, 2, [8, param.updatedAttrs&&(param.updatedAttrs).map(e=>SquareMemberAttribute(e))]],
- [14, 3, [8, param.updatedPreferenceAttrs&&(param.updatedPreferenceAttrs).map(e=>SquarePreferenceAttribute(e))]],
- [12, 4, SquareMember(param.squareMember)]
- ]
- }
- export function UpdateSquareMembersRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [14, 2, [8, param.updatedAttrs&&(param.updatedAttrs).map(e=>SquareMemberAttribute(e))]],
- [15, 3, [12, param.members&&(param.members).map(e=>SquareMember(e))]]
- ]
- }
- export function SquareAttribute(param: LINETypes.SquareAttribute | undefined): LINETypes.SquareAttribute&number | undefined {
- return typeof param === "string" ? LINETypes.enums.SquareAttribute[param] : param
- }
- export function UpdateSquareRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [14, 2, [8, param.updatedAttrs&&(param.updatedAttrs).map(e=>SquareAttribute(e))]],
- [12, 3, Square(param.square)]
- ]
- }
- export function SquareUserSettings(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [8, 1, BooleanState(param.liveTalkNotification)]
- ]
- }
- export function UpdateUserSettingsRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- ,
- [12, 2, SquareUserSettings(param.userSettings)]
- ]
- }
- export function r80_EnumC34362b(param: LINETypes.r80_EnumC34362b | undefined): LINETypes.r80_EnumC34362b&number | undefined {
- return typeof param === "string" ? LINETypes.enums.r80_EnumC34362b[param] : param
- }
- export function r80_EnumC34361a(param: LINETypes.r80_EnumC34361a | undefined): LINETypes.r80_EnumC34361a&number | undefined {
- return typeof param === "string" ? LINETypes.enums.r80_EnumC34361a[param] : param
- }
- export function AuthenticatorAssertionResponse(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.clientDataJSON],
- [11, 2, param.authenticatorData],
- [11, 3, param.signature],
- [11, 4, param.userHandle]
- ]
- }
- export function AuthenticationExtensionsClientOutputs(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [2, 91, param.lineAuthenSel]
- ]
- }
- export function AuthPublicKeyCredential(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.id],
- [11, 2, param.type],
- [12, 3, AuthenticatorAssertionResponse(param.response)],
- [12, 4, AuthenticationExtensionsClientOutputs(param.extensionResults)]
- ]
- }
- export function AuthenticateWithPaakRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.sessionId],
- [12, 2, AuthPublicKeyCredential(param.credential)]
- ]
- }
- export function BulkFollowRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [14, 1, [11, param.followTargetMids]],
- [14, 2, [11, param.unfollowTargetMids]],
- [2, 3, param.hasNext]
- ]
- }
- export function t80_h(param: LINETypes.t80_h | undefined): LINETypes.t80_h&number | undefined {
- return typeof param === "string" ? LINETypes.enums.t80_h[param] : param
- }
- export function GetRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.keyName],
- [8, 2, t80_h(param.ns)]
- ]
- }
- export function BulkGetRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [14, 1, [12, param.requests&&(param.requests).map(e=>GetRequest(e))]]
- ]
- }
- export function BuyMustbuyRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [8, 1, Ob1_O0(param.productType)],
- [11, 2, param.productId],
- [11, 3, param.serialNumber]
- ]
- }
- export function CanCreateCombinationStickerRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [14, 1, [11, param.packageIds]]
- ]
- }
- export function Locale(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.language],
- [11, 2, param.country]
- ]
- }
- export function CancelChatInvitationRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [8, 1, param.reqSeq],
- [11, 2, param.chatMid],
- [14, 3, [11, param.targetUserMids]]
- ]
- }
- export function CancelPaakAuthRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.sessionId]
- ]
- }
- export function CancelPaakAuthenticationRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.authSessionId]
- ]
- }
- export function CancelPinCodeRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.authSessionId]
- ]
- }
- export function CancelReactionRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [8, 1, param.reqSeq],
- [10, 2, param.messageId]
- ]
- }
- export function VerificationMethod(param: LINETypes.VerificationMethod | undefined): LINETypes.VerificationMethod&number | undefined {
- return typeof param === "string" ? LINETypes.enums.VerificationMethod[param] : param
- }
- export function r80_n0(param: LINETypes.r80_n0 | undefined): LINETypes.r80_n0&number | undefined {
- return typeof param === "string" ? LINETypes.enums.r80_n0[param] : param
- }
- export function T70_EnumC14390b(param: LINETypes.T70_EnumC14390b | undefined): LINETypes.T70_EnumC14390b&number | undefined {
- return typeof param === "string" ? LINETypes.enums.T70_EnumC14390b[param] : param
- }
- export function AccountIdentifier(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [8, 1, T70_EnumC14390b(param.type)],
- [11, 2, param.identifier],
- [11, 11, param.countryCode]
- ]
- }
- export function h80_t(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.newDevicePublicKey],
- [11, 2, param.encryptedQrIdentifier]
- ]
- }
- export function CheckIfEncryptedE2EEKeyReceivedRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.sessionId],
- [12, 2, h80_t(param.secureChannelData)]
- ]
- }
- export function UserPhoneNumber(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.phoneNumber],
- [11, 2, param.countryCode]
- ]
- }
- export function CheckIfPhonePinCodeMsgVerifiedRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.authSessionId],
- [12, 2, UserPhoneNumber(param.userPhoneNumber)]
- ]
- }
- export function r80_EnumC34368h(param: LINETypes.r80_EnumC34368h | undefined): LINETypes.r80_EnumC34368h&number | undefined {
- return typeof param === "string" ? LINETypes.enums.r80_EnumC34368h[param] : param
- }
- export function r80_EnumC34371k(param: LINETypes.r80_EnumC34371k | undefined): LINETypes.r80_EnumC34371k&number | undefined {
- return typeof param === "string" ? LINETypes.enums.r80_EnumC34371k[param] : param
- }
- export function CheckUserAgeAfterApprovalWithDocomoV2Request(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.accessToken],
- [11, 2, param.agprm]
- ]
- }
- export function CheckUserAgeWithDocomoV2Request(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.authCode]
- ]
- }
- export function CarrierCode(param: LINETypes.CarrierCode | undefined): LINETypes.CarrierCode&number | undefined {
- return typeof param === "string" ? LINETypes.enums.CarrierCode[param] : param
- }
- export function IdentityProvider(param: LINETypes.IdentityProvider | undefined): LINETypes.IdentityProvider&number | undefined {
- return typeof param === "string" ? LINETypes.enums.IdentityProvider[param] : param
- }
- export function IdentifierConfirmationRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [13, 1, [11, 11, param.metaData]],
- [2, 2, param.forceRegistration],
- [11, 3, param.verificationCode]
- ]
- }
- export function IdentityCredentialRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [13, 1, [11, 11, param.metaData]],
- [8, 2, IdentityProvider(param.identityProvider)],
- [11, 3, param.cipherKeyId],
- [11, 4, param.cipherText],
- [12, 5, IdentifierConfirmationRequest(param.confirmationRequest)]
- ]
- }
- export function ConnectEapAccountRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.authSessionId]
- ]
- }
- export function Pb1_X2(param: LINETypes.Pb1_X2 | undefined): LINETypes.Pb1_X2&number | undefined {
- return typeof param === "string" ? LINETypes.enums.Pb1_X2[param] : param
- }
- export function ChatRoomAnnouncementContentMetadata(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.replace],
- [11, 2, param.sticonOwnership],
- [11, 3, param.postNotificationMetadata]
- ]
- }
- export function ChatRoomAnnouncementContents(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [8, 1, param.displayFields],
- [11, 2, param.text],
- [11, 3, param.link],
- [11, 4, param.thumbnail],
- [12, 5, ChatRoomAnnouncementContentMetadata(param.contentMetadata)]
- ]
- }
- export function Pb1_Z2(param: LINETypes.Pb1_Z2 | undefined): LINETypes.Pb1_Z2&number | undefined {
- return typeof param === "string" ? LINETypes.enums.Pb1_Z2[param] : param
- }
- export function CreateChatRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [8, 1, param.reqSeq],
- [8, 2, Pb1_Z2(param.type)],
- [11, 3, param.name],
- [14, 4, [11, param.targetUserMids]],
- [11, 5, param.picturePath]
- ]
- }
- export function Pb1_A3(param: LINETypes.Pb1_A3 | undefined): LINETypes.Pb1_A3&number | undefined {
- return typeof param === "string" ? LINETypes.enums.Pb1_A3[param] : param
- }
- export function Pb1_C13263z3(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.blobHeader],
- [11, 2, param.blobPayload],
- [8, 3, Pb1_A3(param.reason)]
- ]
- }
- export function CreateGroupCallUrlRequest(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [11, 1, param.title]
- ]
- }
- export function E2EEMetadata(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [10, 1, param.e2EEPublicKeyId]
- ]
- }
- export function SingleValueMetadata(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
-
- ]
- }
- export function Pb1_W5(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [12, 1, E2EEMetadata(param.e2ee)],
- [12, 2, SingleValueMetadata(param.singleValue)]
- ]
- }
- export function Pb1_X5(param?: PartialDeep | undefined): NestedArray {
- return typeof param === "undefined" ? [] : [
- [12, 1, Pb1_W5(param.metadata)],
- [11, 2, param.blobPayload]
- ]
- }
- export function Pb1_E3(param?: PartialDeep