refactor: http service (#2233)
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
import { MinimalHttpResponse } from '../Http/MinimalHttpResponses'
|
||||
import { HttpResponse } from '../Http/HttpResponse'
|
||||
|
||||
export type DeleteSettingResponse = MinimalHttpResponse
|
||||
export type DeleteSettingResponse = HttpResponse
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
import { MinimalHttpResponse } from '../Http/MinimalHttpResponses'
|
||||
import { AvailableSubscriptions } from './AvailableSubscriptions'
|
||||
|
||||
export type GetAvailableSubscriptionsResponse = MinimalHttpResponse & {
|
||||
data?: AvailableSubscriptions
|
||||
}
|
||||
export type GetAvailableSubscriptionsResponse = AvailableSubscriptions
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
import { FeatureDescription } from '@standardnotes/features'
|
||||
import { MinimalHttpResponse } from '../Http/MinimalHttpResponses'
|
||||
|
||||
export type GetOfflineFeaturesResponse = MinimalHttpResponse & {
|
||||
data?: {
|
||||
features: FeatureDescription[]
|
||||
roles: string[]
|
||||
}
|
||||
export type GetOfflineFeaturesResponse = {
|
||||
features: FeatureDescription[]
|
||||
roles: string[]
|
||||
}
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
import { MinimalHttpResponse } from '../Http/MinimalHttpResponses'
|
||||
import { SettingData } from './SettingData'
|
||||
|
||||
export type GetSettingResponse = MinimalHttpResponse & {
|
||||
data?: {
|
||||
success?: boolean
|
||||
setting?: SettingData
|
||||
}
|
||||
export type GetSettingResponse = {
|
||||
success?: boolean
|
||||
setting?: SettingData
|
||||
}
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
import { Subscription } from '@standardnotes/security'
|
||||
import { MinimalHttpResponse } from '../Http/MinimalHttpResponses'
|
||||
|
||||
export type GetSubscriptionResponse = MinimalHttpResponse & {
|
||||
data?: {
|
||||
subscription?: Subscription
|
||||
}
|
||||
export type GetSubscriptionResponse = {
|
||||
subscription?: Subscription
|
||||
}
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
import { MinimalHttpResponse } from '../Http/MinimalHttpResponses'
|
||||
import { SettingData } from './SettingData'
|
||||
|
||||
export type ListSettingsResponse = MinimalHttpResponse & {
|
||||
data?: {
|
||||
settings?: SettingData[]
|
||||
}
|
||||
export type ListSettingsResponse = {
|
||||
settings?: SettingData[]
|
||||
}
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
import { MinimalHttpResponse } from '../Http/MinimalHttpResponses'
|
||||
|
||||
export type PostSubscriptionTokensResponse = MinimalHttpResponse & {
|
||||
data?: {
|
||||
token: string
|
||||
}
|
||||
export type PostSubscriptionTokensResponse = {
|
||||
token: string
|
||||
}
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
import { MinimalHttpResponse } from '../Http/MinimalHttpResponses'
|
||||
|
||||
export type UpdateSettingResponse = MinimalHttpResponse
|
||||
export type UpdateSettingResponse = unknown
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
import { HttpResponse } from '../Http/HttpResponse'
|
||||
import { UserFeaturesData } from './UserFeaturesData'
|
||||
|
||||
export type UserFeaturesResponse = HttpResponse & {
|
||||
data: UserFeaturesData
|
||||
}
|
||||
export type UserFeaturesResponse = UserFeaturesData
|
||||
|
||||
Reference in New Issue
Block a user