Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions openApi/generated-onboarding/onboarding-swagger20.json
Original file line number Diff line number Diff line change
Expand Up @@ -1079,10 +1079,7 @@
"200": {
"description": "OK",
"schema": {
"additionalProperties": {
"type": "boolean"
},
"type": "object"
"$ref": "#/definitions/CheckManagerResponse"
}
},
"400": {
Expand Down Expand Up @@ -2926,6 +2923,20 @@
"title": "BusinessResourceIC",
"type": "object"
},
"CheckManagerResponse": {
"properties": {
"result": {
"description": "Is the given user manager of the institution",
"example": false,
"type": "boolean"
}
},
"required": [
"result"
],
"title": "CheckManagerResponse",
"type": "object"
},
"CompanyBillingDataDto": {
"properties": {
"businessName": {
Expand Down
17 changes: 13 additions & 4 deletions openApi/onboarding-api-docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2673,10 +2673,7 @@
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"additionalProperties" : {
"type" : "boolean"
}
"$ref" : "#/components/schemas/CheckManagerResponse"
}
}
}
Expand Down Expand Up @@ -3403,6 +3400,18 @@
}
}
},
"CheckManagerResponse" : {
"title" : "CheckManagerResponse",
"required" : [ "result" ],
"type" : "object",
"properties" : {
"result" : {
"type" : "boolean",
"description" : "Is the given user manager of the institution",
"example" : false
}
}
},
"CompanyBillingDataDto" : {
"title" : "CompanyBillingDataDto",
"required" : [ "businessName", "certified", "digitalAddress", "taxCode" ],
Expand Down
22 changes: 11 additions & 11 deletions src/api/__mocks__/DashboardApiClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import { PageRequest } from '@pagopa/selfcare-common-frontend/lib/model/PageRequ
import { EmailString } from '@pagopa/ts-commons/lib/strings';
import { PartyUserOnCreation } from '../../model/PartyUser';
import { ProductRole } from '../../model/ProductRole';
import { InstitutionUserDetailsResource, RoleEnum } from '../generated/b4f-dashboard/InstitutionUserDetailsResource';
import {
InstitutionUserDetailsResource,
RoleEnum,
} from '../generated/b4f-dashboard/InstitutionUserDetailsResource';
import { SelcRoleEnum } from '../generated/b4f-dashboard/ProductRoleInfoResource';
import { ProductUserResource } from '../generated/b4f-dashboard/ProductUserResource';
import {
Expand Down Expand Up @@ -155,28 +158,28 @@ export const DashboardApi = {
_institutionId: string,
_userId: string
): Promise<InstitutionUserDetailsResource | null> =>
new Promise((resolve) => resolve(mockedInstitutionUserDetailsResource)),
Promise.resolve(mockedInstitutionUserDetailsResource),

getPartyUsers: async (
_institutionId: string,
_productId?: string,
_role?: string,
_productRoles?: Array<ProductRole>
): Promise<Array<InstitutionUserDetailsResource>> =>
new Promise((resolve) => resolve(mockedInstitutionUserResource)),
Promise.resolve(mockedInstitutionUserResource),

getPartyProductUsers: async (
_institutionId: string,
_productId: string,
_role?: string
): Promise<Array<ProductUserResource>> =>
new Promise((resolve) => resolve(mockedProductUserResource)),
Promise.resolve(mockedProductUserResource),

savePartyUser: async (
_institutionId: string,
_productId: string,
_user: PartyUserOnCreation
): Promise<UserIdResource> => new Promise((resolve) => resolve({ id: 'newUserId' })),
): Promise<UserIdResource> => Promise.resolve({ id: 'newUserId' }),

suspendPartyRelation: async (_relationshipId: string): Promise<void> =>
new Promise((resolve) => resolve()),
Expand All @@ -185,7 +188,7 @@ export const DashboardApi = {
new Promise((resolve) => resolve()),

fetchUserRegistryByFiscalCode: async (_taxCode: string): Promise<UserResource | null> =>
new Promise((resolve) => resolve(mockedUserResource)),
Promise.resolve(mockedUserResource),

deletePartyRelation: async (_relationshipId: string): Promise<void> =>
new Promise<void>((resolve) => resolve()),
Expand All @@ -202,11 +205,8 @@ export const DashboardApi = {
_institutionId: string,
_pageRequest: PageRequest
): Promise<Array<UserGroupPlainResource>> =>
new Promise((resolve) => resolve(userGroupPlainResourceArray)),
Promise.resolve(userGroupPlainResourceArray),

addMemberToUserGroup: async (
_id: string,
_userId: string,
): Promise<void> =>
addMemberToUserGroup: async (_id: string, _userId: string): Promise<void> =>
new Promise((resolve) => resolve()),
};
Loading