1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-27 06:58:17 +01:00
phorge-phorge/src
epriestley ea9187ea92 Allow Almanac properties to be set and deleted via Conduit
Summary:
Depends on D19342. Ref T12414. Ref T13120. This adds an EditEngine extension for editing Almanac properties.

The actual wire format is a little weird. Normally, we'd have a transaction for each property, but since you can pick any property names you want we can't really do that (we'd have to generate infinite transactions).

The transaction wire format anticipates that transactions may eventually get some kind of metadata -- each transaction looks like this:

```
{
  "type": "title",
  "value": "Example title"
}
```

...and we can add more keys there. For example, I could have made this transaction look like this:

```
{
  "type": "property.set",
  "almanac.property.key": "some-key",
  "value": "some-value"
}
```

However, I don't want to just accept any possible key freely, and it might be a decent chunk of work to formalize this better. It also doesn't feel great.

I just built special transaction types intead, so you:

```
{
  "type": "property.set",
  "value": {
   "some-key": "some-value",
   ...
  }
}
```

Internally, we may generate more than one transaction as a result (if the "value" has more than one key).

This feels a bit more natural and is probably easier for clients to use anyway.

Test Plan: Set and deleted Service, Device and Binding properties via the API.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13120, T12414

Differential Revision: https://secure.phabricator.com/D19343
2018-04-11 10:42:10 -07:00
..
__tests__ Use PhutilClassMapQuery instead of PhutilSymbolLoader 2015-08-14 07:49:01 +10:00
aphront Fix DocumentEngine line behaviors in Diffusion 2018-04-09 04:46:47 -07:00
applications Allow Almanac properties to be set and deleted via Conduit 2018-04-11 10:42:10 -07:00
docs Remove "Large Changes" documentation and make some minor behavioral improvements 2018-04-05 06:40:46 -07:00
extensions
infrastructure Fix YouTube remarkup rule being blocked by Content-Security-Policy header 2018-04-02 16:11:02 -07:00
view When lines 12, 13, 14, etc all blame to the same change, only show it once 2018-04-09 06:11:06 -07:00
__phutil_library_init__.php
__phutil_library_map__.php Allow Almanac properties to be set and deleted via Conduit 2018-04-11 10:42:10 -07:00