mirror of
https://github.com/hanzo-cpp/sdk.git
synced 2026-11-20 19:55:32 +00:00
The projection was 113 commits behind the document it claims to describe, and `generate.py --all --check` reported every one of the thirteen clients DRIFTED — the same +19 models in each, because they all fell behind the same emission. Regenerated in place from hanzo-inc/cloud openapi.yaml at 939b09d4 (sha256 087024f6…), which is the only description of this API that cannot name a route the binary does not serve. `--check` is clean across all thirteen after. .spec-lock moved with the code. The generator READS that file and never writes it — hanzoai/ci`s lane does — so a hand run leaves every lock naming the previous document. A lock that disagrees with the tree beside it is worse than no lock: the next `--check` without `--spec` fetches what production serves, compares it to a digest that was already wrong, and reports drift that is really staleness.
69 lines
2.7 KiB
C++
69 lines
2.7 KiB
C++
/**
|
|
* Hanzo Cloud API
|
|
* The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
|
*
|
|
* The version of the OpenAPI document: v1
|
|
*
|
|
* NOTE: This class is auto generated by OpenAPI-Generator 7.14.0.
|
|
* https://openapi-generator.tech
|
|
* Do not edit the class manually.
|
|
*/
|
|
|
|
/*
|
|
* PrefApi.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_API_PrefApi_H_
|
|
#define HANZO_API_PrefApi_H_
|
|
|
|
|
|
|
|
#include "hanzo/ApiClient.h"
|
|
|
|
#include "hanzo/model/PrefsView.h"
|
|
#include <boost/optional.hpp>
|
|
|
|
namespace hanzo {
|
|
namespace api {
|
|
|
|
using namespace hanzo::model;
|
|
|
|
|
|
|
|
class PrefApi
|
|
{
|
|
public:
|
|
|
|
explicit PrefApi( std::shared_ptr<const ApiClient> apiClient );
|
|
|
|
virtual ~PrefApi();
|
|
|
|
/// <summary>
|
|
/// Returns the signed-in caller's OWN preference document — the theme, density and pinned nav that follow them across every Hanzo surface.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns the signed-in caller's OWN preference document — the theme, density and pinned nav that follow them across every Hanzo surface. There is no path to another user's preferences: not for an org admin, not for a platform SuperAdmin, because the subject is built from the validated credential and is the mandatory predicate on the read. A caller who has never saved anything gets an empty document at 200, never a 404, so the user menu always renders.
|
|
/// </remarks>
|
|
pplx::task<std::shared_ptr<PrefsView>> getPref(
|
|
) const;
|
|
/// <summary>
|
|
/// Save the preference keys your surface owns, leaving every other key alone
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Merges a JSON object key-wise into the signed-in caller's OWN preference document and answers with the whole document after the merge, so a surface saves `theme` without having to send back the `density` another surface owns. The merge is SHALLOW and the key space is open: an unnamed key is left untouched, a named key is replaced whole, and a key sent with a `null` value is DELETED. The subject is the `<owner>/<name>` identity built from the validated credential and is the mandatory predicate on the write, so there is no path to another user's preferences — not for an org admin, not for a platform SuperAdmin. Fails closed: no validated principal is 403; an empty body or a literal `null` is 400; and a patch or a resulting document over 16 KiB or 128 keys is 413.
|
|
/// </remarks>
|
|
pplx::task<void> patchPref(
|
|
) const;
|
|
|
|
protected:
|
|
std::shared_ptr<const ApiClient> m_ApiClient;
|
|
};
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_API_PrefApi_H_ */
|
|
|