stream-chat-react-native-core
Version:
The official React Native and Expo components for Stream Chat, a service for building chat applications
257 lines • 6.74 kB
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.LATEST_MESSAGE = exports.FORMATTED_MESSAGE = exports.CHANNEL_WITH_NO_MESSAGES = exports.CHANNEL_WITH_MESSAGES_TEXT = exports.CHANNEL_WITH_MESSAGES_COMMAND = exports.CHANNEL_WITH_MESSAGES_ATTACHMENTS = exports.CHANNEL_WITH_MESSAGES = exports.CHANNEL_WITH_MENTIONED_USERS = exports.CHANNEL_WITH_EMPTY_MESSAGE = exports.CHANNEL_WITH_DELETED_MESSAGES = exports.CHANNEL = void 0;
var _shoehorn = require("@total-typescript/shoehorn");
var _queryMembers = require("../../mock-builders/api/queryMembers");
var mockMessage = data => (0, _shoehorn.fromPartial)(data);
var mockUser = data => (0, _shoehorn.fromPartial)(data);
var channelName = 'okechukwu';
var CHANNEL = exports.CHANNEL = (0, _shoehorn.fromPartial)({
data: {
name: channelName
},
state: {
messages: []
}
});
var CHANNEL_WITH_MESSAGES_TEXT = exports.CHANNEL_WITH_MESSAGES_TEXT = {
members: _queryMembers.CHANNEL_MEMBERS,
messages: [mockMessage({
args: 'string',
attachments: [],
channel: CHANNEL,
cid: 'stridkncnng',
command: 'giphy',
command_info: {
name: 'string'
},
created_at: new Date('2021-02-12T12:12:35.862Z'),
deleted_at: new Date('2021-02-12T12:12:35.862Z'),
id: 'ljkblk',
text: 'jkbkbiubicbi',
type: 'MessageLabel',
user: mockUser({
id: 'okechukwu'
})
}), mockMessage({
args: 'string',
attachments: [],
channel: CHANNEL,
cid: 'stridodong',
command: 'giphy',
command_info: {
name: 'string'
},
created_at: new Date('2021-02-12T12:12:35.862Z'),
deleted_at: new Date('2021-02-12T12:12:35.862Z'),
id: 'jbkjb',
text: 'jkbkbiubicbi',
type: 'MessageLabel',
user: mockUser({
id: 'okechukwu'
})
})],
name: channelName
};
var CHANNEL_WITH_DELETED_MESSAGES = exports.CHANNEL_WITH_DELETED_MESSAGES = {};
var CHANNEL_WITH_NO_MESSAGES = exports.CHANNEL_WITH_NO_MESSAGES = {
members: _queryMembers.CHANNEL_MEMBERS,
messages: [],
name: channelName
};
var CHANNEL_WITH_MESSAGE_COMMAND = exports.CHANNEL_WITH_MESSAGES_COMMAND = {
members: _queryMembers.CHANNEL_MEMBERS,
messages: [mockMessage({
args: 'string',
attachments: [],
channel: CHANNEL,
cid: 'stridkncnng',
command: 'giphy',
command_info: {
name: 'string'
},
created_at: new Date('2021-02-12T12:12:35.862Z'),
deleted_at: new Date('2021-02-12T12:12:35.862Z'),
id: 'ljkblk',
user: mockUser({
id: 'okechukwu'
})
}), mockMessage({
args: 'string',
attachments: [],
channel: CHANNEL,
cid: 'stridodong',
command: 'giphy',
command_info: {
name: 'string'
},
created_at: new Date('2021-02-12T12:12:35.862Z'),
deleted_at: new Date('2021-02-12T12:12:35.862Z'),
id: 'jbkjb',
user: mockUser({
id: 'okechukwu'
})
})]
};
var CHANNEL_WITH_MESSAGES_ATTACHMENTS = exports.CHANNEL_WITH_MESSAGES_ATTACHMENTS = {
members: _queryMembers.CHANNEL_MEMBERS,
messages: [mockMessage({
args: 'string',
attachments: [{
actions: [],
asset_url: 'string',
author_icon: 'string',
author_link: 'string',
author_name: 'string',
color: 'string',
fallback: 'string',
fields: [],
file_size: 25,
footer: 'string',
footer_icon: 'string',
image_url: 'string',
mime_type: 'string',
og_scrape_url: 'string',
original_height: 5,
original_width: 4,
pretext: 'string',
text: 'string',
thumb_url: 'string',
title: 'string',
title_link: 'string',
type: 'string'
}],
channel: CHANNEL,
created_at: new Date('2021-02-12T12:12:35.862Z'),
deleted_at: new Date('2021-02-12T12:12:35.862Z'),
id: 'ljkblk',
user: mockUser({
id: 'okechukwu'
})
})],
name: channelName
};
var LATEST_MESSAGE = exports.LATEST_MESSAGE = mockMessage({
args: 'string',
attachments: [],
channel: CHANNEL,
cid: 'string',
command: 'giphy',
command_info: {
name: 'string'
},
created_at: new Date('2021-02-12T12:12:35.862Z'),
deleted_at: new Date('2021-02-12T12:12:35.862Z'),
id: 'string',
text: 'jkbkbiubicbi',
type: 'MessageLabel',
user: mockUser({
id: 'okechukwu'
})
});
var FORMATTED_MESSAGE = exports.FORMATTED_MESSAGE = {
created_at: new Date('2021-02-12T12:12:35.862282Z'),
deleted_at: null,
id: '',
pinned_at: new Date('2021-02-12T12:12:35.862282Z'),
status: 'received',
type: 'regular',
updated_at: new Date('2021-02-12T12:12:35.862282Z')
};
var CHANNEL_WITH_MENTIONED_USERS = exports.CHANNEL_WITH_MENTIONED_USERS = {
members: _queryMembers.ONE_MEMBER_WITH_EMPTY_USER,
messages: [mockMessage({
args: 'string',
attachments: [],
cid: 'stridkncnng',
command_info: {
name: 'string'
},
created_at: new Date('2021-02-12T12:12:35.862Z'),
deleted_at: new Date('2021-02-12T12:12:35.862Z'),
mentioned_users: [{
id: 'Max',
name: 'Max'
}, {
id: 'Ada',
name: 'Ada'
}, {
id: 'Enzo',
name: 'Enzo'
}],
text: 'Max'
}), mockMessage({
args: 'string',
attachments: [],
cid: 'stridodong',
command_info: {
name: 'string'
},
created_at: new Date('2021-02-12T12:12:35.862Z'),
deleted_at: new Date('2021-02-12T12:12:35.862Z'),
mentioned_users: [{
id: 'Max',
name: 'Max'
}, {
id: 'Ada',
name: 'Ada'
}, {
id: 'Enzo',
name: 'Enzo'
}],
text: 'Max'
})]
};
var CHANNEL_WITH_EMPTY_MESSAGE = exports.CHANNEL_WITH_EMPTY_MESSAGE = {
members: _queryMembers.ONE_MEMBER_WITH_EMPTY_USER,
messages: [mockMessage({
args: 'string',
attachments: [],
cid: 'stridkncnng',
command_info: {
name: 'string'
},
created_at: new Date('2021-02-12T12:12:35.862Z'),
deleted_at: new Date('2021-02-12T12:12:35.862Z'),
mentioned_users: [{
id: 'Max',
name: 'Max'
}, {
id: 'Ada',
name: 'Ada'
}, {
id: 'Enzo',
name: 'Enzo'
}]
}), mockMessage({
args: 'string',
attachments: [],
cid: 'stridodong',
command_info: {
name: 'string'
},
created_at: new Date('2021-02-12T12:12:35.862Z'),
deleted_at: new Date('2021-02-12T12:12:35.862Z'),
mentioned_users: [{
id: 'Max',
name: 'Max'
}, {
id: 'Ada',
name: 'Ada'
}, {
id: 'Enzo',
name: 'Enzo'
}]
})]
};
var CHANNEL_WITH_MESSAGES = exports.CHANNEL_WITH_MESSAGES = {
data: {
name: channelName
},
state: {
members: _queryMembers.GROUP_CHANNEL_MEMBERS_MOCK,
messages: [FORMATTED_MESSAGE, FORMATTED_MESSAGE]
}
};
//# sourceMappingURL=channelMocks.js.map