Documentation
¶
Overview ¶
Package integration hosts `olares-cli settings integration`. Mirrors the SPA's Settings -> Integration page (S3 / Dropbox / Google Drive / Tencent COS / Olares Space accounts). Backed by user-service's account.controller.ts, all routes wrapped with returnSucceed/returnError, so the CLI sees a uniform BFL envelope.
Package integration implements the `olares-cli settings integration` subtree (Settings -> Integration). Backed by user-service's account.controller.ts. The cookie / cloud-binding / NFT subsets are browser-/wallet-bound and stay out of CLI scope; only the headless account CRUD is in.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAccountsCommand ¶
`olares-cli settings integration accounts ...`
Backed by user-service's /api/account/* (account.controller.ts):
GET /api/account/all → mini list (list verb)
GET /api/account/:type → mini list per type (list-by-type verb)
POST /api/account/retrieve {name} → single full record (get verb)
`GET /api/account/:type` upstream returns `[]IntegrationAccountMiniData` (same shape as `/all` but filtered to one type/name) — see account.service.ts:88-95 `getIntegrationAccountByAccountType` → `IntegrationAccountMiniData[]`. The SPA hits a *different* endpoint for the full record: settings/src/stores/settings/integration.ts:166-174 `getAccountFullData` → `POST /api/account/retrieve { name: key }` where `key = "integration-account:<type>:<name>"`. The CLI mirrors that split:
accounts list // GET /api/account/all accounts list-by-type <type> // GET /api/account/<type> -> []mini accounts get <type> <name> // POST /api/account/retrieve -> full
The mini list omits raw_data/tokens; the per-account GET returns the full IntegrationAccount including raw_data. We never print raw_data in --output table, but pass --output json to get it back.
The cookie store and Olares-Space NFT cloud-binding flows live behind separate routes that need browser/wallet context, so they stay out of CLI scope.