mixi2-js 1.2.1 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -16,8 +16,7 @@
16
16
  [![Node.js](https://img.shields.io/node/v/mixi2-js?color=339933&logo=nodedotjs&logoColor=white)](package.json)
17
17
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.9-3178C6?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
18
18
  [![Build](https://img.shields.io/github/actions/workflow/status/otoneko1102/mixi2-js/publish.yml?label=build&logo=github)](https://github.com/otoneko1102/mixi2-js/actions)
19
- [![ESLint](https://img.shields.io/badge/ESLint-enabled-4B32C3?logo=eslint&logoColor=white)](eslint.config.js)
20
- [![Prettier](https://img.shields.io/badge/Prettier-enabled-F7B93E?logo=prettier&logoColor=white)](https://prettier.io/)
19
+ [![Vite+](https://img.shields.io/badge/Vite%2B-enabled-646CFF?logo=vite&logoColor=white)](vite.config.ts)
21
20
 
22
21
  <div align="center">
23
22
 
@@ -50,23 +49,27 @@ ESM・CommonJS の両方に対応しています。TypeScript の型定義 (`.d.
50
49
 
51
50
  ## 機能概要
52
51
 
53
- | モジュール | 説明 |
54
- |---|---|
52
+ | モジュール | 説明 |
53
+ | --------------------- | ----------------------------------------------------------------------------------------------- |
55
54
  | `OAuth2Authenticator` | OAuth2 Client Credentials 認証(アクセストークンの取得・キャッシュ・有効期限 1 分前に自動更新) |
56
- | `Client` | gRPC API クライアント(8 つの RPC メソッドに対応) |
57
- | `WebhookServer` | HTTP Webhook サーバー(Ed25519 署名検証・Ping 自動応答) |
58
- | `StreamWatcher` | gRPC ストリーミング(指数バックオフによる自動再接続) |
55
+ | `Client` | gRPC API クライアント(8 つの RPC メソッドに対応) |
56
+ | `WebhookServer` | HTTP Webhook サーバー(Ed25519 署名検証・Ping 自動応答) |
57
+ | `StreamWatcher` | gRPC ストリーミング(指数バックオフによる自動再接続) |
59
58
 
60
59
  ### Helpers (拡張機能)
61
60
 
62
61
  `mixi2-js/helpers` は、公式 API 仕様には含まれない **SDK 独自の便利ユーティリティ**を提供します。
63
62
 
64
- | ヘルパー | 説明 |
65
- |---|---|
66
- | `EventRouter` | イベントタイプ別にハンドラを登録できるルーター |
67
- | `PostBuilder` | メソッドチェーンでポスト作成リクエストを組み立てるビルダー |
68
- | `MediaUploader` | メディアアップロードの開始〜完了待機を自動化 |
69
- | `ReasonFilter` | `EventReason` ベースでイベントをフィルタリング |
63
+ | ヘルパー | 説明 |
64
+ | ------------------- | ---------------------------------------------------------- |
65
+ | `EventRouter` | イベントタイプ別にハンドラを登録できるルーター |
66
+ | `PostBuilder` | メソッドチェーンでポスト作成リクエストを組み立てるビルダー |
67
+ | `MediaUploader` | メディアアップロードの開始〜完了待機を自動化 |
68
+ | `ReasonFilter` | `EventReason` ベースでイベントをフィルタリング |
69
+ | `EventDeduplicator` | Webhook リトライ等による重複イベントをスキップ |
70
+ | `EventLogger` | 受信イベントをログ出力するデバッグ用ミドルウェア |
71
+ | `TextSplitter` | 長いテキストを 149 文字制限内に自動分割 |
72
+ | `Address` | 公式エンドポイント URL を返すヘルパー |
70
73
 
71
74
  ---
72
75
 
@@ -0,0 +1,305 @@
1
+ //#region src/types.d.ts
2
+ declare enum EventType {
3
+ UNSPECIFIED = 0,
4
+ PING = 1,
5
+ POST_CREATED = 2,
6
+ CHAT_MESSAGE_RECEIVED = 4
7
+ }
8
+ declare enum EventReason {
9
+ UNSPECIFIED = 0,
10
+ PING = 1,
11
+ POST_REPLY = 2,
12
+ POST_MENTIONED = 3,
13
+ POST_QUOTED = 4,
14
+ DIRECT_MESSAGE_RECEIVED = 8
15
+ }
16
+ declare enum MediaType {
17
+ UNSPECIFIED = 0,
18
+ IMAGE = 1,
19
+ VIDEO = 2
20
+ }
21
+ declare enum PostMediaType {
22
+ UNSPECIFIED = 0,
23
+ IMAGE = 1,
24
+ VIDEO = 2
25
+ }
26
+ declare enum PostVisibility {
27
+ UNSPECIFIED = 0,
28
+ VISIBLE = 1,
29
+ INVISIBLE = 2
30
+ }
31
+ declare enum PostAccessLevel {
32
+ UNSPECIFIED = 0,
33
+ PUBLIC = 1,
34
+ PRIVATE = 2
35
+ }
36
+ declare enum PostMaskType {
37
+ UNSPECIFIED = 0,
38
+ SENSITIVE = 1,
39
+ SPOILER = 2
40
+ }
41
+ declare enum PostPublishingType {
42
+ UNSPECIFIED = 0,
43
+ NOT_PUBLISHING = 1
44
+ }
45
+ declare enum UserVisibility {
46
+ UNSPECIFIED = 0,
47
+ VISIBLE = 1,
48
+ INVISIBLE = 2
49
+ }
50
+ declare enum UserAccessLevel {
51
+ UNSPECIFIED = 0,
52
+ PUBLIC = 1,
53
+ PRIVATE = 2
54
+ }
55
+ declare enum LanguageCode {
56
+ UNSPECIFIED = 0,
57
+ JP = 1,
58
+ EN = 2
59
+ }
60
+ declare enum StampSetType {
61
+ UNSPECIFIED = 0,
62
+ DEFAULT = 1,
63
+ SEASONAL = 2
64
+ }
65
+ declare enum MediaUploadType {
66
+ UNSPECIFIED = 0,
67
+ IMAGE = 1,
68
+ VIDEO = 2
69
+ }
70
+ declare enum MediaUploadStatus {
71
+ UNSPECIFIED = 0,
72
+ UPLOAD_PENDING = 1,
73
+ PROCESSING = 2,
74
+ COMPLETED = 3,
75
+ FAILED = 4
76
+ }
77
+ interface UserAvatar {
78
+ largeImageUrl: string;
79
+ largeImageMimeType: string;
80
+ largeImageHeight: number;
81
+ largeImageWidth: number;
82
+ smallImageUrl: string;
83
+ smallImageMimeType: string;
84
+ smallImageHeight: number;
85
+ smallImageWidth: number;
86
+ }
87
+ interface User {
88
+ userId: string;
89
+ isDisabled: boolean;
90
+ name: string;
91
+ displayName: string;
92
+ profile: string;
93
+ userAvatar: UserAvatar | null;
94
+ visibility: UserVisibility;
95
+ accessLevel: UserAccessLevel;
96
+ }
97
+ interface MediaImage {
98
+ largeImageUrl: string;
99
+ largeImageMimeType: string;
100
+ largeImageHeight: number;
101
+ largeImageWidth: number;
102
+ smallImageUrl: string;
103
+ smallImageMimeType: string;
104
+ smallImageHeight: number;
105
+ smallImageWidth: number;
106
+ }
107
+ interface MediaVideo {
108
+ videoUrl: string;
109
+ videoMimeType: string;
110
+ videoHeight: number;
111
+ videoWidth: number;
112
+ previewImageUrl: string;
113
+ previewImageMimeType: string;
114
+ previewImageHeight: number;
115
+ previewImageWidth: number;
116
+ duration: number;
117
+ }
118
+ interface MediaStamp {
119
+ url: string;
120
+ mimeType: string;
121
+ height: number;
122
+ width: number;
123
+ }
124
+ interface Media {
125
+ mediaType: MediaType;
126
+ image?: MediaImage;
127
+ video?: MediaVideo;
128
+ }
129
+ interface PostMediaImage {
130
+ largeImageUrl: string;
131
+ largeImageMimeType: string;
132
+ largeImageHeight: number;
133
+ largeImageWidth: number;
134
+ smallImageUrl: string;
135
+ smallImageMimeType: string;
136
+ smallImageHeight: number;
137
+ smallImageWidth: number;
138
+ }
139
+ interface PostMediaVideo {
140
+ videoUrl: string;
141
+ videoMimeType: string;
142
+ videoHeight: number;
143
+ videoWidth: number;
144
+ previewImageUrl: string;
145
+ previewImageMimeType: string;
146
+ previewImageHeight: number;
147
+ previewImageWidth: number;
148
+ duration: number;
149
+ }
150
+ interface PostMedia {
151
+ mediaType: PostMediaType;
152
+ image?: PostMediaImage;
153
+ video?: PostMediaVideo;
154
+ }
155
+ interface PostMask {
156
+ maskType: PostMaskType;
157
+ caption: string;
158
+ }
159
+ interface PostStamp {
160
+ stamp: MediaStamp | null;
161
+ count: number;
162
+ }
163
+ interface Post {
164
+ postId: string;
165
+ isDeleted: boolean;
166
+ creatorId: string;
167
+ text: string;
168
+ createdAt: Date | null;
169
+ postMediaList: PostMedia[];
170
+ inReplyToPostId?: string;
171
+ postMask?: PostMask;
172
+ visibility: PostVisibility;
173
+ accessLevel: PostAccessLevel;
174
+ stamps: PostStamp[];
175
+ readerStampId?: string;
176
+ }
177
+ interface ChatMessage {
178
+ roomId: string;
179
+ messageId: string;
180
+ creatorId: string;
181
+ text: string;
182
+ createdAt: Date | null;
183
+ mediaList: Media[];
184
+ postId?: string;
185
+ }
186
+ interface OfficialStamp {
187
+ stampId: string;
188
+ index: number;
189
+ searchTags: string[];
190
+ url: string;
191
+ }
192
+ interface OfficialStampSet {
193
+ name: string;
194
+ spriteUrl: string;
195
+ stamps: OfficialStamp[];
196
+ stampSetId: string;
197
+ startAt?: Date;
198
+ endAt?: Date;
199
+ stampSetType: StampSetType;
200
+ }
201
+ interface PingEvent {}
202
+ interface PostCreatedEvent {
203
+ eventReasonList: EventReason[];
204
+ post: Post | null;
205
+ issuer: User | null;
206
+ }
207
+ interface ChatMessageReceivedEvent {
208
+ eventReasonList: EventReason[];
209
+ message: ChatMessage | null;
210
+ issuer: User | null;
211
+ }
212
+ interface Event {
213
+ eventId: string;
214
+ eventType: EventType;
215
+ pingEvent?: PingEvent;
216
+ postCreatedEvent?: PostCreatedEvent;
217
+ chatMessageReceivedEvent?: ChatMessageReceivedEvent;
218
+ }
219
+ interface CreatePostRequest {
220
+ text: string;
221
+ inReplyToPostId?: string;
222
+ quotedPostId?: string;
223
+ mediaIdList?: string[];
224
+ postMask?: PostMask;
225
+ publishingType?: PostPublishingType;
226
+ }
227
+ interface InitiatePostMediaUploadRequest {
228
+ contentType: string;
229
+ dataSize: number;
230
+ mediaType: MediaUploadType;
231
+ description?: string;
232
+ }
233
+ interface InitiatePostMediaUploadResponse {
234
+ mediaId: string;
235
+ uploadUrl: string;
236
+ }
237
+ interface GetPostMediaStatusResponse {
238
+ status: MediaUploadStatus;
239
+ }
240
+ type SendChatMessageRequest = {
241
+ roomId: string;
242
+ text: string;
243
+ mediaId?: string;
244
+ } | {
245
+ roomId: string;
246
+ text?: string;
247
+ mediaId: string;
248
+ };
249
+ interface GetStampsRequest {
250
+ officialStampLanguage?: LanguageCode;
251
+ }
252
+ //#endregion
253
+ //#region src/event.d.ts
254
+ interface EventHandler {
255
+ handle(event: Event): void | Promise<void>;
256
+ }
257
+ //#endregion
258
+ //#region src/auth.d.ts
259
+ interface Authenticator {
260
+ getAccessToken(): Promise<string>;
261
+ }
262
+ interface AuthenticatorOptions {
263
+ clientId: string;
264
+ clientSecret: string;
265
+ tokenUrl: string;
266
+ }
267
+ declare class OAuth2Authenticator implements Authenticator {
268
+ private readonly clientId;
269
+ private readonly clientSecret;
270
+ private readonly tokenUrl;
271
+ private accessToken;
272
+ private expiresAt;
273
+ private refreshPromise;
274
+ constructor(options: AuthenticatorOptions);
275
+ getAccessToken(): Promise<string>;
276
+ private refreshToken;
277
+ }
278
+ //#endregion
279
+ //#region src/client.d.ts
280
+ interface ClientOptions {
281
+ apiAddress: string;
282
+ authenticator: Authenticator;
283
+ authKey?: string;
284
+ }
285
+ declare class Client {
286
+ private readonly grpcClient;
287
+ private readonly authenticator;
288
+ private readonly authKey?;
289
+ constructor(options: ClientOptions);
290
+ getAccessToken(): Promise<string>;
291
+ private getMetadata;
292
+ private call;
293
+ getUsers(userIdList: string[]): Promise<User[]>;
294
+ getPosts(postIdList: string[]): Promise<Post[]>;
295
+ createPost(request: CreatePostRequest): Promise<Post>;
296
+ deletePost(postId: string): Promise<boolean>;
297
+ initiatePostMediaUpload(request: InitiatePostMediaUploadRequest): Promise<InitiatePostMediaUploadResponse>;
298
+ getPostMediaStatus(mediaId: string): Promise<GetPostMediaStatusResponse>;
299
+ sendChatMessage(request: SendChatMessageRequest): Promise<ChatMessage>;
300
+ getStamps(request?: GetStampsRequest): Promise<OfficialStampSet[]>;
301
+ addStampToPost(postId: string, stampId: string): Promise<Post>;
302
+ close(): void;
303
+ }
304
+ //#endregion
305
+ export { PostCreatedEvent as A, SendChatMessageRequest as B, MediaUploadType as C, PingEvent as D, OfficialStampSet as E, PostMediaType as F, UserVisibility as G, User as H, PostMediaVideo as I, PostPublishingType as L, PostMaskType as M, PostMedia as N, Post as O, PostMediaImage as P, PostStamp as R, MediaUploadStatus as S, OfficialStamp as T, UserAccessLevel as U, StampSetType as V, UserAvatar as W, LanguageCode as _, OAuth2Authenticator as a, MediaStamp as b, ChatMessageReceivedEvent as c, EventReason as d, EventType as f, InitiatePostMediaUploadResponse as g, InitiatePostMediaUploadRequest as h, AuthenticatorOptions as i, PostMask as j, PostAccessLevel as k, CreatePostRequest as l, GetStampsRequest as m, ClientOptions as n, EventHandler as o, GetPostMediaStatusResponse as p, Authenticator as r, ChatMessage as s, Client as t, Event as u, Media as v, MediaVideo as w, MediaType as x, MediaImage as y, PostVisibility as z };
@@ -0,0 +1,305 @@
1
+ //#region src/types.d.ts
2
+ declare enum EventType {
3
+ UNSPECIFIED = 0,
4
+ PING = 1,
5
+ POST_CREATED = 2,
6
+ CHAT_MESSAGE_RECEIVED = 4
7
+ }
8
+ declare enum EventReason {
9
+ UNSPECIFIED = 0,
10
+ PING = 1,
11
+ POST_REPLY = 2,
12
+ POST_MENTIONED = 3,
13
+ POST_QUOTED = 4,
14
+ DIRECT_MESSAGE_RECEIVED = 8
15
+ }
16
+ declare enum MediaType {
17
+ UNSPECIFIED = 0,
18
+ IMAGE = 1,
19
+ VIDEO = 2
20
+ }
21
+ declare enum PostMediaType {
22
+ UNSPECIFIED = 0,
23
+ IMAGE = 1,
24
+ VIDEO = 2
25
+ }
26
+ declare enum PostVisibility {
27
+ UNSPECIFIED = 0,
28
+ VISIBLE = 1,
29
+ INVISIBLE = 2
30
+ }
31
+ declare enum PostAccessLevel {
32
+ UNSPECIFIED = 0,
33
+ PUBLIC = 1,
34
+ PRIVATE = 2
35
+ }
36
+ declare enum PostMaskType {
37
+ UNSPECIFIED = 0,
38
+ SENSITIVE = 1,
39
+ SPOILER = 2
40
+ }
41
+ declare enum PostPublishingType {
42
+ UNSPECIFIED = 0,
43
+ NOT_PUBLISHING = 1
44
+ }
45
+ declare enum UserVisibility {
46
+ UNSPECIFIED = 0,
47
+ VISIBLE = 1,
48
+ INVISIBLE = 2
49
+ }
50
+ declare enum UserAccessLevel {
51
+ UNSPECIFIED = 0,
52
+ PUBLIC = 1,
53
+ PRIVATE = 2
54
+ }
55
+ declare enum LanguageCode {
56
+ UNSPECIFIED = 0,
57
+ JP = 1,
58
+ EN = 2
59
+ }
60
+ declare enum StampSetType {
61
+ UNSPECIFIED = 0,
62
+ DEFAULT = 1,
63
+ SEASONAL = 2
64
+ }
65
+ declare enum MediaUploadType {
66
+ UNSPECIFIED = 0,
67
+ IMAGE = 1,
68
+ VIDEO = 2
69
+ }
70
+ declare enum MediaUploadStatus {
71
+ UNSPECIFIED = 0,
72
+ UPLOAD_PENDING = 1,
73
+ PROCESSING = 2,
74
+ COMPLETED = 3,
75
+ FAILED = 4
76
+ }
77
+ interface UserAvatar {
78
+ largeImageUrl: string;
79
+ largeImageMimeType: string;
80
+ largeImageHeight: number;
81
+ largeImageWidth: number;
82
+ smallImageUrl: string;
83
+ smallImageMimeType: string;
84
+ smallImageHeight: number;
85
+ smallImageWidth: number;
86
+ }
87
+ interface User {
88
+ userId: string;
89
+ isDisabled: boolean;
90
+ name: string;
91
+ displayName: string;
92
+ profile: string;
93
+ userAvatar: UserAvatar | null;
94
+ visibility: UserVisibility;
95
+ accessLevel: UserAccessLevel;
96
+ }
97
+ interface MediaImage {
98
+ largeImageUrl: string;
99
+ largeImageMimeType: string;
100
+ largeImageHeight: number;
101
+ largeImageWidth: number;
102
+ smallImageUrl: string;
103
+ smallImageMimeType: string;
104
+ smallImageHeight: number;
105
+ smallImageWidth: number;
106
+ }
107
+ interface MediaVideo {
108
+ videoUrl: string;
109
+ videoMimeType: string;
110
+ videoHeight: number;
111
+ videoWidth: number;
112
+ previewImageUrl: string;
113
+ previewImageMimeType: string;
114
+ previewImageHeight: number;
115
+ previewImageWidth: number;
116
+ duration: number;
117
+ }
118
+ interface MediaStamp {
119
+ url: string;
120
+ mimeType: string;
121
+ height: number;
122
+ width: number;
123
+ }
124
+ interface Media {
125
+ mediaType: MediaType;
126
+ image?: MediaImage;
127
+ video?: MediaVideo;
128
+ }
129
+ interface PostMediaImage {
130
+ largeImageUrl: string;
131
+ largeImageMimeType: string;
132
+ largeImageHeight: number;
133
+ largeImageWidth: number;
134
+ smallImageUrl: string;
135
+ smallImageMimeType: string;
136
+ smallImageHeight: number;
137
+ smallImageWidth: number;
138
+ }
139
+ interface PostMediaVideo {
140
+ videoUrl: string;
141
+ videoMimeType: string;
142
+ videoHeight: number;
143
+ videoWidth: number;
144
+ previewImageUrl: string;
145
+ previewImageMimeType: string;
146
+ previewImageHeight: number;
147
+ previewImageWidth: number;
148
+ duration: number;
149
+ }
150
+ interface PostMedia {
151
+ mediaType: PostMediaType;
152
+ image?: PostMediaImage;
153
+ video?: PostMediaVideo;
154
+ }
155
+ interface PostMask {
156
+ maskType: PostMaskType;
157
+ caption: string;
158
+ }
159
+ interface PostStamp {
160
+ stamp: MediaStamp | null;
161
+ count: number;
162
+ }
163
+ interface Post {
164
+ postId: string;
165
+ isDeleted: boolean;
166
+ creatorId: string;
167
+ text: string;
168
+ createdAt: Date | null;
169
+ postMediaList: PostMedia[];
170
+ inReplyToPostId?: string;
171
+ postMask?: PostMask;
172
+ visibility: PostVisibility;
173
+ accessLevel: PostAccessLevel;
174
+ stamps: PostStamp[];
175
+ readerStampId?: string;
176
+ }
177
+ interface ChatMessage {
178
+ roomId: string;
179
+ messageId: string;
180
+ creatorId: string;
181
+ text: string;
182
+ createdAt: Date | null;
183
+ mediaList: Media[];
184
+ postId?: string;
185
+ }
186
+ interface OfficialStamp {
187
+ stampId: string;
188
+ index: number;
189
+ searchTags: string[];
190
+ url: string;
191
+ }
192
+ interface OfficialStampSet {
193
+ name: string;
194
+ spriteUrl: string;
195
+ stamps: OfficialStamp[];
196
+ stampSetId: string;
197
+ startAt?: Date;
198
+ endAt?: Date;
199
+ stampSetType: StampSetType;
200
+ }
201
+ interface PingEvent {}
202
+ interface PostCreatedEvent {
203
+ eventReasonList: EventReason[];
204
+ post: Post | null;
205
+ issuer: User | null;
206
+ }
207
+ interface ChatMessageReceivedEvent {
208
+ eventReasonList: EventReason[];
209
+ message: ChatMessage | null;
210
+ issuer: User | null;
211
+ }
212
+ interface Event {
213
+ eventId: string;
214
+ eventType: EventType;
215
+ pingEvent?: PingEvent;
216
+ postCreatedEvent?: PostCreatedEvent;
217
+ chatMessageReceivedEvent?: ChatMessageReceivedEvent;
218
+ }
219
+ interface CreatePostRequest {
220
+ text: string;
221
+ inReplyToPostId?: string;
222
+ quotedPostId?: string;
223
+ mediaIdList?: string[];
224
+ postMask?: PostMask;
225
+ publishingType?: PostPublishingType;
226
+ }
227
+ interface InitiatePostMediaUploadRequest {
228
+ contentType: string;
229
+ dataSize: number;
230
+ mediaType: MediaUploadType;
231
+ description?: string;
232
+ }
233
+ interface InitiatePostMediaUploadResponse {
234
+ mediaId: string;
235
+ uploadUrl: string;
236
+ }
237
+ interface GetPostMediaStatusResponse {
238
+ status: MediaUploadStatus;
239
+ }
240
+ type SendChatMessageRequest = {
241
+ roomId: string;
242
+ text: string;
243
+ mediaId?: string;
244
+ } | {
245
+ roomId: string;
246
+ text?: string;
247
+ mediaId: string;
248
+ };
249
+ interface GetStampsRequest {
250
+ officialStampLanguage?: LanguageCode;
251
+ }
252
+ //#endregion
253
+ //#region src/event.d.ts
254
+ interface EventHandler {
255
+ handle(event: Event): void | Promise<void>;
256
+ }
257
+ //#endregion
258
+ //#region src/auth.d.ts
259
+ interface Authenticator {
260
+ getAccessToken(): Promise<string>;
261
+ }
262
+ interface AuthenticatorOptions {
263
+ clientId: string;
264
+ clientSecret: string;
265
+ tokenUrl: string;
266
+ }
267
+ declare class OAuth2Authenticator implements Authenticator {
268
+ private readonly clientId;
269
+ private readonly clientSecret;
270
+ private readonly tokenUrl;
271
+ private accessToken;
272
+ private expiresAt;
273
+ private refreshPromise;
274
+ constructor(options: AuthenticatorOptions);
275
+ getAccessToken(): Promise<string>;
276
+ private refreshToken;
277
+ }
278
+ //#endregion
279
+ //#region src/client.d.ts
280
+ interface ClientOptions {
281
+ apiAddress: string;
282
+ authenticator: Authenticator;
283
+ authKey?: string;
284
+ }
285
+ declare class Client {
286
+ private readonly grpcClient;
287
+ private readonly authenticator;
288
+ private readonly authKey?;
289
+ constructor(options: ClientOptions);
290
+ getAccessToken(): Promise<string>;
291
+ private getMetadata;
292
+ private call;
293
+ getUsers(userIdList: string[]): Promise<User[]>;
294
+ getPosts(postIdList: string[]): Promise<Post[]>;
295
+ createPost(request: CreatePostRequest): Promise<Post>;
296
+ deletePost(postId: string): Promise<boolean>;
297
+ initiatePostMediaUpload(request: InitiatePostMediaUploadRequest): Promise<InitiatePostMediaUploadResponse>;
298
+ getPostMediaStatus(mediaId: string): Promise<GetPostMediaStatusResponse>;
299
+ sendChatMessage(request: SendChatMessageRequest): Promise<ChatMessage>;
300
+ getStamps(request?: GetStampsRequest): Promise<OfficialStampSet[]>;
301
+ addStampToPost(postId: string, stampId: string): Promise<Post>;
302
+ close(): void;
303
+ }
304
+ //#endregion
305
+ export { PostCreatedEvent as A, SendChatMessageRequest as B, MediaUploadType as C, PingEvent as D, OfficialStampSet as E, PostMediaType as F, UserVisibility as G, User as H, PostMediaVideo as I, PostPublishingType as L, PostMaskType as M, PostMedia as N, Post as O, PostMediaImage as P, PostStamp as R, MediaUploadStatus as S, OfficialStamp as T, UserAccessLevel as U, StampSetType as V, UserAvatar as W, LanguageCode as _, OAuth2Authenticator as a, MediaStamp as b, ChatMessageReceivedEvent as c, EventReason as d, EventType as f, InitiatePostMediaUploadResponse as g, InitiatePostMediaUploadRequest as h, AuthenticatorOptions as i, PostMask as j, PostAccessLevel as k, CreatePostRequest as l, GetStampsRequest as m, ClientOptions as n, EventHandler as o, GetPostMediaStatusResponse as p, Authenticator as r, ChatMessage as s, Client as t, Event as u, Media as v, MediaVideo as w, MediaType as x, MediaImage as y, PostVisibility as z };