Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

Commit

Permalink
Added subscription update EP RaenonX-DL/dragalia-site-back-2#36
Browse files Browse the repository at this point in the history
Signed-off-by: RaenonX <[email protected]>
  • Loading branch information
RaenonX committed Jan 17, 2022
1 parent 5b52d6b commit ad861e0
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ export * from './api/other/internalError/response';
export * from './api/other/lang';
export * from './api/other/unit';

export * from './api/user/notifications/key';
export * from './api/user/notifications/update/payload';
export * from './api/user/notifications/update/response';

export * from './api/endpoints';
export * from './api/responseCode';
export * from './api/utils';
22 changes: 22 additions & 0 deletions api/user/notifications/key.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import {PostType} from '../../post/types';


export type SubscriptionKeyConstName =
'ALL_QUEST' |
'ALL_ANALYSIS' |
'ALL_MISC' |
'ALL_TIER' |
'SITE_FEATURE';

export type SubscriptionKeyConst = {
type: 'const',
name: SubscriptionKeyConstName,
};

export type SubscriptionKeyPost = {
type: 'post',
postType: PostType,
id: number,
};

export type SubscriptionKey = SubscriptionKeyConst | SubscriptionKeyPost;
6 changes: 6 additions & 0 deletions api/user/notifications/update/payload.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import {RequestPayloadBase} from '../../../base/payload';


export type SubscriptionUpdatePayload = RequestPayloadBase & {
subKeysBase64: string[],
};
4 changes: 4 additions & 0 deletions api/user/notifications/update/response.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import {BaseResponse} from '../../../base/response';


export type SubscriptionUpdateResponse = BaseResponse;

0 comments on commit ad861e0

Please sign in to comment.