Having the static method ApiClient.clone in package with namespace XYZ, you are correct that this is called using:
XYZ.ApiClient.clone(value);
However, to be available for invocation with a meaningful value (and to return a meaningful response):
- The class "ApiClient" must be declared global
- The nested class "CloneResponse" must be declared global
- The method "clone" must be declared global
- The nested class "CloneRequest" must be declared global
- The CloneRequest class's constructor must be declared global
- Any properties or other methods needed on CloneRequest that must be set/invoked by the caller, and properties relevant to the caller on CloneResponse, must all be declared global
Note that it is quite possible to have done everything in points 1 through 5 but still not be able to use the clone method in a meaningful way because something from point 6 hasn't been exposed to the code outside the package.