@starsched/sdk
Version:
ABA clinic control and management service API SDK
57 lines • 1.65 kB
TypeScript
import type { StarSchedAPIProtocols } from '../../../common/types/common';
import type { HttpClientProtocols } from '../../../http/protocols/client.protocols';
import { Company } from './company';
export declare namespace CreateCompany {
type Input = {
name: string;
};
type Options = Pick<HttpClientProtocols.PostOptions, 'abortSignal'>;
type Success = Company;
type ErrorCodes = 'validation' | 'token.not.provided' | 'token.invalid' | 'token.expired' | 'user.not.exists' | 'internal';
type Failure = {
code: "validation";
message: string;
validation: {
field: "name";
type: "required";
value?: number;
message: string;
};
} | {
code: "validation";
message: string;
validation: {
field: "name";
type: "type";
value?: number;
message: string;
};
} | {
code: "validation";
message: string;
validation: {
field: "name";
type: "minlength";
value: number;
message: string;
};
} | {
code: "token.not.provided";
message: string;
} | {
code: "token.invalid";
message: string;
} | {
code: "token.expired";
message: string;
} | {
code: "user.not.exists";
message: string;
} | {
code: "internal";
message: string;
};
type Output = Success | Failure;
type Response = StarSchedAPIProtocols.Response<Success, Failure>;
}
//# sourceMappingURL=create-company.protocols.d.ts.map