Repository navigation
Conversation
Adds organisations, partners and grants modules, currentReach for the caller's reach, claimZonesForOrganisation, an organisation_id field on domains, zones, systems, modules, triggers, edges and brokers, an organisation_id query option on their index calls, and an organisation owner option when creating domains, zones and modules.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SDK half of multi-tenancy (PPT-2702, under PPT-526). Pairs with PlaceOS/rest-api#451 and PlaceOS/models#332. Draft until the set has been through the test cluster; merging publishes to npm.
What this adds
organisations,partnersandgrantsmodules with the usual query, show, add, update and remove calls.currentReach()forGET /organisations/current: the caller's reach (cluster,partnerororganisation), whether the API is enforcing, their own organisation and partner, and the organisations in reach. Backoffice reads this once at login.claimZonesForOrganisation(id, zone_ids)for adopting unowned zone trees.organisation_idonPlaceDomain,PlaceZone,PlaceSystem,PlaceModule,PlaceTrigger,PlaceEdgeandPlaceMQTTBroker.organisation_idquery option on the zone, system, module, trigger and user index calls.addDomain,addZone,addModuleandupdateDomain(cluster admins naming the organisation). Existing call signatures are unchanged.Verification
tscclean,vitest604 tests across 76 files pass,vite buildok.eslint .script fails to start on this ESLint version because the config is in the legacy format; that is unchanged by this branch.Plan: https://gist.github.com/camreeves/3fabfff92bcdef77a1dcb4b8d8ebfe7b