diff --git a/common/src/abstractions/api.service.ts b/common/src/abstractions/api.service.ts index 2c7e1e922c..b4541856a0 100644 --- a/common/src/abstractions/api.service.ts +++ b/common/src/abstractions/api.service.ts @@ -52,6 +52,7 @@ import { PaymentRequest } from '../models/request/paymentRequest'; import { PolicyRequest } from '../models/request/policyRequest'; import { PreloginRequest } from '../models/request/preloginRequest'; import { ProviderAddOrganizationRequest } from '../models/request/provider/providerAddOrganizationRequest'; +import { ProviderOrganizationCreateRequest } from '../models/request/provider/providerOrganizationCreateRequest'; import { ProviderSetupRequest } from '../models/request/provider/providerSetupRequest'; import { ProviderUpdateRequest } from '../models/request/provider/providerUpdateRequest'; import { ProviderUserAcceptRequest } from '../models/request/provider/providerUserAcceptRequest'; @@ -407,7 +408,7 @@ export abstract class ApiService { deleteManyProviderUsers: (providerId: string, request: ProviderUserBulkRequest) => Promise>; getProviderClients: (providerId: string) => Promise>; postProviderAddOrganization: (providerId: string, request: ProviderAddOrganizationRequest) => Promise; - postProviderCreateOrganization: (providerId: string, request: OrganizationCreateRequest) => Promise; + postProviderCreateOrganization: (providerId: string, request: ProviderOrganizationCreateRequest) => Promise; deleteProviderOrganization: (providerId: string, organizationId: string) => Promise; getEvents: (start: string, end: string, token: string) => Promise>; diff --git a/common/src/models/request/provider/providerOrganizationCreateRequest.ts b/common/src/models/request/provider/providerOrganizationCreateRequest.ts new file mode 100644 index 0000000000..e116de6afa --- /dev/null +++ b/common/src/models/request/provider/providerOrganizationCreateRequest.ts @@ -0,0 +1,5 @@ +import { OrganizationCreateRequest } from '../organizationCreateRequest'; + +export class ProviderOrganizationCreateRequest { + constructor(public clientOwnerEmail: string, public organizationCreateRequest: OrganizationCreateRequest) { } +} diff --git a/common/src/services/api.service.ts b/common/src/services/api.service.ts index 156baf2044..d86fefd974 100644 --- a/common/src/services/api.service.ts +++ b/common/src/services/api.service.ts @@ -54,6 +54,7 @@ import { PaymentRequest } from '../models/request/paymentRequest'; import { PolicyRequest } from '../models/request/policyRequest'; import { PreloginRequest } from '../models/request/preloginRequest'; import { ProviderAddOrganizationRequest } from '../models/request/provider/providerAddOrganizationRequest'; +import { ProviderOrganizationCreateRequest } from '../models/request/provider/providerOrganizationCreateRequest'; import { ProviderSetupRequest } from '../models/request/provider/providerSetupRequest'; import { ProviderUpdateRequest } from '../models/request/provider/providerUpdateRequest'; import { ProviderUserAcceptRequest } from '../models/request/provider/providerUserAcceptRequest'; @@ -1305,7 +1306,7 @@ export class ApiService implements ApiServiceAbstraction { return this.send('POST', '/providers/' + providerId + '/organizations/add', request, true, false); } - async postProviderCreateOrganization(providerId: string, request: OrganizationCreateRequest): Promise { + async postProviderCreateOrganization(providerId: string, request: ProviderOrganizationCreateRequest): Promise { const r = await this.send('POST', '/providers/' + providerId + '/organizations', request, true, true); return new ProviderOrganizationResponse(r); }