Skip to content

Commit 20aa60a

Browse files
smirk-devclaude
andcommitted
fix(api): remove manual PushEndpoints type and add changeset
- Remove manual `PushEndpoints` type from rest-typings; push endpoint types are now derived automatically via `ExtractRoutesFromAPI` and module augmentation in the Meteor server file - Add changeset for the push API migration Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 97267f7 commit 20aa60a

File tree

3 files changed

+7
-20
lines changed

3 files changed

+7
-20
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@rocket.chat/meteor": minor
3+
"@rocket.chat/rest-typings": minor
4+
---
5+
6+
Migrate push REST API endpoints to chained API pattern with AJV request/response schema validation and OpenAPI documentation support.

packages/rest-typings/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import type { MiscEndpoints } from './v1/misc';
3333
import type { ModerationEndpoints } from './v1/moderation';
3434
import type { OmnichannelEndpoints } from './v1/omnichannel';
3535
import type { PresenceEndpoints } from './v1/presence';
36-
import type { PushEndpoints } from './v1/push';
3736
import type { RolesEndpoints } from './v1/roles';
3837
import type { RoomsEndpoints } from './v1/rooms';
3938
import type { ServerEventsEndpoints } from './v1/server-events';
@@ -62,7 +61,6 @@ export interface Endpoints
6261
ImEndpoints,
6362
LDAPEndpoints,
6463
RoomsEndpoints,
65-
PushEndpoints,
6664
RolesEndpoints,
6765
TeamsEndpoints,
6866
SettingsEndpoints,

packages/rest-typings/src/v1/push.ts

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { IMessage, IPushNotificationConfig, IPushTokenTypes } from '@rocket.chat/core-typings';
1+
import type { IPushTokenTypes } from '@rocket.chat/core-typings';
22

33
import { ajv } from './Ajv';
44

@@ -48,20 +48,3 @@ const PushGetPropsSchema = {
4848
};
4949

5050
export const isPushGetProps = ajv.compile<PushGetProps>(PushGetPropsSchema);
51-
52-
export type PushEndpoints = {
53-
'/v1/push.get': {
54-
GET: (params: PushGetProps) => {
55-
data: {
56-
message: IMessage;
57-
notification: IPushNotificationConfig;
58-
};
59-
};
60-
};
61-
'/v1/push.info': {
62-
GET: () => {
63-
pushGatewayEnabled: boolean;
64-
defaultPushGateway: boolean;
65-
};
66-
};
67-
};

0 commit comments

Comments
 (0)