refactor: http service (#2233)

This commit is contained in:
Mo
2023-02-28 20:43:25 -06:00
committed by GitHub
parent 6e7618b258
commit e7f1d35341
142 changed files with 1116 additions and 1307 deletions

View File

@@ -1,3 +1,3 @@
import { MinimalHttpResponse } from '../Http/MinimalHttpResponses'
import { HttpResponse } from '../Http/HttpResponse'
export type DeleteSettingResponse = MinimalHttpResponse
export type DeleteSettingResponse = HttpResponse

View File

@@ -1,6 +1,3 @@
import { MinimalHttpResponse } from '../Http/MinimalHttpResponses'
import { AvailableSubscriptions } from './AvailableSubscriptions'
export type GetAvailableSubscriptionsResponse = MinimalHttpResponse & {
data?: AvailableSubscriptions
}
export type GetAvailableSubscriptionsResponse = AvailableSubscriptions

View File

@@ -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[]
}

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -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[]
}

View File

@@ -1,7 +1,3 @@
import { MinimalHttpResponse } from '../Http/MinimalHttpResponses'
export type PostSubscriptionTokensResponse = MinimalHttpResponse & {
data?: {
token: string
}
export type PostSubscriptionTokensResponse = {
token: string
}

View File

@@ -1,3 +1 @@
import { MinimalHttpResponse } from '../Http/MinimalHttpResponses'
export type UpdateSettingResponse = MinimalHttpResponse
export type UpdateSettingResponse = unknown

View File

@@ -1,6 +1,3 @@
import { HttpResponse } from '../Http/HttpResponse'
import { UserFeaturesData } from './UserFeaturesData'
export type UserFeaturesResponse = HttpResponse & {
data: UserFeaturesData
}
export type UserFeaturesResponse = UserFeaturesData