@myronsi/messenger-api 2.1.0-alpha.45 → 2.1.0-alpha.46.next.165
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/CHANGELOG.md +18 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/openapi.yaml +417 -4
- package/dist/schema.d.ts +592 -3
- package/dist/ws-docs.json +25 -1
- package/dist/ws-events.d.ts +90 -2
- package/dist/ws-events.schema.json +562 -5
- package/package.json +1 -1
|
@@ -3063,7 +3063,7 @@
|
|
|
3063
3063
|
"type",
|
|
3064
3064
|
"chat_id"
|
|
3065
3065
|
],
|
|
3066
|
-
"description": "`message_updated` carries the message as the caller sees it now (`message`). `message_deleted` names the\nmessage and its `scope`. `pins_changed`: load the pins of the chat again. `history_cleared`: drop the\nmessages up to and including `before_message_id` (`scope` says for whom). `chat_hidden`: the caller\ndeleted the chat for themselves up to `before_message_id`.\n",
|
|
3066
|
+
"description": "`message_updated` carries the message as the caller sees it now (`message`). `message_deleted` names the\nmessage and its `scope`. `pins_changed`: load the pins of the chat again. `history_cleared`: drop the\nmessages up to and including `before_message_id` (`scope` says for whom). `chat_hidden`: the caller\ndeleted the chat for themselves up to `before_message_id`.\n`history_imported`: an imported history was added, removed or a sender confirmed; load the chat again.\n",
|
|
3067
3067
|
"properties": {
|
|
3068
3068
|
"type": {
|
|
3069
3069
|
"type": "string",
|
|
@@ -3072,7 +3072,8 @@
|
|
|
3072
3072
|
"message_deleted",
|
|
3073
3073
|
"pins_changed",
|
|
3074
3074
|
"history_cleared",
|
|
3075
|
-
"chat_hidden"
|
|
3075
|
+
"chat_hidden",
|
|
3076
|
+
"history_imported"
|
|
3076
3077
|
]
|
|
3077
3078
|
},
|
|
3078
3079
|
"chat_id": {
|
|
@@ -3221,7 +3222,12 @@
|
|
|
3221
3222
|
}
|
|
3222
3223
|
},
|
|
3223
3224
|
"created_at": {
|
|
3224
|
-
"
|
|
3225
|
+
"description": "When the message was sent; for an imported message, when it was sent in the other messenger.",
|
|
3226
|
+
"allOf": [
|
|
3227
|
+
{
|
|
3228
|
+
"$ref": "#/$defs/Timestamp"
|
|
3229
|
+
}
|
|
3230
|
+
]
|
|
3225
3231
|
},
|
|
3226
3232
|
"edited_at": {
|
|
3227
3233
|
"oneOf": [
|
|
@@ -3236,6 +3242,9 @@
|
|
|
3236
3242
|
"is_deleted": {
|
|
3237
3243
|
"type": "boolean"
|
|
3238
3244
|
},
|
|
3245
|
+
"import": {
|
|
3246
|
+
"$ref": "#/$defs/MessageImport"
|
|
3247
|
+
},
|
|
3239
3248
|
"removed_by_moderation": {
|
|
3240
3249
|
"type": "boolean",
|
|
3241
3250
|
"description": "`true` when moderation removed the message; it is then also `is_deleted`. Clients show \"Removed by\nmoderation\" instead of the deleted placeholder. Absent otherwise.\n"
|
|
@@ -3353,12 +3362,15 @@
|
|
|
3353
3362
|
"member_left",
|
|
3354
3363
|
"call",
|
|
3355
3364
|
"message_pinned",
|
|
3356
|
-
"message_unpinned"
|
|
3365
|
+
"message_unpinned",
|
|
3366
|
+
"history_imported",
|
|
3367
|
+
"history_import_ended",
|
|
3368
|
+
"imported_note"
|
|
3357
3369
|
]
|
|
3358
3370
|
},
|
|
3359
3371
|
"SystemEvent": {
|
|
3360
3372
|
"type": "object",
|
|
3361
|
-
"description": "What a `system` message records; set on system messages only, whose `content` is then `null`. The names\nare the display names at the time of the event. `target` fields are set for `member_added` and\n`member_removed`. `call` is set for `call` messages: one per call, posted when the call ends, `actor` is the\ninitiator. `message_id` and `snippet` are set for `message_pinned` and `message_unpinned`.\n",
|
|
3373
|
+
"description": "What a `system` message records; set on system messages only, whose `content` is then `null`. The names\nare the display names at the time of the event. `target` fields are set for `member_added` and\n`member_removed`. `call` is set for `call` messages: one per call, posted when the call ends, `actor` is the\ninitiator. `message_id` and `snippet` are set for `message_pinned` and `message_unpinned`.\n`history_imported` opens and `history_import_ended` closes an imported history; both carry `import`, and\n`actor` is the importer. `imported_note` is a line of the export that is not a message; its text is `text`.\n",
|
|
3362
3374
|
"required": [
|
|
3363
3375
|
"kind",
|
|
3364
3376
|
"actor_id",
|
|
@@ -3405,6 +3417,14 @@
|
|
|
3405
3417
|
},
|
|
3406
3418
|
"message_type": {
|
|
3407
3419
|
"$ref": "#/$defs/MessageType"
|
|
3420
|
+
},
|
|
3421
|
+
"import": {
|
|
3422
|
+
"$ref": "#/$defs/ImportSummary"
|
|
3423
|
+
},
|
|
3424
|
+
"text": {
|
|
3425
|
+
"type": "string",
|
|
3426
|
+
"maxLength": 4096,
|
|
3427
|
+
"description": "The line of the export, for `imported_note`."
|
|
3408
3428
|
}
|
|
3409
3429
|
}
|
|
3410
3430
|
},
|
|
@@ -4142,6 +4162,439 @@
|
|
|
4142
4162
|
}
|
|
4143
4163
|
}
|
|
4144
4164
|
},
|
|
4165
|
+
"ImportSource": {
|
|
4166
|
+
"type": "string",
|
|
4167
|
+
"enum": [
|
|
4168
|
+
"telegram",
|
|
4169
|
+
"whatsapp"
|
|
4170
|
+
]
|
|
4171
|
+
},
|
|
4172
|
+
"ChatImportState": {
|
|
4173
|
+
"type": "string",
|
|
4174
|
+
"description": "`running`: messages are being added. `done`: finished. `removing`: being removed.",
|
|
4175
|
+
"enum": [
|
|
4176
|
+
"running",
|
|
4177
|
+
"done",
|
|
4178
|
+
"removing"
|
|
4179
|
+
]
|
|
4180
|
+
},
|
|
4181
|
+
"ImportSenderKey": {
|
|
4182
|
+
"type": "string",
|
|
4183
|
+
"description": "The client's key for one name of the export.",
|
|
4184
|
+
"pattern": "^[A-Za-z0-9_-]{1,64}$"
|
|
4185
|
+
},
|
|
4186
|
+
"ImportSenderState": {
|
|
4187
|
+
"type": "string",
|
|
4188
|
+
"description": "`me`: the importer's own messages. `unassigned`: shown as text. `pending`: suggested for `user_id`, who has\nnot answered. `confirmed`: `user_id` confirmed; the messages show their account. `declined`: the suggested\nmember said no; shown as text.\n",
|
|
4189
|
+
"enum": [
|
|
4190
|
+
"me",
|
|
4191
|
+
"unassigned",
|
|
4192
|
+
"pending",
|
|
4193
|
+
"confirmed",
|
|
4194
|
+
"declined"
|
|
4195
|
+
]
|
|
4196
|
+
},
|
|
4197
|
+
"ChatImportSender": {
|
|
4198
|
+
"type": "object",
|
|
4199
|
+
"required": [
|
|
4200
|
+
"key",
|
|
4201
|
+
"name",
|
|
4202
|
+
"message_count",
|
|
4203
|
+
"state",
|
|
4204
|
+
"user_id"
|
|
4205
|
+
],
|
|
4206
|
+
"properties": {
|
|
4207
|
+
"key": {
|
|
4208
|
+
"$ref": "#/$defs/ImportSenderKey"
|
|
4209
|
+
},
|
|
4210
|
+
"name": {
|
|
4211
|
+
"type": "string",
|
|
4212
|
+
"minLength": 1,
|
|
4213
|
+
"maxLength": 128
|
|
4214
|
+
},
|
|
4215
|
+
"message_count": {
|
|
4216
|
+
"type": "integer",
|
|
4217
|
+
"minimum": 0
|
|
4218
|
+
},
|
|
4219
|
+
"state": {
|
|
4220
|
+
"$ref": "#/$defs/ImportSenderState"
|
|
4221
|
+
},
|
|
4222
|
+
"user_id": {
|
|
4223
|
+
"oneOf": [
|
|
4224
|
+
{
|
|
4225
|
+
"$ref": "#/$defs/Id"
|
|
4226
|
+
},
|
|
4227
|
+
{
|
|
4228
|
+
"type": "null"
|
|
4229
|
+
}
|
|
4230
|
+
]
|
|
4231
|
+
}
|
|
4232
|
+
}
|
|
4233
|
+
},
|
|
4234
|
+
"ChatImport": {
|
|
4235
|
+
"type": "object",
|
|
4236
|
+
"required": [
|
|
4237
|
+
"id",
|
|
4238
|
+
"chat_id",
|
|
4239
|
+
"source",
|
|
4240
|
+
"state",
|
|
4241
|
+
"message_count",
|
|
4242
|
+
"file_count",
|
|
4243
|
+
"first_at",
|
|
4244
|
+
"last_at",
|
|
4245
|
+
"next_index",
|
|
4246
|
+
"imported_by",
|
|
4247
|
+
"created_at",
|
|
4248
|
+
"finished_at",
|
|
4249
|
+
"senders"
|
|
4250
|
+
],
|
|
4251
|
+
"properties": {
|
|
4252
|
+
"id": {
|
|
4253
|
+
"$ref": "#/$defs/Id"
|
|
4254
|
+
},
|
|
4255
|
+
"chat_id": {
|
|
4256
|
+
"$ref": "#/$defs/Id"
|
|
4257
|
+
},
|
|
4258
|
+
"source": {
|
|
4259
|
+
"$ref": "#/$defs/ImportSource"
|
|
4260
|
+
},
|
|
4261
|
+
"state": {
|
|
4262
|
+
"$ref": "#/$defs/ChatImportState"
|
|
4263
|
+
},
|
|
4264
|
+
"message_count": {
|
|
4265
|
+
"type": "integer",
|
|
4266
|
+
"minimum": 1,
|
|
4267
|
+
"maximum": 100000
|
|
4268
|
+
},
|
|
4269
|
+
"file_count": {
|
|
4270
|
+
"type": "integer",
|
|
4271
|
+
"minimum": 0,
|
|
4272
|
+
"maximum": 5000
|
|
4273
|
+
},
|
|
4274
|
+
"first_at": {
|
|
4275
|
+
"$ref": "#/$defs/Timestamp"
|
|
4276
|
+
},
|
|
4277
|
+
"last_at": {
|
|
4278
|
+
"$ref": "#/$defs/Timestamp"
|
|
4279
|
+
},
|
|
4280
|
+
"next_index": {
|
|
4281
|
+
"type": "integer",
|
|
4282
|
+
"minimum": 0,
|
|
4283
|
+
"description": "How many messages are stored; the `from_index` of the next batch."
|
|
4284
|
+
},
|
|
4285
|
+
"imported_by": {
|
|
4286
|
+
"oneOf": [
|
|
4287
|
+
{
|
|
4288
|
+
"$ref": "#/$defs/Id"
|
|
4289
|
+
},
|
|
4290
|
+
{
|
|
4291
|
+
"type": "null"
|
|
4292
|
+
}
|
|
4293
|
+
]
|
|
4294
|
+
},
|
|
4295
|
+
"created_at": {
|
|
4296
|
+
"$ref": "#/$defs/Timestamp"
|
|
4297
|
+
},
|
|
4298
|
+
"finished_at": {
|
|
4299
|
+
"oneOf": [
|
|
4300
|
+
{
|
|
4301
|
+
"$ref": "#/$defs/Timestamp"
|
|
4302
|
+
},
|
|
4303
|
+
{
|
|
4304
|
+
"type": "null"
|
|
4305
|
+
}
|
|
4306
|
+
]
|
|
4307
|
+
},
|
|
4308
|
+
"senders": {
|
|
4309
|
+
"type": "array",
|
|
4310
|
+
"items": {
|
|
4311
|
+
"$ref": "#/$defs/ChatImportSender"
|
|
4312
|
+
}
|
|
4313
|
+
}
|
|
4314
|
+
}
|
|
4315
|
+
},
|
|
4316
|
+
"ChatImportList": {
|
|
4317
|
+
"type": "object",
|
|
4318
|
+
"required": [
|
|
4319
|
+
"items"
|
|
4320
|
+
],
|
|
4321
|
+
"properties": {
|
|
4322
|
+
"items": {
|
|
4323
|
+
"type": "array",
|
|
4324
|
+
"items": {
|
|
4325
|
+
"$ref": "#/$defs/ChatImport"
|
|
4326
|
+
}
|
|
4327
|
+
}
|
|
4328
|
+
}
|
|
4329
|
+
},
|
|
4330
|
+
"StartChatImportSender": {
|
|
4331
|
+
"type": "object",
|
|
4332
|
+
"required": [
|
|
4333
|
+
"key",
|
|
4334
|
+
"name",
|
|
4335
|
+
"message_count"
|
|
4336
|
+
],
|
|
4337
|
+
"properties": {
|
|
4338
|
+
"key": {
|
|
4339
|
+
"$ref": "#/$defs/ImportSenderKey"
|
|
4340
|
+
},
|
|
4341
|
+
"name": {
|
|
4342
|
+
"type": "string",
|
|
4343
|
+
"minLength": 1,
|
|
4344
|
+
"maxLength": 128
|
|
4345
|
+
},
|
|
4346
|
+
"message_count": {
|
|
4347
|
+
"type": "integer",
|
|
4348
|
+
"minimum": 0
|
|
4349
|
+
},
|
|
4350
|
+
"me": {
|
|
4351
|
+
"type": "boolean",
|
|
4352
|
+
"description": "The caller's own messages; at most one sender."
|
|
4353
|
+
},
|
|
4354
|
+
"user_id": {
|
|
4355
|
+
"description": "A member of the chat suggested for this name; not with `me`.",
|
|
4356
|
+
"allOf": [
|
|
4357
|
+
{
|
|
4358
|
+
"$ref": "#/$defs/Id"
|
|
4359
|
+
}
|
|
4360
|
+
]
|
|
4361
|
+
}
|
|
4362
|
+
}
|
|
4363
|
+
},
|
|
4364
|
+
"StartChatImportRequest": {
|
|
4365
|
+
"type": "object",
|
|
4366
|
+
"required": [
|
|
4367
|
+
"source",
|
|
4368
|
+
"message_count",
|
|
4369
|
+
"file_count",
|
|
4370
|
+
"first_at",
|
|
4371
|
+
"last_at",
|
|
4372
|
+
"senders"
|
|
4373
|
+
],
|
|
4374
|
+
"properties": {
|
|
4375
|
+
"source": {
|
|
4376
|
+
"$ref": "#/$defs/ImportSource"
|
|
4377
|
+
},
|
|
4378
|
+
"message_count": {
|
|
4379
|
+
"type": "integer",
|
|
4380
|
+
"minimum": 1,
|
|
4381
|
+
"maximum": 100000
|
|
4382
|
+
},
|
|
4383
|
+
"file_count": {
|
|
4384
|
+
"type": "integer",
|
|
4385
|
+
"minimum": 0,
|
|
4386
|
+
"maximum": 5000
|
|
4387
|
+
},
|
|
4388
|
+
"first_at": {
|
|
4389
|
+
"$ref": "#/$defs/Timestamp"
|
|
4390
|
+
},
|
|
4391
|
+
"last_at": {
|
|
4392
|
+
"$ref": "#/$defs/Timestamp"
|
|
4393
|
+
},
|
|
4394
|
+
"senders": {
|
|
4395
|
+
"type": "array",
|
|
4396
|
+
"minItems": 1,
|
|
4397
|
+
"maxItems": 200,
|
|
4398
|
+
"items": {
|
|
4399
|
+
"$ref": "#/$defs/StartChatImportSender"
|
|
4400
|
+
}
|
|
4401
|
+
}
|
|
4402
|
+
}
|
|
4403
|
+
},
|
|
4404
|
+
"ImportedMessageType": {
|
|
4405
|
+
"type": "string",
|
|
4406
|
+
"description": "`note`: a line of the export that is not a message (for example that someone joined), shown as a system message.",
|
|
4407
|
+
"enum": [
|
|
4408
|
+
"text",
|
|
4409
|
+
"file",
|
|
4410
|
+
"voice",
|
|
4411
|
+
"note"
|
|
4412
|
+
]
|
|
4413
|
+
},
|
|
4414
|
+
"ImportedMessage": {
|
|
4415
|
+
"type": "object",
|
|
4416
|
+
"required": [
|
|
4417
|
+
"index",
|
|
4418
|
+
"original_at",
|
|
4419
|
+
"type"
|
|
4420
|
+
],
|
|
4421
|
+
"properties": {
|
|
4422
|
+
"index": {
|
|
4423
|
+
"type": "integer",
|
|
4424
|
+
"minimum": 0,
|
|
4425
|
+
"description": "Position in the import, counting from 0 without gaps."
|
|
4426
|
+
},
|
|
4427
|
+
"sender_key": {
|
|
4428
|
+
"description": "Required except for `note`.",
|
|
4429
|
+
"allOf": [
|
|
4430
|
+
{
|
|
4431
|
+
"$ref": "#/$defs/ImportSenderKey"
|
|
4432
|
+
}
|
|
4433
|
+
]
|
|
4434
|
+
},
|
|
4435
|
+
"original_at": {
|
|
4436
|
+
"description": "When the message was sent in the other messenger; between the import's `first_at` and `last_at`.",
|
|
4437
|
+
"allOf": [
|
|
4438
|
+
{
|
|
4439
|
+
"$ref": "#/$defs/Timestamp"
|
|
4440
|
+
}
|
|
4441
|
+
]
|
|
4442
|
+
},
|
|
4443
|
+
"type": {
|
|
4444
|
+
"$ref": "#/$defs/ImportedMessageType"
|
|
4445
|
+
},
|
|
4446
|
+
"content": {
|
|
4447
|
+
"type": [
|
|
4448
|
+
"string",
|
|
4449
|
+
"null"
|
|
4450
|
+
],
|
|
4451
|
+
"maxLength": 4096
|
|
4452
|
+
},
|
|
4453
|
+
"attachment_ids": {
|
|
4454
|
+
"type": "array",
|
|
4455
|
+
"description": "The importer's uploads; two to ten images or videos make an album.",
|
|
4456
|
+
"minItems": 1,
|
|
4457
|
+
"maxItems": 10,
|
|
4458
|
+
"uniqueItems": true,
|
|
4459
|
+
"items": {
|
|
4460
|
+
"$ref": "#/$defs/AttachmentRef"
|
|
4461
|
+
}
|
|
4462
|
+
},
|
|
4463
|
+
"reply_to_index": {
|
|
4464
|
+
"type": "integer",
|
|
4465
|
+
"minimum": 0,
|
|
4466
|
+
"description": "`index` of an earlier message of the import that this one answers."
|
|
4467
|
+
}
|
|
4468
|
+
}
|
|
4469
|
+
},
|
|
4470
|
+
"AddImportedMessagesRequest": {
|
|
4471
|
+
"type": "object",
|
|
4472
|
+
"required": [
|
|
4473
|
+
"from_index",
|
|
4474
|
+
"messages"
|
|
4475
|
+
],
|
|
4476
|
+
"properties": {
|
|
4477
|
+
"from_index": {
|
|
4478
|
+
"type": "integer",
|
|
4479
|
+
"minimum": 0
|
|
4480
|
+
},
|
|
4481
|
+
"messages": {
|
|
4482
|
+
"type": "array",
|
|
4483
|
+
"minItems": 1,
|
|
4484
|
+
"maxItems": 500,
|
|
4485
|
+
"items": {
|
|
4486
|
+
"$ref": "#/$defs/ImportedMessage"
|
|
4487
|
+
}
|
|
4488
|
+
}
|
|
4489
|
+
}
|
|
4490
|
+
},
|
|
4491
|
+
"ImportProgress": {
|
|
4492
|
+
"type": "object",
|
|
4493
|
+
"required": [
|
|
4494
|
+
"next_index"
|
|
4495
|
+
],
|
|
4496
|
+
"properties": {
|
|
4497
|
+
"next_index": {
|
|
4498
|
+
"type": "integer",
|
|
4499
|
+
"minimum": 0
|
|
4500
|
+
}
|
|
4501
|
+
}
|
|
4502
|
+
},
|
|
4503
|
+
"AssignImportSenderRequest": {
|
|
4504
|
+
"type": "object",
|
|
4505
|
+
"required": [
|
|
4506
|
+
"user_id"
|
|
4507
|
+
],
|
|
4508
|
+
"properties": {
|
|
4509
|
+
"user_id": {
|
|
4510
|
+
"oneOf": [
|
|
4511
|
+
{
|
|
4512
|
+
"$ref": "#/$defs/Id"
|
|
4513
|
+
},
|
|
4514
|
+
{
|
|
4515
|
+
"type": "null"
|
|
4516
|
+
}
|
|
4517
|
+
]
|
|
4518
|
+
}
|
|
4519
|
+
}
|
|
4520
|
+
},
|
|
4521
|
+
"DecideImportSenderRequest": {
|
|
4522
|
+
"type": "object",
|
|
4523
|
+
"required": [
|
|
4524
|
+
"decision"
|
|
4525
|
+
],
|
|
4526
|
+
"properties": {
|
|
4527
|
+
"decision": {
|
|
4528
|
+
"type": "string",
|
|
4529
|
+
"enum": [
|
|
4530
|
+
"confirm",
|
|
4531
|
+
"decline",
|
|
4532
|
+
"withdraw"
|
|
4533
|
+
]
|
|
4534
|
+
}
|
|
4535
|
+
}
|
|
4536
|
+
},
|
|
4537
|
+
"MessageImport": {
|
|
4538
|
+
"type": "object",
|
|
4539
|
+
"description": "Set on messages that came from an import.",
|
|
4540
|
+
"required": [
|
|
4541
|
+
"import_id",
|
|
4542
|
+
"source",
|
|
4543
|
+
"original_at"
|
|
4544
|
+
],
|
|
4545
|
+
"properties": {
|
|
4546
|
+
"import_id": {
|
|
4547
|
+
"$ref": "#/$defs/Id"
|
|
4548
|
+
},
|
|
4549
|
+
"source": {
|
|
4550
|
+
"$ref": "#/$defs/ImportSource"
|
|
4551
|
+
},
|
|
4552
|
+
"original_at": {
|
|
4553
|
+
"$ref": "#/$defs/Timestamp"
|
|
4554
|
+
},
|
|
4555
|
+
"sender_name": {
|
|
4556
|
+
"type": "string",
|
|
4557
|
+
"description": "The name in the export; absent on system messages."
|
|
4558
|
+
},
|
|
4559
|
+
"sender_state": {
|
|
4560
|
+
"type": "string",
|
|
4561
|
+
"description": "`me`: the importer's own message, `sender` is the importer. `confirmed`: the member confirmed the name,\n`sender` is that member. `unconfirmed`: `sender` is `null`; show `sender_name` as text. Absent on system\nmessages.\n",
|
|
4562
|
+
"enum": [
|
|
4563
|
+
"me",
|
|
4564
|
+
"confirmed",
|
|
4565
|
+
"unconfirmed"
|
|
4566
|
+
]
|
|
4567
|
+
}
|
|
4568
|
+
}
|
|
4569
|
+
},
|
|
4570
|
+
"ImportSummary": {
|
|
4571
|
+
"type": "object",
|
|
4572
|
+
"required": [
|
|
4573
|
+
"import_id",
|
|
4574
|
+
"source",
|
|
4575
|
+
"message_count",
|
|
4576
|
+
"first_at",
|
|
4577
|
+
"last_at"
|
|
4578
|
+
],
|
|
4579
|
+
"properties": {
|
|
4580
|
+
"import_id": {
|
|
4581
|
+
"$ref": "#/$defs/Id"
|
|
4582
|
+
},
|
|
4583
|
+
"source": {
|
|
4584
|
+
"$ref": "#/$defs/ImportSource"
|
|
4585
|
+
},
|
|
4586
|
+
"message_count": {
|
|
4587
|
+
"type": "integer",
|
|
4588
|
+
"minimum": 1
|
|
4589
|
+
},
|
|
4590
|
+
"first_at": {
|
|
4591
|
+
"$ref": "#/$defs/Timestamp"
|
|
4592
|
+
},
|
|
4593
|
+
"last_at": {
|
|
4594
|
+
"$ref": "#/$defs/Timestamp"
|
|
4595
|
+
}
|
|
4596
|
+
}
|
|
4597
|
+
},
|
|
4145
4598
|
"CreateChatRequest": {
|
|
4146
4599
|
"type": "object",
|
|
4147
4600
|
"required": [
|
|
@@ -6857,6 +7310,104 @@
|
|
|
6857
7310
|
"data"
|
|
6858
7311
|
]
|
|
6859
7312
|
},
|
|
7313
|
+
"ServerImportSenderUpdateEvent": {
|
|
7314
|
+
"title": "ServerImportSenderUpdateEvent",
|
|
7315
|
+
"description": "A name of an imported history changed. A suggestion (pending) and a decline go only to the importer and the suggested member; that member shows the confirm banner for pending. A confirmation or its withdrawal goes to every member: render the messages of that name again (or load the chat again).",
|
|
7316
|
+
"type": "object",
|
|
7317
|
+
"properties": {
|
|
7318
|
+
"type": {
|
|
7319
|
+
"const": "import_sender_update"
|
|
7320
|
+
},
|
|
7321
|
+
"event_id": {
|
|
7322
|
+
"$ref": "#/$defs/Id"
|
|
7323
|
+
},
|
|
7324
|
+
"chat_id": {
|
|
7325
|
+
"$ref": "#/$defs/Id"
|
|
7326
|
+
},
|
|
7327
|
+
"data": {
|
|
7328
|
+
"type": "object",
|
|
7329
|
+
"properties": {
|
|
7330
|
+
"import_id": {
|
|
7331
|
+
"$ref": "#/$defs/Id"
|
|
7332
|
+
},
|
|
7333
|
+
"sender": {
|
|
7334
|
+
"type": "object",
|
|
7335
|
+
"properties": {
|
|
7336
|
+
"key": {
|
|
7337
|
+
"$ref": "#/$defs/ImportSenderKey"
|
|
7338
|
+
},
|
|
7339
|
+
"name": {
|
|
7340
|
+
"type": "string"
|
|
7341
|
+
},
|
|
7342
|
+
"message_count": {
|
|
7343
|
+
"type": "integer",
|
|
7344
|
+
"minimum": 0
|
|
7345
|
+
},
|
|
7346
|
+
"state": {
|
|
7347
|
+
"$ref": "#/$defs/ImportSenderState"
|
|
7348
|
+
},
|
|
7349
|
+
"user_id": {
|
|
7350
|
+
"$ref": "#/$defs/Id"
|
|
7351
|
+
}
|
|
7352
|
+
},
|
|
7353
|
+
"required": [
|
|
7354
|
+
"key",
|
|
7355
|
+
"name",
|
|
7356
|
+
"message_count",
|
|
7357
|
+
"state"
|
|
7358
|
+
]
|
|
7359
|
+
}
|
|
7360
|
+
},
|
|
7361
|
+
"required": [
|
|
7362
|
+
"import_id",
|
|
7363
|
+
"sender"
|
|
7364
|
+
]
|
|
7365
|
+
}
|
|
7366
|
+
},
|
|
7367
|
+
"required": [
|
|
7368
|
+
"type",
|
|
7369
|
+
"event_id",
|
|
7370
|
+
"chat_id",
|
|
7371
|
+
"data"
|
|
7372
|
+
]
|
|
7373
|
+
},
|
|
7374
|
+
"ServerImportUpdateEvent": {
|
|
7375
|
+
"title": "ServerImportUpdateEvent",
|
|
7376
|
+
"description": "An imported history of the chat started, finished or is being removed; goes to every member. On done and removing, load the chat's history again; GET /chats/{chat_id}/imports lists the imports.",
|
|
7377
|
+
"type": "object",
|
|
7378
|
+
"properties": {
|
|
7379
|
+
"type": {
|
|
7380
|
+
"const": "import_update"
|
|
7381
|
+
},
|
|
7382
|
+
"event_id": {
|
|
7383
|
+
"$ref": "#/$defs/Id"
|
|
7384
|
+
},
|
|
7385
|
+
"chat_id": {
|
|
7386
|
+
"$ref": "#/$defs/Id"
|
|
7387
|
+
},
|
|
7388
|
+
"data": {
|
|
7389
|
+
"type": "object",
|
|
7390
|
+
"properties": {
|
|
7391
|
+
"import_id": {
|
|
7392
|
+
"$ref": "#/$defs/Id"
|
|
7393
|
+
},
|
|
7394
|
+
"state": {
|
|
7395
|
+
"$ref": "#/$defs/ChatImportState"
|
|
7396
|
+
}
|
|
7397
|
+
},
|
|
7398
|
+
"required": [
|
|
7399
|
+
"import_id",
|
|
7400
|
+
"state"
|
|
7401
|
+
]
|
|
7402
|
+
}
|
|
7403
|
+
},
|
|
7404
|
+
"required": [
|
|
7405
|
+
"type",
|
|
7406
|
+
"event_id",
|
|
7407
|
+
"chat_id",
|
|
7408
|
+
"data"
|
|
7409
|
+
]
|
|
7410
|
+
},
|
|
6860
7411
|
"ServerMessageEvent": {
|
|
6861
7412
|
"title": "ServerMessageEvent",
|
|
6862
7413
|
"description": "A new message in a chat.",
|
|
@@ -7468,6 +8019,12 @@
|
|
|
7468
8019
|
{
|
|
7469
8020
|
"$ref": "#/$defs/ServerHistoryClearedEvent"
|
|
7470
8021
|
},
|
|
8022
|
+
{
|
|
8023
|
+
"$ref": "#/$defs/ServerImportSenderUpdateEvent"
|
|
8024
|
+
},
|
|
8025
|
+
{
|
|
8026
|
+
"$ref": "#/$defs/ServerImportUpdateEvent"
|
|
8027
|
+
},
|
|
7471
8028
|
{
|
|
7472
8029
|
"$ref": "#/$defs/ServerMessageEvent"
|
|
7473
8030
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myronsi/messenger-api",
|
|
3
|
-
"version": "2.1.0-alpha.
|
|
3
|
+
"version": "2.1.0-alpha.46.next.165",
|
|
4
4
|
"description": "API contract of the Messenger backend: OpenAPI document, WebSocket event schemas and generated TypeScript types",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|