AppsService class

App CRUD against /v1/app/* for the CLI's own commands (#30) — apps create / apps list, and init's offer-to-create. Call-injected Dio (never ApiClient.forKey itself) — the KeysService contract, not upload_service.dart's: never calls exit(), every failure becomes a thrown AuthCliFault. A connectivity failure (no response at all) is rethrown as the raw DioException for the caller to report.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

create({required Dio apiDio, required String name, required String packageName}) → Future<Map<String, dynamic>>
Two calls in a fixed order — whoami before create — so the account's type/organizationId decide ownerType the way lib/ui/screens/create_app/_state.dart does, rather than the caller having to know it. FakeAdapter.calls in apps_service_test.dart proves the order. A member of an organization is refused locally, before the POST — the backend's own FORBIDDEN: 403 (appCreateService, #30) is the backstop, not the only gate, the way an already-stale whoami read could otherwise cost a wasted round trip. Individuals are never refused here — there is no "member" concept on an individual account.
isRegistered({required Dio apiDio, required String packageName}) → Future<bool>
Built on list — a pure client-side filter, no extra HTTP call (the findByName pattern, keys_service.dart). Used by init's offer-to-create so it never fires the prompt for a package already on the account.
list({required Dio apiDio}) → Future<Map<String, dynamic>>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

ins → AppsService
final