@at-pocket/js-sdk 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@at-pocket/js-sdk",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "TypeScript definitions for the atPocket JS SDK",
5
5
  "keywords": [
6
6
  "typescript",
package/src/config.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export interface Config {
2
- apiKey: string;
3
- baseUrl?: string;
4
- }
1
+ export interface Config {
2
+ apiKey: string;
3
+ baseUrl?: string;
4
+ }
package/src/globals.d.ts CHANGED
@@ -1,12 +1,12 @@
1
- import { atPocket } from "./interfaces";
2
-
3
- declare global {
4
- interface Window {
5
- atPocket: atPocket;
6
- }
7
-
8
- // グローバル変数として `atPocket` を宣言
9
- var atPocket: atPocket;
10
- }
11
-
1
+ import { atPocket } from "./interfaces";
2
+
3
+ declare global {
4
+ interface Window {
5
+ atPocket: atPocket;
6
+ }
7
+
8
+ // グローバル変数として `atPocket` を宣言
9
+ var atPocket: atPocket;
10
+ }
11
+
12
12
  export {};
package/src/index.d.ts CHANGED
@@ -1,4 +1,7 @@
1
- /// <reference path="./globals.d.ts" />
2
-
3
- export * from "./interfaces";
4
- export * from "./config";
1
+ /// <reference path="./globals.d.ts" />
2
+
3
+ export * from "./interfaces";
4
+ export * from "./config";
5
+ // レコード値の型(RecordData / SubTableFieldValue / SubTableRow 等)。
6
+ // JSDoc から `import('@at-pocket/js-sdk').SubTableFieldValue` で参照するために公開する。
7
+ export * from "./types";
@@ -1,25 +1,25 @@
1
- import { AppInterface } from './lib/app';
2
- import { ApiInterface } from "./lib/api";
3
- import { EventsInterface } from "./lib/events";
4
- import { PortalInterface } from "./lib/portal";
5
- import { ProxyInterface } from './lib/proxy';
6
- import { PluginInterface } from './lib/plugin';
7
-
8
- // atPocket インターフェースに `app` を追加
9
- export interface atPocket {
10
- getData(endpoint: string): Promise<any>;
11
- postData(endpoint: string, data: object): Promise<any>;
12
- api: ApiInterface;
13
- events: EventsInterface;
14
- app: AppInterface;
15
- portal: PortalInterface;
16
- proxy: ProxyInterface;
17
- plugin: PluginInterface;
18
-
19
- /**
20
- * デバイスタイプを取得
21
- *
22
- * @returns desktop | mobile
23
- */
24
- deviceType: 'desktop' | 'mobile';
25
- }
1
+ import { AppInterface } from './lib/app';
2
+ import { ApiInterface } from "./lib/api";
3
+ import { EventsInterface } from "./lib/events";
4
+ import { PortalInterface } from "./lib/portal";
5
+ import { ProxyInterface } from './lib/proxy';
6
+ import { PluginInterface } from './lib/plugin';
7
+
8
+ // atPocket インターフェースに `app` を追加
9
+ export interface atPocket {
10
+ getData(endpoint: string): Promise<any>;
11
+ postData(endpoint: string, data: object): Promise<any>;
12
+ api: ApiInterface;
13
+ events: EventsInterface;
14
+ app: AppInterface;
15
+ portal: PortalInterface;
16
+ proxy: ProxyInterface;
17
+ plugin: PluginInterface;
18
+
19
+ /**
20
+ * デバイスタイプを取得
21
+ *
22
+ * @returns desktop | mobile
23
+ */
24
+ deviceType: 'desktop' | 'mobile';
25
+ }
package/src/lib/api.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { IFailureCallback, IMethod, ISuccessCallback } from "../types";
2
-
3
- export interface ApiInterface {
4
- (pathOrUrl: string, method: IMethod, params?: any, successCallback?: ISuccessCallback, failureCallback?: IFailureCallback): Promise<any>;
5
-
6
- url(pathOrUrl: string): string;
7
- urlWithQuery(pathOrUrl: string, params?: any): string;
8
- }
1
+ import { IFailureCallback, IMethod, ISuccessCallback } from "../types";
2
+
3
+ export interface ApiInterface {
4
+ (pathOrUrl: string, method: IMethod, params?: any, successCallback?: ISuccessCallback, failureCallback?: IFailureCallback): Promise<any>;
5
+
6
+ url(pathOrUrl: string): string;
7
+ urlWithQuery(pathOrUrl: string, params?: any): string;
8
+ }
package/src/lib/app.d.ts CHANGED
@@ -1,68 +1,82 @@
1
- import { FieldsInterface } from "./fields";
2
- import { RecordInterface } from "./record";
3
-
4
- export interface AppInterface {
5
-
6
- /**
7
- * 現在表示しているアプリのAppBarのカスタム領域を取得
8
- * @see {@link [@pocket JS-SDK](https://app000.at-pocket.com/developers/js-api/app/func.get-app-bar-space-element)}
9
- *
10
- * @returns {HTMLElement | null} AppBarのカスタム領域HTML要素
11
- */
12
- getAppBarSpaceElement(): HTMLElement | null;
13
-
14
- /**
15
- * レコード一覧のフィールド要素を取得
16
- * @see {@link [@pocket JS-SDK](https://app000.at-pocket.com/developers/js-api/app/func.get-field-elements)}
17
- *
18
- * @param fieldUniqueId - フィールドのユニークID
19
- * @returns NodeListOf<HTMLElement>
20
- */
21
- getFieldElements(fieldUniqueId: string): NodeListOf<HTMLElement>;
22
-
23
- /**
24
- * レコード一覧のフィールド要素を取得(行INDEX指定)
25
- * @see {@link [@pocket JS-SDK](https://app000.at-pocket.com/developers/js-api/app/func.get-field-element)}
26
- *
27
- * @param fieldUniqueId - フィールドのユニークID
28
- * @param index - 指定する行のINDEX
29
- * @returns {HTMLElement | null} 指定フィールドのHTML要素
30
- */
31
- getFieldElement(fieldUniqueId: string, index: number): HTMLElement | null;
32
-
33
- /**
34
- * アプリのIDを取得
35
- * @see {@link [@pocket JS-SDK](https://app000.at-pocket.com/developers/js-api/app/func.get-id)}
36
- *
37
- * @returns {string | null} 現在表示中のアプリID
38
- */
39
- getId(): string | null;
40
-
41
- /**
42
- * 現在表示中のレコード一覧のクエリ文字列を取得
43
- * @see {@link [@pocket JS-SDK](https://app000.at-pocket.com/developers/js-api/app/func.get-query-condition)}
44
- *
45
- * @returns {Record<string, any>} クエリ文字列の key: value オブジェクト
46
- */
47
- getQueryCondition(): Record<string, any>;
48
-
49
- /**
50
- * アプリ上部の要素を取得
51
- */
52
- getTopSpaceElement(): HTMLElement | null;
53
-
54
- /**
55
- * アプリ下部の要素を取得
56
- */
57
- getBottomSpaceElement(): HTMLElement | null;
58
-
59
- /**
60
- * レコード
61
- */
62
- record: RecordInterface;
63
-
64
- /**
65
- * フィールド
66
- */
67
- fields: FieldsInterface;
68
- }
1
+ import { FieldsInterface } from "./fields";
2
+ import { RecordInterface } from "./record";
3
+ import type { PublicFieldMap } from "../types";
4
+
5
+ export interface AppInterface {
6
+
7
+ /**
8
+ * アプリのフォームフィールド定義を取得する(非同期)。
9
+ *
10
+ * REST経由で取得するため、一覧/ポータル等フォーム未マウントの画面でも利用できる。
11
+ * ただし設計時の定義であり、実行時の表示/非表示など動的状態は含まない
12
+ * (現フォーム状態が必要なら app.fields.getAll() を使用)。
13
+ *
14
+ * @param appId - 対象アプリID(省略時はURLから解決。ポータル等では明示必須)
15
+ * @param callback - 取得完了コールバック(任意)
16
+ * @returns {Promise<PublicFieldMap>} 公開フィールドマップ(fieldUid → 公開定義)
17
+ */
18
+ getFormFields(appId?: number, callback?: (fields: PublicFieldMap) => void): Promise<PublicFieldMap>;
19
+
20
+ /**
21
+ * 現在表示しているアプリのAppBarのカスタム領域を取得
22
+ * @see {@link [@pocket JS-SDK](https://app000.at-pocket.com/developers/js-api/app/func.get-app-bar-space-element)}
23
+ *
24
+ * @returns {HTMLElement | null} AppBarのカスタム領域HTML要素
25
+ */
26
+ getAppBarSpaceElement(): HTMLElement | null;
27
+
28
+ /**
29
+ * レコード一覧のフィールド要素を取得
30
+ * @see {@link [@pocket JS-SDK](https://app000.at-pocket.com/developers/js-api/app/func.get-field-elements)}
31
+ *
32
+ * @param fieldUniqueId - フィールドのユニークID
33
+ * @returns NodeListOf<HTMLElement>
34
+ */
35
+ getFieldElements(fieldUniqueId: string): NodeListOf<HTMLElement>;
36
+
37
+ /**
38
+ * レコード一覧のフィールド要素を取得(行INDEX指定)
39
+ * @see {@link [@pocket JS-SDK](https://app000.at-pocket.com/developers/js-api/app/func.get-field-element)}
40
+ *
41
+ * @param fieldUniqueId - フィールドのユニークID
42
+ * @param index - 指定する行のINDEX
43
+ * @returns {HTMLElement | null} 指定フィールドのHTML要素
44
+ */
45
+ getFieldElement(fieldUniqueId: string, index: number): HTMLElement | null;
46
+
47
+ /**
48
+ * アプリのIDを取得
49
+ * @see {@link [@pocket JS-SDK](https://app000.at-pocket.com/developers/js-api/app/func.get-id)}
50
+ *
51
+ * @returns {string | null} 現在表示中のアプリID
52
+ */
53
+ getId(): string | null;
54
+
55
+ /**
56
+ * 現在表示中のレコード一覧のクエリ文字列を取得
57
+ * @see {@link [@pocket JS-SDK](https://app000.at-pocket.com/developers/js-api/app/func.get-query-condition)}
58
+ *
59
+ * @returns {Record<string, any>} クエリ文字列の key: value オブジェクト
60
+ */
61
+ getQueryCondition(): Record<string, any>;
62
+
63
+ /**
64
+ * アプリ上部の要素を取得
65
+ */
66
+ getTopSpaceElement(): HTMLElement | null;
67
+
68
+ /**
69
+ * アプリ下部の要素を取得
70
+ */
71
+ getBottomSpaceElement(): HTMLElement | null;
72
+
73
+ /**
74
+ * レコード
75
+ */
76
+ record: RecordInterface;
77
+
78
+ /**
79
+ * フィールド
80
+ */
81
+ fields: FieldsInterface;
82
+ }
@@ -1,70 +1,191 @@
1
- type ListEvent = {
2
- appId: number,
3
- fields: any,
4
- record: any,
5
- sort: any,
6
- order: any,
7
- }
8
-
9
- type DetailEvent = {
10
- appId: number,
11
- fields: any,
12
- record: any[]
13
- }
14
-
15
- export type Event = ListEvent & DetailEvent;
16
-
17
- // イベントハンドラーの型
18
- export type EventHandler = (event: Event) => any;
19
-
20
- // トリガーイベントのオプションの型
21
- export type IOptions = Record<string, any>;
22
-
23
- // コールバック関数の型
24
- export type ICallback = (event: Event) => void;
25
-
26
- // イベントタイプ
27
- export type EventType = 'app.record.index.show'
28
- | 'app.record.detail.show'
29
- | 'app.record.detail.delete.submit'
30
- | 'app.record.detail.delete.submit.success'
31
- | 'app.record.create.show'
32
- | 'app.record.create.change'
33
- | 'app.record.create.submit'
34
- | 'app.record.create.submit.success'
35
- | 'app.record.edit.show'
36
- | 'app.record.edit.change'
37
- | 'app.record.edit.submit'
38
- | 'app.record.edit.submit.success'
39
- | 'portal.index.show';
40
-
41
- // Events インターフェースの定義
42
- export interface EventsInterface {
43
- /**
44
- * イベントハンドラーを登録
45
- * @param types - イベントの種類(文字列 or 文字列配列)
46
- * @param handler - イベント発火時に実行する関数
47
- */
48
- on(types: EventType | EventType[], handler: EventHandler): void;
49
-
50
- /**
51
- * イベントハンドラーを削除
52
- * @param types - 削除するイベントの種類(省略可)
53
- */
54
- off(types?: EventType | EventType[]): void;
55
-
56
- /**
57
- * イベントを発火
58
- * @param type - イベントの種類
59
- * @param options - イベントのオプション(デフォルト `{}`)
60
- * @param callback - イベント完了後に実行する関数(オプション)
61
- */
62
- trigger(type: EventType, options?: IOptions, callback?: ICallback): Event | void;
63
-
64
- /**
65
- * すべてのイベントを削除
66
- */
67
- remove(): void;
68
- }
69
-
70
- export {};
1
+ import type { RecordData } from "../types";
2
+
3
+ type PortalEvent = {
4
+ type: EventType,
5
+ portalId: number,
6
+ pageId: number,
7
+ }
8
+
9
+ /**
10
+ * 明細(SubTable)の行参照。
11
+ * changeイベントの `changes.row` と、`app.record.lookup.error` の `errors[].row` で共用する。
12
+ */
13
+ type SubTableRowRef = {
14
+ /** 行インデックス(0始まり) */
15
+ index: number,
16
+ /** 行ID(`app.record.get()` の `SubTableRow.id` と同じ) */
17
+ id: string | null,
18
+ }
19
+
20
+ /** `app.record.lookup.error` の失敗1件分(`LookupErrorEvent.errors` の要素)。 */
21
+ type LookupErrorEntry = {
22
+ /**
23
+ * 行情報(changeイベントの `changes.row` と同一形式)。
24
+ * 明細(SubTable)の場合のみ設定され、通常配置のフィールドでは null。
25
+ */
26
+ row: SubTableRowRef | null,
27
+ /** 列UID(明細の場合のみ設定) */
28
+ columnUid?: string,
29
+ /** 失敗理由(API_FAILED: 取得API失敗 / NOT_FOUND: 該当レコードなし / AMBIGUOUS: 表示名が複数レコードに一致し特定不能) */
30
+ reason: 'API_FAILED' | 'NOT_FOUND' | 'AMBIGUOUS',
31
+ /** エラーメッセージ */
32
+ message: string,
33
+ /** 解決に使った表示名(labelValue指定時のみ設定) */
34
+ labelValue?: string,
35
+ /** 原因エラー(`API_FAILED` 時のみ) */
36
+ error?: unknown,
37
+ }
38
+
39
+ /**
40
+ * `app.record.lookup.error`(参照データの取得失敗)イベントのペイロード。
41
+ *
42
+ * 【発火単位】フィールド1つにつき1回。明細(SubTable)は明細フィールドが単位のため、
43
+ * 行×列の失敗は `errors` にまとまって1回で通知される(1回の `set()` に対し通知も1回)。
44
+ * 通常配置のフィールドは行をまたがないため `errors` は常に1件(`row` は null)。
45
+ *
46
+ * 【`false` の戻り値】通常配置のフィールドでは既定のインラインエラー表示を抑止する。
47
+ * 明細には既定のインラインエラー表示が無い(submitブロック回避のため意図的)ため、
48
+ * 明細では `false` を返しても抑止する対象が無く、何も起きない。
49
+ */
50
+ type LookupErrorEvent = {
51
+ type: EventType,
52
+ /**
53
+ * 対象フィールドの公開UID(= field.uid。内部の数値 field.fieldId とは別物)。
54
+ * 明細の場合は明細フィールド自体のUID(行・列は `errors[].row` / `errors[].columnUid` で表す)。
55
+ */
56
+ fieldUid?: string,
57
+ /** 対象が明細(SubTable)フィールドか否か */
58
+ isSubTable?: boolean,
59
+ /** 失敗の一覧(1件以上。通常配置のフィールドは常に1件) */
60
+ errors?: LookupErrorEntry[],
61
+ }
62
+
63
+ type ListEvent = {
64
+ type: EventType,
65
+ appId: number,
66
+ fields: any[],
67
+ records: any[],
68
+ viewType?: string,
69
+ viewId?: number,
70
+ filterId?: number,
71
+ page?: number,
72
+ sort?: string,
73
+ order?: string,
74
+ }
75
+
76
+ type DetailEvent = {
77
+ type: EventType,
78
+ appId: number,
79
+ /** レコードID(新規作成時は null) */
80
+ recordId?: number | null,
81
+ /** レコードデータ(公開フィールドUID → 値)。ハンドラー内で書き換えて event を return すると反映される */
82
+ record: RecordData,
83
+ /** `.show` の発火契機。`init`: 初期表示 / `reload`: 再読込 */
84
+ trigger?: 'init' | 'reload',
85
+ /**
86
+ * 変更内容。change イベント(`app.record.{create|edit}.change`)でのみ存在する。
87
+ *
88
+ * 明細(SubTable)の行操作(追加・コピー・削除・並び替え)も change として通知される。
89
+ * その場合 `name` は明細フィールドのUIDになり、`mutation` が設定される。
90
+ */
91
+ changes?: {
92
+ /**
93
+ * 変更されたフィールドのUID。
94
+ * - セル/フィールドの値変更: そのフィールド(明細内なら列)のUID
95
+ * - 明細の行操作: 明細フィールドのUID
96
+ *
97
+ * この値により `app.record.{action}.change.{UID}` へ自動ルーティングされる。
98
+ */
99
+ name?: string,
100
+ /**
101
+ * 変更後の値。**行操作では設定されない**
102
+ * (行の配列は `record[changes.name].value` と重複するため)。
103
+ */
104
+ value?: any,
105
+ /**
106
+ * 明細(SubTable)行の情報。明細内フィールドの変更時と行操作時に設定され、
107
+ * 通常配置のフィールドでは null。
108
+ * `app.record.lookup.error` の `errors[].row` と同一形式。
109
+ */
110
+ row?: SubTableRowRef | null,
111
+ /**
112
+ * 明細(SubTable)行操作の詳細。**行操作のときのみ存在する**。
113
+ * このプロパティの有無でセル値変更と行操作を判別できる。
114
+ */
115
+ mutation?: {
116
+ /** 操作種別 */
117
+ type: 'add' | 'copy' | 'remove' | 'sort',
118
+ /** 移動元の行インデックス(0始まり)。`sort` のときのみ設定される */
119
+ fromIndex?: number,
120
+ },
121
+ /**
122
+ * 変更の発火元。
123
+ * - `'user'`: 利用者の入力、または明細の行操作による変更
124
+ * - `'set'` : `app.record.set(rec, { fireChange: true })` による変更
125
+ *
126
+ * 自分が set() した値に自分で反応してしまうのを避けたい場合に利用できる。
127
+ */
128
+ origin?: 'user' | 'set',
129
+ }
130
+ }
131
+
132
+ export type Event = PortalEvent & ListEvent & DetailEvent & LookupErrorEvent;
133
+
134
+ // イベントハンドラーの型
135
+ export type EventHandler = (event: Event) => any;
136
+
137
+ // トリガーイベントのオプションの型
138
+ export type IOptions = Record<string, any>;
139
+
140
+ // コールバック関数の型
141
+ export type ICallback = (event: Event) => void;
142
+
143
+ // イベントタイプ
144
+ export type EventType = 'app.record.index.show'
145
+ | 'app.record.index.leave'
146
+ | 'app.record.detail.show'
147
+ | 'app.record.detail.delete.submit'
148
+ | 'app.record.detail.delete.submit.success'
149
+ | 'app.record.create.show'
150
+ | 'app.record.create.change'
151
+ | `app.record.create.change.${string}`
152
+ | 'app.record.create.submit'
153
+ | 'app.record.create.submit.success'
154
+ | 'app.record.edit.show'
155
+ | 'app.record.edit.change'
156
+ | `app.record.edit.change.${string}`
157
+ | 'app.record.edit.submit'
158
+ | 'app.record.edit.submit.success'
159
+ | 'app.record.lookup.error'
160
+ | 'portal.index.show';
161
+
162
+ // Events インターフェースの定義
163
+ export interface EventsInterface {
164
+ /**
165
+ * イベントハンドラーを登録
166
+ * @param types - イベントの種類(文字列 or 文字列配列)
167
+ * @param handler - イベント発火時に実行する関数
168
+ */
169
+ on(types: EventType | EventType[], handler: EventHandler): void;
170
+
171
+ /**
172
+ * イベントハンドラーを削除
173
+ * @param types - 削除するイベントの種類(省略可)
174
+ */
175
+ off(types?: EventType | EventType[]): void;
176
+
177
+ /**
178
+ * イベントを発火
179
+ * @param type - イベントの種類
180
+ * @param options - イベントのオプション(デフォルト `{}`)
181
+ * @param callback - イベント完了後に実行する関数(オプション)
182
+ */
183
+ trigger(type: EventType, options?: IOptions, callback?: ICallback): Event | void;
184
+
185
+ /**
186
+ * すべてのイベントを削除
187
+ */
188
+ remove(): void;
189
+ }
190
+
191
+ export {};
@@ -1,29 +1,47 @@
1
- export interface FieldsInterface {
2
- /**
3
- * フィールドの情報を取得
4
- * @see {@link [@pocket JS-SDK](https://app000.at-pocket.com/developers/js-api/app/fields/func.get)}
5
- *
6
- * @param fieldUniqueId - フィールドのユニークID
7
- * @returns {string}
8
- */
9
- get(fieldUniqueId: string): string;
10
-
11
- /**
12
- * 指定したコンテナ内にフィールド選択のセレクトボックスを作成
13
- * @see {@link [@pocket JS-SDK](https://app000.at-pocket.com/developers/js-api/app/fields/func.get-field-select)}
14
- *
15
- * @param containerId - セレクトボックスを配置するコンテナのID
16
- * @param allowedFieldTypes - 許可するフィールドタイプの配列(オプション)
17
- * @returns {Promise<void>}
18
- */
19
- getFieldSelect(containerId: string, allowedFieldTypes?: string[]): Promise<void>;
20
-
21
- /**
22
- * URL から appId と pluginId を抽出
23
- * @see {@link [@pocket JS-SDK](https://app000.at-pocket.com/developers/js-api/app/fields/func.extractIds)}
24
- *
25
- * @param url - 対象URL
26
- * @returns { appId: number | null, pluginId: number | null }
27
- */
28
- extractIds(url: string): { appId: number | null; pluginId: number | null };
29
- }
1
+ import type { PublicFieldDefinition, PublicFieldMap } from "../types";
2
+
3
+ export interface FieldsInterface {
4
+ /**
5
+ * 指定フィールドUIDの公開定義を取得する(同期・現在のフォーム反映)。
6
+ *
7
+ * レコード画面(新規/編集/詳細)でのみ有効。フォーム未マウントの一覧/ポータル画面では
8
+ * null を返す(その場合は非同期の app.getFormFields() を使用)。
9
+ *
10
+ * トップレベルフィールドに加え、明細(SubTable)の列uidを指定した場合は、その列の
11
+ * 公開定義(属する明細フィールドのUID parentSubTableUid 付き)を返す。これにより
12
+ * app.record.*.change の changes.name(変更列のuid)から列情報を直接引ける。
13
+ * @see {@link [@pocket JS-SDK](https://app000.at-pocket.com/developers/js-api/app/fields/func.get)}
14
+ *
15
+ * @param fieldUid - フィールドUID(例 "field-2"。app.record.get() のキーと同じ。明細列のuidも可)
16
+ * @returns {PublicFieldDefinition | null}
17
+ */
18
+ get(fieldUid: string): PublicFieldDefinition | null;
19
+
20
+ /**
21
+ * 現在表示中のフォームの全フィールド定義を取得する(同期・現在のフォーム反映)。
22
+ *
23
+ * レコード画面でのみ応答者が存在する。フォーム未マウントの一覧/ポータル画面では {} を返す。
24
+ *
25
+ * @returns {PublicFieldMap} 公開フィールドマップ(fieldUid → 公開定義)
26
+ */
27
+ getAll(): PublicFieldMap;
28
+
29
+ /**
30
+ * 指定したコンテナ内にフィールド選択のセレクトボックスを作成
31
+ * @see {@link [@pocket JS-SDK](https://app000.at-pocket.com/developers/js-api/app/fields/func.get-field-select)}
32
+ *
33
+ * @param containerId - セレクトボックスを配置するコンテナのID
34
+ * @param allowedFieldTypes - 許可するフィールドタイプの配列(オプション)
35
+ * @returns {Promise<void>}
36
+ */
37
+ getFieldSelect(containerId: string, allowedFieldTypes?: string[]): Promise<void>;
38
+
39
+ /**
40
+ * URL から appId と pluginId を抽出
41
+ * @see {@link [@pocket JS-SDK](https://app000.at-pocket.com/developers/js-api/app/fields/func.extractIds)}
42
+ *
43
+ * @param url - 対象URL
44
+ * @returns { appId: number | null, pluginId: number | null }
45
+ */
46
+ extractIds(url: string): { appId: number | null; pluginId: number | null };
47
+ }