-
Notifications
You must be signed in to change notification settings - Fork 12.2k
chore: Adds deprecation warning on livechat:saveBusinessHour
with new endpoint replacing it
#37029
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from 8 commits
23fd119
249ffa9
3358321
cce1d8f
3e29d18
427cc20
ed08214
cf78558
1ee3da4
63e4b89
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@rocket.chat/meteor": patch | ||
"@rocket.chat/rest-typings": patch | ||
--- | ||
|
||
Adds deprecation warning on `livechat:saveBusinessHour` with new endpoint replacing it; `livechat/business-houra.save` |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,4 +1,4 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
import type { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
import { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
IOmnichannelCannedResponse, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
ILivechatAgent, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
ILivechatDepartment, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -32,8 +32,9 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||
ILivechatContactChannel, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
IUser, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
OmichannelRoutingConfig, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
ISaveLivechatBusinessHour, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
} from '@rocket.chat/core-typings'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
import { ILivechatAgentStatus } from '@rocket.chat/core-typings'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
import type { WithId } from 'mongodb'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
import { ajv } from './Ajv'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -3075,6 +3076,83 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||
GETLivechatAgentsAgentIdDepartmentsParamsSchema, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
const POSTLivechatBusinessHoursSaveSchema = { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
type: 'object', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
properties: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
_id: { type: 'string', nullable: true }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
name: { type: 'string' }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
active: { type: 'boolean' }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
type: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
type: 'string', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
enum: ['default', 'custom'], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
daysOpen: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
type: 'array', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
items: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
type: 'string', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
nullable: true, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
daysTime: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
type: 'array', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
items: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
type: 'object', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
properties: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
day: { type: 'string' }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
start: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
type: 'object', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
properties: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
time: { type: 'string' }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
finish: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
type: 'object', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
properties: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
time: { type: 'string' }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+3103
to
+3113
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Require
Apply this diff: start: {
type: 'object',
properties: {
time: { type: 'string' },
},
+ required: ['time'],
+ additionalProperties: false,
},
finish: {
type: 'object',
properties: {
time: { type: 'string' },
},
+ required: ['time'],
+ additionalProperties: false,
}, 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
open: { type: 'boolean' }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
required: ['day', 'start', 'finish', 'open'], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
additionalProperties: false, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
nullable: true, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
workHours: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
type: 'array', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
items: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
type: 'object', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
properties: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
day: { type: 'string' }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
start: { type: 'string' }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
finish: { type: 'string' }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
open: { type: 'boolean' }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
required: ['day', 'start', 'finish', 'open'], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
additionalProperties: false, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
timezone: { type: 'string' }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
timezoneName: { type: 'string', nullable: true }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
departmentsToApplyBusinessHour: { type: 'string', nullable: true }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
required: ['name', 'active', 'type', 'workHours', 'timezone'], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
additionalProperties: false, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
export const isPOSTLivechatBusinessHoursSaveParams = ajv.compile<ISaveLivechatBusinessHour>(POSTLivechatBusinessHoursSaveSchema); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
lucas-a-pelegrino marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
const POSTLivechatBusinessHoursSaveSuccessResponseSchema = { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
type: 'object', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
properties: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
success: { type: 'boolean', enum: [true] }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
required: ['success'], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
additionalProperties: false, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
export const POSTLivechatBusinessHoursSaveSuccessResponse = ajv.compile<void>(POSTLivechatBusinessHoursSaveSuccessResponseSchema); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
type GETBusinessHourParams = { _id?: string; type?: string }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
const GETBusinessHourParamsSchema = { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Uh oh!
There was an error while loading. Please reload this page.