{
  "name": "kendraio",
  "label": "Kendraio",
  "description": "An adapter for Kendraio specific features",
  "version": "0.0.0",
  "infoUrl": "https://www.kendra.io/",
  "maintainer": "Kendraio",
  "supportUrl": "https://www.kendra.io",
  "database": [
    {
      "name": "music_recording",
      "schema": "schemas/music_recording.schema.json"
    },
    {
      "name": "music_work",
      "schema": "schemas/music_work.schema.json"
    },
    {
      "name": "file",
      "schema": "schemas/file.schema.json"
    }
  ],
  "workflow": [
    {
      "title": "Imported recordings (Local DB)",
      "workflowId": "listRecordings",
      "config": "configs/listRecordings.json"
    },
    {
      "title": "Bulk operations example",
      "workflowId": "bulkOperationsExample",
      "config": "configs/bulkOperationsExample.json"
    },
    {
      "title": "Faker - test data generator",
      "workflowId": "fakerTest",
      "config": "configs/fakerTest.json"
    }
  ],
  "forms": [
    {
      "formId": "edit_music_recording",
      "title": "Music Recording",
      "jsonSchema": "schemas/music_recording.schema.json",
      "uiSchema": "forms/music_recording.ui.json"
    },
    {
      "formId": "edit_music_work",
      "title": "Music Work",
      "jsonSchema": "schemas/music_work.schema.json",
      "uiSchema": "forms/music_work.ui.json"
    },
    {
      "formId": "edit_file",
      "title": "File",
      "jsonSchema": "schemas/file.schema.json",
      "uiSchema": "forms/file.ui.json"
    }
  ],
  "tags": [
    "example",
    "test"
  ],
  "attachments": {
    "configs/bulkOperationsExample.json": {
      "title": "Bulk operations example",
      "blocks": [
        {
          "type": "message",
          "title": "Sound Recordings"
        },
        {
          "type": "actions",
          "buttons": [
            {
              "label": "Add new",
              "blocks": [
                {
                  "type": "dialog",
                  "blocks": [
                    {
                      "type": "form",
                      "jsonSchema": {
                        "title": "Add new sound recording",
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string",
                            "title": "Title"
                          }
                        }
                      },
                      "uiSchema": {}
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "type": "init"
        },
        {
          "type": "query",
          "dataSource": {
            "type": "local",
            "schema": "kendraio_music-recording"
          }
        },
        {
          "type": "grid",
          "gridOptions": {
            "pagination": true,
            "paginationPageSize": 10,
            "rowSelection": "multiple"
          },
          "columnDefs": [
            {
              "width": 50,
              "resizable": false,
              "checkboxSelection": true
            },
            {
              "headerName": "Title",
              "field": "Name"
            },
            {
              "headerName": "Artist",
              "field": "Artist"
            },
            {
              "headerName": "ISRC",
              "field": "ISRC"
            }
          ]
        },
        {
          "type": "actions",
          "buttons": [
            {
              "label": "Delete",
              "blocks": [
                {
                  "type": "dialog",
                  "blocks": [
                    {
                      "type": "mapping",
                      "mapping": "{ selected: data }"
                    },
                    {
                      "type": "template",
                      "template": "<p>Are you sure you want to delete the following items?</p><ul>{{#each selected}}<li>{{_id}}</li>{{/each}}</ul>"
                    },
                    {
                      "type": "form",
                      "label": "OK",
                      "jsonSchema": {
                        "type": "object"
                      },
                      "uiSchema": {}
                    }
                  ]
                }
              ]
            },
            {
              "label": "Export",
              "blocks": [
                {
                  "type": "dialog",
                  "blocks": [
                    {
                      "type": "csv-export",
                      "header": true,
                      "skipEmptyLines": true
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "type": "debug"
        }
      ]
    },
    "configs/fakerTest.json": {
      "title": "Faker - test data generator",
      "blocks": [
        {
          "type": "actions",
          "buttons": [
            {
              "label": "Generate",
              "color": "primary",
              "blocks": [
                {
                  "type": "init"
                }
              ]
            }
          ]
        },
        {
          "type": "faker",
          "jsonSchema": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "faker": "name.findName"
              },
              "company": {
                "type": "string",
                "faker": "company.companyName"
              },
              "address": {
                "type": "object",
                "properties": {
                  "streetAddress": {
                    "type": "string",
                    "faker": "address.streetAddress"
                  },
                  "zipCode": {
                    "type": "string",
                    "faker": "address.zipCode"
                  }
                },
                "required": [
                  "streetAddress",
                  "zipCode"
                ]
              }
            },
            "required": [
              "name",
              "address",
              "company"
            ]
          }
        },
        {
          "type": "debug"
        }
      ]
    },
    "configs/listRecordings.json": {
      "title": "Imported recordings (Local DB)",
      "blocks": [
        {
          "type": "init"
        },
        {
          "type": "query",
          "dataSource": {
            "type": "local",
            "schema": "kendraio_music-recording"
          }
        },
        {
          "type": "grid",
          "columnDefs": [
            {
              "headerName": "Title",
              "field": "Name"
            },
            {
              "headerName": "Artist",
              "field": "Artist"
            },
            {
              "headerName": "ISRC",
              "field": "ISRC"
            }
          ]
        }
      ]
    },
    "forms/file.ui.json": {
      "Name": {
        "ui:placeholder": "File name"
      }
    },
    "forms/music_recording.ui.json": {
      "Name": {
        "ui:placeholder": "Recording name"
      },
      "Date": {
        "ui:widget": "datepicker"
      },
      "Collective": {
        "ui:placeholder": "Collective",
        "ui:widget": "kselect",
        "ui:valueProp": "code",
        "ui:labelProp": "code",
        "ui:refType": "fetch",
        "ui:ref": "https://kendraio.github.io/kendraio-adapter/extra/bloomen/affiliationSociety.json"
      }
    },
    "forms/music_work.ui.json": {
      "Name": {
        "ui:placeholder": "Work name"
      },
      "Collective": {
        "ui:placeholder": "Collective",
        "ui:widget": "kselect",
        "ui:valueProp": "code",
        "ui:labelProp": "code",
        "ui:refType": "fetch",
        "ui:ref": "https://kendraio.github.io/kendraio-adapter/extra/bloomen/affiliationSociety.json"
      }
    },
    "schemas/file.schema.json": {
      "title": "File",
      "description": "Kendraio File metadata",
      "type": "object",
      "version": 0,
      "name": "kendraio_file",
      "properties": {
        "File": {
          "title": "File",
          "type": "string"
        },
        "Title": {
          "title": "Title",
          "type": "string"
        },
        "Created by": {
          "title": "Created by",
          "type": "string"
        },
        "Created date": {
          "title": "Created date",
          "type": "string"
        },
        "Uploaded by": {
          "title": "Uploaded by",
          "type": "string"
        },
        "Uploaded date": {
          "title": "Uploaded date",
          "type": "string"
        },
        "Type": {
          "title": "Type",
          "type": "string"
        },
        "type": {
          "title": "type",
          "type": "string"
        }
      }
    },
    "schemas/music_recording.schema.json": {
      "title": "Music Recording",
      "description": "Kendraio Music Recording data",
      "type": "object",
      "version": 0,
      "name": "kendraio_music-recording",
      "properties": {
        "Name": {
          "title": "Track name",
          "type": "string"
        },
        "Artist": {
          "title": "Artist name",
          "type": "string"
        },
        "ISRC": {
          "title": "ISRC",
          "type": "string"
        },
        "ISWC": {
          "title": "ISWC",
          "type": "string"
        },
        "Date": {
          "title": "Date",
          "type": "string",
          "format": "date"
        },
        "Country": {
          "title": "Country",
          "type": "string"
        },
        "Owner": {
          "title": "Owner",
          "type": "string"
        },
        "Collective": {
          "title": "Collective",
          "type": "string"
        },
        "Submitted to": {
          "title": "Submitted to",
          "type": "string"
        },
        "Status": {
          "title": "Status",
          "type": "string"
        }
      }
    },
    "schemas/music_work.schema.json": {
      "title": "Music Work",
      "description": "Kendraio Music Work data",
      "type": "object",
      "version": 0,
      "name": "kendraio_music-work",
      "properties": {
        "Name": {
          "title": "Work name",
          "type": "string"
        },
        "Arranger": {
          "title": "Arranger",
          "type": "string"
        },
        "Composer": {
          "title": "Composer",
          "type": "string"
        },
        "ISWC": {
          "title": "ISWC",
          "type": "string"
        },
        "Type": {
          "title": "Type",
          "type": "string"
        },
        "lyricist": {
          "title": "Lyricist",
          "type": "string"
        },
        "Collective": {
          "title": "Collective",
          "type": "string"
        }
      }
    }
  }
}