def mock_send(*_, **__): return mock_response( status_code=201, json_payload={ "id": message_id, "type": chat_message_type, "sequenceId": "3", "version": message_id, "content": { "message": message_str, "topic": "Lunch Chat thread", "participants": [{ "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b", "displayName": "Bob", "shareHistoryTime": "2020-10-30T10:50:50Z" }], "initiator": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b" }, "senderDisplayName": "Bob", "createdOn": "2021-01-27T01:37:33Z", "senderId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-e155-1f06-1db7-3a3a0d00004b" })
def mock_send(*_, **__): return mock_response(status_code=200, json_payload={ "value": [{ "communicationIdentifier": { "rawId": participant_id_1, "communicationUser": { "id": participant_id_1 } }, "displayName": "Bob", "shareHistoryTime": "2020-10-30T10:50:50Z" }, { "communicationIdentifier": { "rawId": participant_id_2, "communicationUser": { "id": participant_id_2 } }, "displayName": "Bob", "shareHistoryTime": "2020-10-30T10:50:50Z" }] })
async def mock_send(*_, **__): return mock_response(status_code=200, json_payload={"value": [{ "id": message_id, "type": "text", "sequenceId": "3", "version": message_id, "content": { "message": "message_str", "topic": "Lunch Chat thread", "participants": [ { "communicationIdentifier": {"rawId": "string", "communicationUser": { "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"}}, "displayName": "Bob", "shareHistoryTime": "2020-10-30T10:50:50Z" } ], "initiatorCommunicationIdentifier": {"rawId": "string", "communicationUser": { "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"}} }, "senderDisplayName": "Bob", "createdOn": "2021-01-27T01:37:33Z", "senderCommunicationIdentifier": {"rawId": "string", "communicationUser": { "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"}}, "deletedOn": "2021-01-27T01:37:33Z", "editedOn": "2021-01-27T01:37:33Z" }]})
async def mock_send(*_, **__): return mock_response(status_code=200, json_payload={ "id": thread_id, "topic": "Lunch Chat thread", "createdOn": "2020-10-30T10:50:50Z", "deletedOn": "2020-10-30T10:50:50Z", "createdByCommunicationIdentifier": {"rawId": "string", "communicationUser": {"id": "string"}} })
async def mock_send(*_, **__): return mock_response(status_code=207, json_payload={ "multipleStatus": [{ "id": thread_id, "statusCode": 201, "type": "Thread" }] })
def mock_send(*_, **__): return mock_response(status_code=201, json_payload={ "invalidParticipants": [{ "code": "string", "message": error_message, "target": new_participant_id, "details": [] }] })
async def mock_send(*_, **__): return mock_response(status_code=200, json_payload={ "value": [{ "id": "message_id1", "createdOn": "2020-08-17T18:05:44Z" }, { "id": "message_id2", "createdOn": "2020-08-17T23:13:33Z" }] })
async def mock_send(*_, **__): return mock_response(status_code=200, json_payload={"value": [ { "chatMessageId": message_id, "senderCommunicationIdentifier": { "rawId": "string", "communicationUser": { "id": "string" } } } ]})
async def mock_send(*_, **__): return mock_response(status_code=202, json_payload={ "value": [{ "to": phone_number, "messageId": "id", "httpStatusCode": "202", "errorMessage": "null", "repeatabilityResult": "accepted", "successful": "true" }] })
def mock_send(*_, **__): return mock_response(status_code=200, json_payload={"value": [{ "id": message_id, "type": "text", "sequenceId": "3", "version": message_id, "content": { "message": "Hi I am Bob." }, "senderDisplayName": "Bob", "createdOn": "2021-01-27T01:37:33Z", "senderId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-e155-1f06-1db7-3a3a0d00004b" }]})
def mock_send(*_, **__): return mock_response( status_code=201, json_payload={ "chatThread": { "id": thread_id, "topic": "test topic", "createdOn": "2020-12-03T21:09:17Z", "createdBy": "8:acs:57b9bac9-df6c-4d39-a73b-26e944adf6ea_9b0110-08007f1041" } })
async def mock_send(*_, **__): return mock_response(status_code=200, json_payload={ "id": thread_id, "created_by": "8:acs:resource_user", "members": [{ "id": "", "display_name": "name", "share_history_time": "1970-01-01T00:00:00Z" }] })
def mock_send(*_, **__): return mock_response(status_code=200, json_payload={"id": message_id})
def mock_send(*_, **__): return mock_response(status_code=200)
def mock_send(*_, **__): return mock_response( status_code=200, json_payload={"value": [{ "chatMessageId": message_id }]})
def mock_send(*_, **__): return mock_response(status_code=200, json_payload={"value": [{ "id": member_id }]})
def mock_send(*_, **__): return mock_response(status_code=400, json_payload={"msg": "some error"})
async def mock_send(*_, **__): return mock_response(status_code=200, json_payload={ "value": [ {"id": participant_id_1}, {"id": participant_id_2} ]})