UNPKG

@starsched/sdk

Version:

ABA clinic control and management service API SDK

121 lines 3.38 kB
import type { StarSchedAPIProtocols } from '../../../common/types/common'; import type { HttpClientProtocols } from '../../../http/protocols/client.protocols'; export declare namespace UpdateCompanyMemberRole { type Input = { company_id: string; member_id: string; role: 'collaborator' | 'manager'; }; type Options = Pick<HttpClientProtocols.GetOptions, 'abortSignal'>; type Success = void; type ErrorCodes = 'validation' | 'token.not.provided' | 'token.invalid' | 'token.expired' | 'access.denied' | 'company.member.owner.role.denied' | 'company.member.owner.denied' | 'company.current-user.member.update.denied' | 'user.not.exists' | 'company.not.exists' | 'company.member.not.exists' | 'internal'; type Failure = { code: "validation"; message: string; validation: { field: "company_id"; type: "required"; message: string; }; } | { code: "validation"; message: string; validation: { field: "company_id"; type: "type"; message: string; }; } | { code: "validation"; message: string; validation: { field: "company_id"; type: "invalid"; message: string; }; } | { code: "validation"; message: string; validation: { field: "member_id"; type: "required"; message: string; }; } | { code: "validation"; message: string; validation: { field: "member_id"; type: "type"; message: string; }; } | { code: "validation"; message: string; validation: { field: "member_id"; type: "invalid"; message: string; }; } | { code: "validation"; message: string; validation: { field: "role"; type: "required"; message: string; }; } | { code: "validation"; message: string; validation: { field: "role"; type: "type"; message: string; }; } | { code: "validation"; message: string; validation: { field: "role"; type: "invalid"; message: string; }; } | { code: "token.not.provided"; message: string; } | { code: "token.invalid"; message: string; } | { code: "token.expired"; message: string; } | { code: "access.denied"; message: string; } | { code: "company.member.owner.role.denied"; message: string; } | { code: "company.member.owner.denied"; message: string; } | { code: "company.current-user.member.update.denied"; message: string; } | { code: "user.not.exists"; message: string; } | { code: "company.not.exists"; message: string; } | { code: "company.member.not.exists"; message: string; } | { code: "internal"; message: string; }; type Output = Success | Failure; type Response = StarSchedAPIProtocols.Response<Success, Failure>; } //# sourceMappingURL=update-role.protocols.d.ts.map