target / goalert

Open source on-call scheduling, automated escalations, and notifications so you never miss a critical alert
https://goalert.me
Apache License 2.0
2.17k stars 230 forks source link

uik: add basic CRUD operations #3847

Closed mastercactapus closed 2 months ago

mastercactapus commented 2 months ago

Description: Adds setting and reading config for universal integration keys persisted in the DB.

Out of Scope:

Describe any introduced API changes:

Additional Info: Use make start EXPERIMENTAL=univ-keys

Example queries:

query GET{
  integrationKey(id:"0924bdd6-da07-44b8-a4dc-0c8dffdb43d1"){
      id
      name
    type
      config {
        stopAtFirstRule
        suppressionWindows{start}
        rules{name}
        defaultActions{dest{type}}
      }
    }

}

mutation SET {
  updateKeyConfig(input:{
    keyID: "0924bdd6-da07-44b8-a4dc-0c8dffdb43d1",

    stopAtFirstRule: false
  })
}

Note: you will need to manually set the type of the key to universal in the db