mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 16:53:34 +00:00
org create apis
This commit is contained in:
14
src/models/request/organizationCreateRequest.ts
Normal file
14
src/models/request/organizationCreateRequest.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { PlanType } from '../../enums/planType';
|
||||
|
||||
export class OrganizationCreateRequest {
|
||||
name: string;
|
||||
businessName: string;
|
||||
billingEmail: string;
|
||||
planType: PlanType;
|
||||
key: string;
|
||||
paymentToken: string;
|
||||
additionalSeats: number;
|
||||
additionalStorageGb: number;
|
||||
collectionName: string;
|
||||
country: string;
|
||||
}
|
||||
45
src/models/response/organizationResponse.ts
Normal file
45
src/models/response/organizationResponse.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
import { PlanType } from '../../enums/planType';
|
||||
|
||||
export class OrganizationResponse {
|
||||
id: string;
|
||||
name: string;
|
||||
businessName: string;
|
||||
businessAddress1: string;
|
||||
businessAddress2: string;
|
||||
businessAddress3: string;
|
||||
businessCountry: string;
|
||||
businessTaxNumber: string;
|
||||
billingEmail: string;
|
||||
plan: string;
|
||||
planType: PlanType;
|
||||
seats: number;
|
||||
maxCollections: number;
|
||||
maxStorageGb: number;
|
||||
useGroups: boolean;
|
||||
useDirectory: boolean;
|
||||
useEvents: boolean;
|
||||
useTotp: boolean;
|
||||
use2fa: boolean;
|
||||
|
||||
constructor(response: any) {
|
||||
this.id = response.Id;
|
||||
this.name = response.Name;
|
||||
this.businessName = response.BusinessName;
|
||||
this.businessAddress1 = response.BusinessAddress1;
|
||||
this.businessAddress2 = response.BusinessAddress2;
|
||||
this.businessAddress3 = response.BusinessAddress3;
|
||||
this.businessCountry = response.BusinessCountry;
|
||||
this.businessTaxNumber = response.BusinessTaxNumber;
|
||||
this.billingEmail = response.BillingEmail;
|
||||
this.plan = response.Plan;
|
||||
this.planType = response.PlanType;
|
||||
this.seats = response.Seats;
|
||||
this.maxCollections = response.MaxCollections;
|
||||
this.maxStorageGb = response.MaxStorageGb;
|
||||
this.useGroups = response.UseGroups;
|
||||
this.useDirectory = response.UseDirectory;
|
||||
this.useEvents = response.UseEvents;
|
||||
this.useTotp = response.UseTotp;
|
||||
this.use2fa = response.Use2fa;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user