1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 16:23:44 +00:00

[SM-288] Rename requests and responses to follow naming convention (#3806)

This commit is contained in:
Oscar Hinton
2022-10-18 19:01:42 +02:00
committed by GitHub
parent c2df5c608e
commit cf2d3f5382
375 changed files with 868 additions and 1054 deletions

View File

@@ -1,4 +1,4 @@
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class ApiKeyResponse extends BaseResponse {
apiKey: string;

View File

@@ -1,7 +1,7 @@
import { FileUploadType } from "../../enums/fileUploadType";
import { BaseResponse } from "./baseResponse";
import { CipherResponse } from "./cipherResponse";
import { BaseResponse } from "./base.response";
import { CipherResponse } from "./cipher.response";
export class AttachmentUploadDataResponse extends BaseResponse {
attachmentId: string;

View File

@@ -1,4 +1,4 @@
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class AttachmentResponse extends BaseResponse {
id: string;

View File

@@ -1,6 +1,6 @@
import { DeviceType } from "../../enums/deviceType";
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class AuthRequestResponse extends BaseResponse {
id: string;

View File

@@ -1,6 +1,6 @@
import { BaseResponse } from "../baseResponse";
import { BaseResponse } from "../base.response";
import { ICaptchaProtectedResponse } from "./ICaptchaProtectedResponse";
import { ICaptchaProtectedResponse } from "./captcha-protected.response";
export class RegisterResponse extends BaseResponse implements ICaptchaProtectedResponse {
captchaBypassToken: string;

View File

@@ -1,5 +1,5 @@
import { BaseResponse } from "./baseResponse";
import { BillingInvoiceResponse, BillingTransactionResponse } from "./billingResponse";
import { BaseResponse } from "./base.response";
import { BillingInvoiceResponse, BillingTransactionResponse } from "./billing.response";
export class BillingHistoryResponse extends BaseResponse {
invoices: BillingInvoiceResponse[] = [];

View File

@@ -1,5 +1,5 @@
import { BaseResponse } from "./baseResponse";
import { BillingSourceResponse } from "./billingResponse";
import { BaseResponse } from "./base.response";
import { BillingSourceResponse } from "./billing.response";
export class BillingPaymentResponse extends BaseResponse {
balance: number;

View File

@@ -1,7 +1,7 @@
import { PaymentMethodType } from "../../enums/paymentMethodType";
import { TransactionType } from "../../enums/transactionType";
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class BillingResponse extends BaseResponse {
balance: number;

View File

@@ -1,4 +1,4 @@
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class BreachAccountResponse extends BaseResponse {
addedDate: string;

View File

@@ -5,9 +5,9 @@ import { IdentityApi } from "../api/identity.api";
import { LoginApi } from "../api/login.api";
import { SecureNoteApi } from "../api/secure-note.api";
import { AttachmentResponse } from "./attachmentResponse";
import { BaseResponse } from "./baseResponse";
import { PasswordHistoryResponse } from "./passwordHistoryResponse";
import { AttachmentResponse } from "./attachment.response";
import { BaseResponse } from "./base.response";
import { PasswordHistoryResponse } from "./password-history.response";
export class CipherResponse extends BaseResponse {
id: string;

View File

@@ -1,5 +1,5 @@
import { BaseResponse } from "./baseResponse";
import { SelectionReadOnlyResponse } from "./selectionReadOnlyResponse";
import { BaseResponse } from "./base.response";
import { SelectionReadOnlyResponse } from "./selection-read-only.response";
export class CollectionResponse extends BaseResponse {
id: string;

View File

@@ -1,4 +1,4 @@
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class DeviceVerificationResponse extends BaseResponse {
isDeviceVerificationSectionEnabled: boolean;

View File

@@ -1,6 +1,6 @@
import { DeviceType } from "../../enums/deviceType";
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class DeviceResponse extends BaseResponse {
id: string;

View File

@@ -1,5 +1,5 @@
import { BaseResponse } from "./baseResponse";
import { GlobalDomainResponse } from "./globalDomainResponse";
import { BaseResponse } from "./base.response";
import { GlobalDomainResponse } from "./global-domain.response";
export class DomainsResponse extends BaseResponse {
equivalentDomains: string[][];

View File

@@ -2,8 +2,8 @@ import { EmergencyAccessStatusType } from "../../enums/emergencyAccessStatusType
import { EmergencyAccessType } from "../../enums/emergencyAccessType";
import { KdfType } from "../../enums/kdfType";
import { BaseResponse } from "./baseResponse";
import { CipherResponse } from "./cipherResponse";
import { BaseResponse } from "./base.response";
import { CipherResponse } from "./cipher.response";
export class EmergencyAccessGranteeDetailsResponse extends BaseResponse {
id: string;

View File

@@ -1,6 +1,6 @@
import { Utils } from "../../misc/utils";
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class ErrorResponse extends BaseResponse {
message: string;

View File

@@ -1,7 +1,7 @@
import { DeviceType } from "../../enums/deviceType";
import { EventType } from "../../enums/eventType";
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class EventResponse extends BaseResponse {
type: EventType;

View File

@@ -1,4 +1,4 @@
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class FolderResponse extends BaseResponse {
id: string;

View File

@@ -1,4 +1,4 @@
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class GlobalDomainResponse extends BaseResponse {
type: number;

View File

@@ -1,5 +1,5 @@
import { BaseResponse } from "./baseResponse";
import { SelectionReadOnlyResponse } from "./selectionReadOnlyResponse";
import { BaseResponse } from "./base.response";
import { SelectionReadOnlyResponse } from "./selection-read-only.response";
export class GroupResponse extends BaseResponse {
id: string;

View File

@@ -1,4 +1,4 @@
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class IdentityCaptchaResponse extends BaseResponse {
siteKey: string;

View File

@@ -1,6 +1,6 @@
import { KdfType } from "../../enums/kdfType";
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class IdentityTokenResponse extends BaseResponse {
accessToken: string;

View File

@@ -1,6 +1,6 @@
import { TwoFactorProviderType } from "../../enums/twoFactorProviderType";
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class IdentityTwoFactorResponse extends BaseResponse {
twoFactorProviders: TwoFactorProviderType[];

View File

@@ -1,4 +1,4 @@
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class KeyConnectorUserKeyResponse extends BaseResponse {
key: string;

View File

@@ -1,4 +1,4 @@
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class KeysResponse extends BaseResponse {
privateKey: string;

View File

@@ -1,4 +1,4 @@
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class ListResponse<T> extends BaseResponse {
data: T[];

View File

@@ -1,6 +1,6 @@
import { NotificationType } from "../../enums/notificationType";
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class NotificationResponse extends BaseResponse {
contextId: string;

View File

@@ -1,6 +1,6 @@
import { OrganizationApiKeyType } from "../../enums/organizationApiKeyType";
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class OrganizationApiKeyInformationResponse extends BaseResponse {
keyType: OrganizationApiKeyType;

View File

@@ -1,4 +1,4 @@
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class OrganizationAutoEnrollStatusResponse extends BaseResponse {
id: string;

View File

@@ -2,7 +2,7 @@ import { OrganizationConnectionType } from "../../enums/organizationConnectionTy
import { BillingSyncConfigApi } from "../api/billing-sync-config.api";
import { ScimConfigApi } from "../api/scim-config.api";
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
/**API response config types for OrganizationConnectionResponse */
export type OrganizationConnectionConfigApis = BillingSyncConfigApi | ScimConfigApi;

View File

@@ -1,7 +1,7 @@
import { BaseResponse } from "./baseResponse";
import { CipherResponse } from "./cipherResponse";
import { CollectionResponse } from "./collectionResponse";
import { ListResponse } from "./listResponse";
import { BaseResponse } from "./base.response";
import { CipherResponse } from "./cipher.response";
import { CollectionResponse } from "./collection.response";
import { ListResponse } from "./list.response";
export class OrganizationExportResponse extends BaseResponse {
collections: ListResponse<CollectionResponse>;

View File

@@ -1,4 +1,4 @@
import { KeysResponse } from "./keysResponse";
import { KeysResponse } from "./keys.response";
export class OrganizationKeysResponse extends KeysResponse {
constructor(response: any) {

View File

@@ -1,4 +1,4 @@
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class OrganizationSponsorshipSyncStatusResponse extends BaseResponse {
lastSyncDate?: Date;

View File

@@ -1,8 +1,8 @@
import { OrganizationResponse } from "./organizationResponse";
import { OrganizationResponse } from "./organization.response";
import {
BillingSubscriptionResponse,
BillingSubscriptionUpcomingInvoiceResponse,
} from "./subscriptionResponse";
} from "./subscription.response";
export class OrganizationSubscriptionResponse extends OrganizationResponse {
storageName: string;

View File

@@ -1,4 +1,4 @@
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class OrganizationUserBulkPublicKeyResponse extends BaseResponse {
id: string;

View File

@@ -1,4 +1,4 @@
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class OrganizationUserBulkResponse extends BaseResponse {
id: string;

View File

@@ -3,8 +3,8 @@ import { OrganizationUserStatusType } from "../../enums/organizationUserStatusTy
import { OrganizationUserType } from "../../enums/organizationUserType";
import { PermissionsApi } from "../api/permissions.api";
import { BaseResponse } from "./baseResponse";
import { SelectionReadOnlyResponse } from "./selectionReadOnlyResponse";
import { BaseResponse } from "./base.response";
import { SelectionReadOnlyResponse } from "./selection-read-only.response";
export class OrganizationUserResponse extends BaseResponse {
id: string;

View File

@@ -1,7 +1,7 @@
import { PlanType } from "../../enums/planType";
import { BaseResponse } from "./baseResponse";
import { PlanResponse } from "./planResponse";
import { BaseResponse } from "./base.response";
import { PlanResponse } from "./plan.response";
export class OrganizationResponse extends BaseResponse {
id: string;

View File

@@ -1,5 +1,5 @@
import { SsoConfigApi } from "../../api/sso-config.api";
import { BaseResponse } from "../baseResponse";
import { BaseResponse } from "../base.response";
export class OrganizationSsoResponse extends BaseResponse {
enabled: boolean;

View File

@@ -1,4 +1,4 @@
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class PasswordHistoryResponse extends BaseResponse {
password: string;

View File

@@ -1,5 +1,5 @@
import { BaseResponse } from "./baseResponse";
import { ProfileResponse } from "./profileResponse";
import { BaseResponse } from "./base.response";
import { ProfileResponse } from "./profile.response";
export class PaymentResponse extends BaseResponse {
userProfile: ProfileResponse;

View File

@@ -1,7 +1,7 @@
import { PlanType } from "../../enums/planType";
import { ProductType } from "../../enums/productType";
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class PlanResponse extends BaseResponse {
type: PlanType;

View File

@@ -1,6 +1,6 @@
import { PolicyType } from "../../enums/policyType";
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class PolicyResponse extends BaseResponse {
id: string;

View File

@@ -1,6 +1,6 @@
import { KdfType } from "../../enums/kdfType";
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class PreloginResponse extends BaseResponse {
kdf: KdfType;

View File

@@ -3,7 +3,7 @@ import { OrganizationUserType } from "../../enums/organizationUserType";
import { ProductType } from "../../enums/productType";
import { PermissionsApi } from "../api/permissions.api";
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class ProfileOrganizationResponse extends BaseResponse {
id: string;

View File

@@ -1,4 +1,4 @@
import { ProfileOrganizationResponse } from "./profileOrganizationResponse";
import { ProfileOrganizationResponse } from "./profile-organization.response";
export class ProfileProviderOrganizationResponse extends ProfileOrganizationResponse {
constructor(response: any) {

View File

@@ -2,7 +2,7 @@ import { ProviderUserStatusType } from "../../enums/providerUserStatusType";
import { ProviderUserType } from "../../enums/providerUserType";
import { PermissionsApi } from "../api/permissions.api";
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class ProfileProviderResponse extends BaseResponse {
id: string;

View File

@@ -1,7 +1,7 @@
import { BaseResponse } from "./baseResponse";
import { ProfileOrganizationResponse } from "./profileOrganizationResponse";
import { ProfileProviderOrganizationResponse } from "./profileProviderOrganizationResponse";
import { ProfileProviderResponse } from "./profileProviderResponse";
import { BaseResponse } from "./base.response";
import { ProfileOrganizationResponse } from "./profile-organization.response";
import { ProfileProviderOrganizationResponse } from "./profile-provider-organization.response";
import { ProfileProviderResponse } from "./profile-provider.response";
export class ProfileResponse extends BaseResponse {
id: string;

View File

@@ -1,4 +1,4 @@
import { BaseResponse } from "../baseResponse";
import { BaseResponse } from "../base.response";
export class ProviderOrganizationResponse extends BaseResponse {
id: string;

View File

@@ -1,3 +1,3 @@
import { OrganizationUserBulkPublicKeyResponse } from "../organizationUserBulkPublicKeyResponse";
import { OrganizationUserBulkPublicKeyResponse } from "../organization-user-bulk-public-key.response";
export class ProviderUserBulkPublicKeyResponse extends OrganizationUserBulkPublicKeyResponse {}

View File

@@ -1,4 +1,4 @@
import { BaseResponse } from "../baseResponse";
import { BaseResponse } from "../base.response";
export class ProviderUserBulkResponse extends BaseResponse {
id: string;

View File

@@ -1,7 +1,7 @@
import { ProviderUserStatusType } from "../../../enums/providerUserStatusType";
import { ProviderUserType } from "../../../enums/providerUserType";
import { PermissionsApi } from "../../api/permissions.api";
import { BaseResponse } from "../baseResponse";
import { BaseResponse } from "../base.response";
export class ProviderUserResponse extends BaseResponse {
id: string;

View File

@@ -1,4 +1,4 @@
import { BaseResponse } from "../baseResponse";
import { BaseResponse } from "../base.response";
export class ProviderResponse extends BaseResponse {
id: string;

View File

@@ -1,4 +1,4 @@
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class SelectionReadOnlyResponse extends BaseResponse {
id: string;

View File

@@ -2,7 +2,7 @@ import { SendType } from "../../enums/sendType";
import { SendFileApi } from "../api/send-file.api";
import { SendTextApi } from "../api/send-text.api";
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class SendAccessResponse extends BaseResponse {
id: string;

View File

@@ -1,4 +1,4 @@
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class SendFileDownloadDataResponse extends BaseResponse {
id: string = null;

View File

@@ -1,7 +1,7 @@
import { FileUploadType } from "../../enums/fileUploadType";
import { BaseResponse } from "./baseResponse";
import { SendResponse } from "./sendResponse";
import { BaseResponse } from "./base.response";
import { SendResponse } from "./send.response";
export class SendFileUploadDataResponse extends BaseResponse {
fileUploadType: FileUploadType;

View File

@@ -2,7 +2,7 @@ import { SendType } from "../../enums/sendType";
import { SendFileApi } from "../api/send-file.api";
import { SendTextApi } from "../api/send-text.api";
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class SendResponse extends BaseResponse {
id: string;

View File

@@ -1,4 +1,4 @@
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class ServerConfigResponse extends BaseResponse {
version: string;

View File

@@ -1,4 +1,4 @@
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class SsoPreValidateResponse extends BaseResponse {
token: string;

View File

@@ -1,4 +1,4 @@
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class SubscriptionResponse extends BaseResponse {
storageName: string;

View File

@@ -1,11 +1,11 @@
import { BaseResponse } from "./baseResponse";
import { CipherResponse } from "./cipherResponse";
import { CollectionDetailsResponse } from "./collectionResponse";
import { DomainsResponse } from "./domainsResponse";
import { FolderResponse } from "./folderResponse";
import { PolicyResponse } from "./policyResponse";
import { ProfileResponse } from "./profileResponse";
import { SendResponse } from "./sendResponse";
import { BaseResponse } from "./base.response";
import { CipherResponse } from "./cipher.response";
import { CollectionDetailsResponse } from "./collection.response";
import { DomainsResponse } from "./domains.response";
import { FolderResponse } from "./folder.response";
import { PolicyResponse } from "./policy.response";
import { ProfileResponse } from "./profile.response";
import { SendResponse } from "./send.response";
export class SyncResponse extends BaseResponse {
profile?: ProfileResponse;

View File

@@ -1,4 +1,4 @@
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class TaxInfoResponse extends BaseResponse {
taxId: string;

View File

@@ -1,4 +1,4 @@
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class TaxRateResponse extends BaseResponse {
id: string;

View File

@@ -1,4 +1,4 @@
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class TwoFactorAuthenticatorResponse extends BaseResponse {
enabled: boolean;

View File

@@ -1,4 +1,4 @@
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class TwoFactorDuoResponse extends BaseResponse {
enabled: boolean;

View File

@@ -1,4 +1,4 @@
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class TwoFactorEmailResponse extends BaseResponse {
enabled: boolean;

View File

@@ -1,6 +1,6 @@
import { TwoFactorProviderType } from "../../enums/twoFactorProviderType";
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class TwoFactorProviderResponse extends BaseResponse {
enabled: boolean;

View File

@@ -1,4 +1,4 @@
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class TwoFactorRecoverResponse extends BaseResponse {
code: string;

View File

@@ -1,6 +1,6 @@
import { Utils } from "../../misc/utils";
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class TwoFactorWebAuthnResponse extends BaseResponse {
enabled: boolean;

View File

@@ -1,4 +1,4 @@
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class TwoFactorYubiKeyResponse extends BaseResponse {
enabled: boolean;

View File

@@ -1,4 +1,4 @@
import { BaseResponse } from "./baseResponse";
import { BaseResponse } from "./base.response";
export class UserKeyResponse extends BaseResponse {
userId: string;