/* Learn more about configuring acc at https://myrosblog.com/adobe-campaign/acc-cli/configuration */
{
  // "alias": "staging", // Default instance alias, used when --alias is omitted
  // Options passed to @adobe/acc-js-sdk. See https://opensource.adobe.com/acc-js-sdk/connectionParameters
  "acc-js-sdk": {
    "traceAPICalls": false, // Set to true to log API calls in the console
    "noStorage": false // Set to true to disable local storage of SOAP methods
    // "timeout": 30000, // SOAP call timeout in ms, default 5000
  },
  // List of schemas (SQL tables) for acc:
  // - to download, with "acc instance pull"
  // - to upload, with "acc instance watch"
  "schemas": [
    {
      // One entry per schema, identified by its schema id (namespace:name)
      "schemaId": "nms:localOrgUnit",
      // Path to the file where the records are saved, relative to the project root
      "filename": "/Administration/Access Management/Organizational entities/{@name}.meta.xml"
    },
    {
      "schemaId": "xtk:operator",
      "filename": "/Administration/Access Management/Operator groups/{@name}.meta.xml",
      // Sensitive data are removed before saving, e.g. secrets
      "excludeXPaths": ["access/@password"],
      // Filter on the records to pull (xtk:queryDef syntax)
      "queryDef": {
        "where": { "condition": [{ "expr": "@type = 1" }] }
      }
    },
    {
      "schemaId": "xtk:operator",
      "filename": "/Administration/Access Management/Named rights/{@name}.meta.xml",
      "excludeXPaths": ["access/@password"],
      "queryDef": {
        "where": { "condition": [{ "expr": "@type = 2" }] }
      }
    },
    {
      "schemaId": "nms:deliveryMapping",
      "filename": "/Administration/Campaign Management/Target mappings/{@name}.meta.xml",
      "queryDef": {
        "where": { "condition": [{ "expr": "@builtIn = false" }] }
      }
    },
    {
      "schemaId": "nms:typology",
      "filename": "/Administration/Campaign Management/Typology management/Typologies/{@name}.meta.xml",
      "queryDef": {
        "where": { "condition": [{ "expr": "@name NOT LIKE 'xtk%'" }] }
      }
    },
    {
      "schemaId": "nms:typologyRule",
      "filename": "/Administration/Campaign Management/Typology management/Typology rules/{@name}.meta.xml",
      // XPaths extracted to their own file, e.g. code to a .js file
      "decompose": {
        "code": "/Administration/Campaign Management/Typology management/Typology rules/{@name}.js"
      },
      "queryDef": {
        "where": { "condition": [{ "expr": "@name NOT LIKE 'xtk%'" }] },
        // Records fetched per request, default 20
        "lineCount": 10
      }
    },
    {
      "schemaId": "nms:stock",
      "filename": "/Administration/Campaign Management/Stocks/{@name}.meta.xml",
      "queryDef": {
        "where": { "condition": [{ "expr": "@name NOT LIKE 'xtk%'" }] }
      }
    },
    {
      "schemaId": "xtk:olapCube",
      "filename": "/Administration/Configuration/Cubes/{@name}.meta.xml",
      "queryDef": {
        "where": { "condition": [{ "expr": "@name NOT LIKE 'xtk%'" }] }
      }
    },
    {
      "schemaId": "xtk:srcSchema",
      "filename": "/Administration/Configuration/Data schemas/{@namespace}/{@name}.xml",
      "queryDef": {
        "where": {
          "condition": [
            {
              "expr": "@namespace NOT IN ('xtk', 'nl', 'ncm','nms', 'sfdc', 'crm', 'acx', 'adb')"
            }
          ]
        },
        "orderBy": { "node": [{ "expr": "@namespace" }, { "expr": "@name" }] }
      }
    },
    {
      "schemaId": "xtk:enum",
      "filename": "/Administration/Platform/Enumerations/{@name}.meta.xml",
      "excludeXPaths": ["@lastAliasCleansing", "@lastModified"],
      "queryDef": {
        "where": {
          "condition": [
            {
              "expr": "@name NOT LIKE ''"
            }
          ]
        }
      }
    },
    {
      "schemaId": "xtk:counter",
      "filename": "/Administration/Platform/Counters/{@name}.meta.xml",
      "queryDef": {
        "where": {
          "condition": [
            {
              "expr": "@name NOT LIKE ''"
            }
          ]
        }
      }
    },
    {
      "schemaId": "xtk:jssp",
      "filename": "/Administration/Configuration/Dynamic JavaScript pages/{@namespace}/{@name}.meta.xml",
      "decompose": {
        "data": "/Administration/Configuration/Dynamic JavaScript pages/{@namespace}/{@name}.js"
      },
      "queryDef": {
        "where": {
          "condition": [
            {
              "expr": "@namespace NOT IN ('xtk', 'nl', 'ncm','nms', 'sfdc', 'crm', 'acx', 'adb')"
            }
          ]
        },
        "orderBy": { "node": [{ "expr": "@name" }] },
        "lineCount": 10
      }
    },
    {
      "schemaId": "xtk:jst",
      "filename": "/Administration/Configuration/JavaScript templates/{@namespace}/{@name}.meta.xml",
      "decompose": {
        "code": "/Administration/Configuration/JavaScript templates/{@namespace}/{@name}.js"
      },
      "queryDef": {
        "where": {
          "condition": [
            {
              "expr": "@namespace NOT IN ('xtk', 'nl', 'ncm','nms', 'sfdc', 'crm', 'acx', 'adb')"
            }
          ]
        },
        "lineCount": 10
      }
    },
    {
      "schemaId": "xtk:formRendering",
      "filename": "/Administration/Configuration/Form rendering/{@internalName}.meta.xml",
      "decompose": {
        "format/cssOverloading": "/Administration/Configuration/Form rendering/{@internalName}.css"
      },
      "queryDef": {
        "where": {
          "condition": [
            {
              "expr": "@internalName NOT LIKE 'xtk%' AND @internalName NOT LIKE 'nl%' AND @internalName NOT LIKE 'ncm%' AND @internalName NOT LIKE 'nms%'"
            }
          ]
        },
        "lineCount": 10
      }
    },
    {
      "schemaId": "xtk:form",
      "filename": "/Administration/Configuration/Input forms/{@namespace}/{@name}.xml",
      "queryDef": {
        "where": {
          "condition": [
            {
              "expr": "@namespace NOT IN ('xtk', 'nl', 'ncm','nms', 'sfdc', 'crm', 'acx', 'adb')"
            }
          ]
        },
        "orderBy": { "node": [{ "expr": "@name" }] }
      }
    },
    {
      "schemaId": "ncm:publishing",
      "filename": "/Administration/Configuration/Publication Templates/{@namespace}/{@name}.meta.xml",
      "queryDef": {
        "where": {
          "condition": [
            {
              "expr": "@namespace NOT IN ('xtk', 'nl', 'ncm','nms', 'sfdc', 'crm', 'acx', 'adb')"
            }
          ]
        }
      }
    },
    {
      "schemaId": "xtk:javascript",
      "filename": "/Administration/Configuration/JavaScript codes/{@namespace}/{@name}.meta.xml",
      "decompose": {
        "data": "/Administration/Configuration/JavaScript codes/{@namespace}/{@name}.js"
      },
      "queryDef": {
        "where": {
          "condition": [
            {
              "expr": "@namespace NOT IN ('xtk', 'nl', 'ncm','nms', 'sfdc', 'crm', 'acx', 'adb')"
            }
          ]
        },
        "orderBy": { "node": [{ "expr": "@name" }] },
        "lineCount": 10
      }
    },
    {
      "schemaId": "xtk:navtree",
      "filename": "/Administration/Configuration/Navigation hierarchies/{@namespace}/{@name}.xml",
      "queryDef": {
        "where": {
          "condition": [
            {
              "expr": "@namespace NOT IN ('xtk', 'nl', 'ncm','nms', 'sfdc', 'crm', 'acx', 'adb')",
              "boolOperator": "AND"
            },
            {
              "expr": "@name != 'merged'",
              "boolOperator": "AND"
            }
          ]
        }
      }
    },
    {
      "schemaId": "xtk:sql",
      "filename": "/Administration/Configuration/SQL scripts/{@namespace}/{@name}.meta.xml",
      "decompose": {
        "data": "/Administration/Configuration/SQL scripts/{@namespace}/{@name}.sql"
      },
      "queryDef": {
        "where": {
          "condition": [
            {
              "expr": "@namespace NOT IN ('xtk', 'nl', 'ncm','nms', 'sfdc', 'crm', 'acx', 'adb')"
            }
          ]
        },
        "lineCount": 10
      }
    },
    {
      "schemaId": "xtk:xslt",
      "filename": "/Administration/Configuration/XSL style sheets/{@namespace}/{@name}.meta.xml",
      "decompose": {
        "data": "/Administration/Configuration/XSL style sheets/{@namespace}/{@name}.xsl"
      },
      "queryDef": {
        "where": {
          "condition": [
            {
              "expr": "@namespace NOT IN ('xtk', 'nl', 'ncm','nms', 'sfdc', 'crm', 'acx', 'adb')"
            }
          ]
        },
        "lineCount": 10
      }
    },
    {
      "schemaId": "xtk:workflow",
      "filename": "/Administration/Production/Objects created automatically/Campaign workflows/{@internalName}.meta.xml",
      "queryDef": {
        "where": {
          "condition": [
            {
              "expr": "@builtIn = true AND @isModel = false AND [@operation-id] != 0"
            }
          ]
        }
      }
    },
    {
      "schemaId": "xtk:workflow",
      "filename": "/Administration/Production/Technical workflows/{@internalName}.meta.xml",
      "excludeXPaths": [
        "@errorCount",
        "@eventCount",
        "@failed",
        "@lastModified",
        "@nextProcessingDate",
        "@port",
        "@processDate",
        "@taskCount",
        "visualState"
      ],
      "queryDef": {
        "where": {
          "condition": [
            {
              "expr": "@builtIn = true AND @isModel = false AND [@operation-id] = 0"
            }
          ]
        }
      }
    },
    {
      "schemaId": "xtk:workflow",
      "filename": "/Resources/Templates/Workflow templates/{@internalName}.meta.xml",
      "queryDef": {
        "where": {
          "condition": [{ "expr": "@builtIn = true AND @isModel = true" }]
        }
      }
    },
    {
      "schemaId": "xtk:job",
      "filename": "/Resources/Templates/Job templates/{@internalName}.meta.xml",
      "queryDef": {
        "where": { "condition": [{ "expr": "@isModel = true" }] }
      }
    },
    {
      "schemaId": "nms:operation",
      "filename": "/Campaign Management/Campaigns/{@internalName}.meta.xml",
      "queryDef": {
        "where": {
          "condition": [{ "expr": "@builtIn = false AND @isModel = true" }]
        }
      }
    },
    {
      "schemaId": "nms:delivery",
      "filename": "/Campaign Management/Deliveries/{@internalName}.meta.xml",
      "decompose": {
        "content/html/source": "/Campaign Management/Deliveries/{@internalName}.html",
        "content/text/source": "/Campaign Management/Deliveries/{@internalName}.txt"
      },
      "excludeXPaths": ["@cryptedId"],
      "queryDef": {
        "where": {
          "condition": [
            { "expr": "@builtIn = true", "boolOperator": "AND" },
            { "expr": "@isModel = false", "boolOperator": "AND" }
          ]
        },
        "orderBy": { "node": [{ "expr": "@internalName" }] },
        "lineCount": 10
      }
    },
    {
      "schemaId": "nms:delivery",
      "filename": "/Resources/Templates/Delivery templates/{@internalName}.meta.xml",
      "decompose": {
        "content/html/source": "/Resources/Templates/Delivery templates/{@internalName}.html",
        "content/text/source": "/Resources/Templates/Delivery templates/{@internalName}.txt"
      },
      "excludeXPaths": ["@cryptedId"],
      "queryDef": {
        "where": {
          "condition": [
            { "expr": "@builtIn = true", "boolOperator": "AND" },
            { "expr": "@isModel = true", "boolOperator": "AND" }
          ]
        },
        "orderBy": { "node": [{ "expr": "@internalName" }] },
        "lineCount": 10
      }
    },
    {
      "schemaId": "nms:includeView",
      "filename": "/Resources/Campaign Management/Personalization blocks/{@name}.meta.xml",
      "decompose": {
        "source/html": "/Resources/Campaign Management/Personalization blocks/{@name}.html",
        "source/text": "/Resources/Campaign Management/Personalization blocks/{@name}.txt"
      },
      "queryDef": {
        "where": {
          "condition": [
            { "expr": "@type = 0", "boolOperator": "AND" },
            { "expr": "@name NOT LIKE 'xtk%'", "boolOperator": "AND" }
          ]
        },
        "lineCount": 10
      }
    },
    {
      "schemaId": "nms:includeView",
      "filename": "/Resources/Templates/Content templates/{@name}.meta.xml",
      "decompose": {
        "source/html": "/Resources/Templates/Content templates/{@name}.html",
        "source/text": "/Resources/Templates/Content templates/{@name}.txt"
      },
      "queryDef": {
        "where": {
          "condition": [
            { "expr": "@type = 1", "boolOperator": "AND" },
            { "expr": "@name NOT LIKE 'xtk%'", "boolOperator": "AND" }
          ]
        },
        "lineCount": 10
      }
    },
    {
      "schemaId": "nms:deliveryCustomization",
      "filename": "/Resources/Campaign Management/Personalization fields/{@name}.meta.xml",
      "queryDef": {
        "where": { "condition": [{ "expr": "@isModel = true" }] }
      }
    },
    {
      "schemaId": "xtk:fileRes",
      "filename": "/Resources/Online/Public resources/{@internalName}.meta.xml",
      "queryDef": {
        "where": { "condition": [{ "expr": "@fileName LIKE '%css%'" }] }
      }
    },
    {
      "schemaId": "nms:webApp",
      "filename": "/Resources/Online/Web applications/{@internalName}.xml",
      "queryDef": {
        "where": { "condition": [{ "expr": "@builtIn = false" }] },
        "orderBy": { "node": [{ "expr": "@internalName" }] }
      }
    },
    {
      "schemaId": "xtk:queryFilter",
      "filename": "/Profiles and Targets/Predefined filters/{@name}.meta.xml",
      "queryDef": {
        "where": {
          "condition": [{ "expr": "@name NOT LIKE ''" }]
        }
      }
    },
    {
      "schemaId": "nms:group",
      "filename": "/Profiles and Targets/Lists/{@name}.meta.xml",
      "queryDef": {
        "where": {
          "condition": [
            {
              "expr": "@name NOT LIKE 'xtk%'"
            }
          ]
        }
      }
    },
    {
      "schemaId": "nms:service",
      "filename": "/Profiles and Targets/Services and Subscriptions/{@name}.meta.xml",
      "excludeXPaths": [
        "social/@accessToken",
        "social/@accessTokenSecret",
        "social/@consumerKey",
        "social/@consumerSecret"
      ],
      "queryDef": {
        "where": {
          "condition": [{ "expr": "@name NOT LIKE 'xtk%'" }]
        }
      }
    },
    {
      "schemaId": "xtk:folder",
      "filename": "/Explorer/{@name}.meta.xml",
      "queryDef": {
        "where": {
          "condition": [
            {
              "expr": "@builtIn = true"
            }
          ]
        }
      }
    }
  ]
}
