@starsched/sdk
Version:
ABA clinic control and management service API SDK
118 lines • 3.21 kB
TypeScript
import type { StarSchedAPIProtocols } from '../../../common/types/common';
import type { HttpClientProtocols } from '../../../http/protocols/client.protocols';
export declare namespace UpdateCompanyInviteRole {
type Input = {
company_id: string;
invite_id: string;
role: 'collaborator' | 'manager';
};
type Options = Pick<HttpClientProtocols.PatchOptions, 'abortSignal'>;
type Success = undefined;
type ErrorCodes = 'validation' | 'token.not.provided' | 'token.invalid' | 'token.expired' | 'user.not.exists' | 'company.not.exists' | 'access.denied' | 'company.invite.status.not.pending' | 'company.invite.expired' | '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: "invite_id";
type: "required";
message: string;
};
} | {
code: "validation";
message: string;
validation: {
field: "invite_id";
type: "type";
message: string;
};
} | {
code: "validation";
message: string;
validation: {
field: "invite_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: "user.not.exists";
message: string;
} | {
code: "company.not.exists";
message: string;
} | {
code: "company.invite.not.exists";
message: string;
} | {
code: "company.invite.status.not.pending";
message: string;
} | {
code: "company.invite.expired";
message: string;
} | {
code: "internal";
message: string;
};
type Output = Success | Failure;
type Response = StarSchedAPIProtocols.Response<Success, Failure>;
}
//# sourceMappingURL=update-role.protocols.d.ts.map