Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,245 changes: 676 additions & 569 deletions docs/.vuepress/config.js

Large diffs are not rendered by default.

33 changes: 28 additions & 5 deletions docs/.vuepress/enhanceApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,34 @@
* https://v1.vuepress.vuejs.org/guide/basic-config.html#app-level-enhancements
*/

const LOCALE_STORAGE_KEY = 'mojaloop-docs-locale-redirected'

function getBrowserLang () {
if (typeof navigator === 'undefined') return 'en'
const lang = navigator.language || navigator.userLanguage || ''
return lang.toLowerCase().split('-')[0]
}

export default ({
Vue, // the version of Vue being used in the VuePress app
options, // the options for the root Vue instance
router, // the router instance for the app
siteData // site metadata
Vue,
options,
router,
siteData,
isServer
}) => {
// ...apply enhancements for the site.
if (isServer) return

router.afterEach((to) => {
const alreadyRedirected = sessionStorage.getItem(LOCALE_STORAGE_KEY)
if (alreadyRedirected) return

sessionStorage.setItem(LOCALE_STORAGE_KEY, '1')

const browserLang = getBrowserLang()
const isOnFrenchPage = to.path.startsWith('/fr/')

if (browserLang === 'fr' && !isOnFrenchPage) {
return router.replace('/fr' + to.path)
}
})
}
48 changes: 40 additions & 8 deletions docs/.vuepress/theme/layouts/404.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,55 @@
<div class="content">
<h1>404</h1>
<blockquote>{{ getMsg() }}</blockquote>
<router-link to="/">Take me home.</router-link>
<router-link :to="active.homeLink">{{ active.homeLinkText }}</router-link>
</div>
</div>
</template>

<script>
const msgs = [
`There's nothing here.`,
`How did we get here?`,
`That's a Four-Oh-Four.`,
`Looks like we've got some broken links.`
]
const DEFAULT = 'en'

// Add a locale: new key + `prefix` (URL path, e.g. /de/) + copy fields.
const LOCALES = {
en: {
homeLink: '/',
homeLinkText: 'Take me home.',
messages: [
`There's nothing here.`,
`How did we get here?`,
`That's a Four-Oh-Four.`,
`Looks like we've got some broken links.`
]
},
fr: {
prefix: '/fr/',
homeLink: '/fr/',
homeLinkText: 'Retourner à l\'accueil.',
messages: [
`Il n'y a rien ici.`,
`Comment sommes-nous arrivés ici ?`,
`C'est une erreur 404.`,
`On dirait que nous avons des liens cassés.`
]
}
}

export default {
computed: {
active () {
const path = this.$route.path
for (const id of Object.keys(LOCALES)) {
if (id === DEFAULT) continue
const { prefix } = LOCALES[id]
if (prefix && path.startsWith(prefix)) return LOCALES[id]
}
return LOCALES[DEFAULT]
}
},
methods: {
getMsg () {
return msgs[Math.floor(Math.random() * msgs.length)]
const pool = this.active.messages
return pool[Math.floor(Math.random() * pool.length)]
}
}
}
Expand Down
104 changes: 82 additions & 22 deletions docs/.vuepress/theme/util/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const outboundRE = /^(https?:|mailto:|tel:)/

const normalizedMap = new Map()

export function normalize (path) {
export function normalize(path) {
if (normalizedMap.has(path)) {
return normalizedMap.get(path)
}
Expand All @@ -16,26 +16,26 @@ export function normalize (path) {
return result
}

export function getHash (path) {
export function getHash(path) {
const match = path.match(hashRE)
if (match) {
return match[0]
}
}

export function isExternal (path) {
export function isExternal(path) {
return outboundRE.test(path)
}

export function isMailto (path) {
export function isMailto(path) {
return /^mailto:/.test(path)
}

export function isTel (path) {
export function isTel(path) {
return /^tel:/.test(path)
}

export function ensureExt (path) {
export function ensureExt(path) {
if (isExternal(path)) {
return path
}
Expand All @@ -49,7 +49,7 @@ export function ensureExt (path) {
return normalized + '.html' + hash
}

export function isActive (route, path) {
export function isActive(route, path) {
const routeHash = route.hash
const linkHash = getHash(path)
if (linkHash && routeHash !== linkHash) {
Expand All @@ -60,7 +60,7 @@ export function isActive (route, path) {
return routePath === pagePath
}

export function resolvePage (pages, rawPath, base) {
export function resolvePage(pages, rawPath, base) {
if (!resolvePage.cache) {
resolvePage.cache = new Map()
pages.forEach((page, i) => {
Expand Down Expand Up @@ -89,7 +89,7 @@ export function resolvePage (pages, rawPath, base) {
return {}
}

function resolvePath (relative, base, append) {
function resolvePath(relative, base, append) {
const firstChar = relative.charAt(0)
if (firstChar === '/') {
return relative
Expand Down Expand Up @@ -134,7 +134,7 @@ function resolvePath (relative, base, append) {
* @param { string } localePath
* @returns { SidebarGroup }
*/
export function resolveSidebarItems (page, regularPath, site, localePath, versions) {
export function resolveSidebarItems(page, regularPath, site, localePath, versions) {
const { pages } = site
let themeConfig = site.themeConfig

Expand Down Expand Up @@ -172,7 +172,7 @@ export function resolveSidebarItems (page, regularPath, site, localePath, versio
* @param { Page } page
* @returns { SidebarGroup }
*/
function resolveHeaders (page) {
function resolveHeaders(page) {
const headers = groupHeaders(page.headers || [])
return [{
type: 'group',
Expand All @@ -189,7 +189,7 @@ function resolveHeaders (page) {
}]
}

export function groupHeaders (headers) {
export function groupHeaders(headers) {
// group h3s under h2
headers = headers.map(h => Object.assign({}, h))
let lastH2
Expand All @@ -203,13 +203,13 @@ export function groupHeaders (headers) {
return headers.filter(h => h.level === 2)
}

export function resolveNavLinkItem (linkItem) {
export function resolveNavLinkItem(linkItem) {
return Object.assign(linkItem, {
type: linkItem.items && linkItem.items.length ? 'links' : 'link'
})
}

export function versionifyUserNav (navConfig, currentPage, currentVersion, localePath, routes) {
export function versionifyUserNav(navConfig, currentPage, currentVersion, localePath, routes) {
return navConfig.map(item => {
// assign item to new object so we don't override the original values
item = Object.assign({}, item)
Expand All @@ -232,12 +232,16 @@ export function versionifyUserNav (navConfig, currentPage, currentVersion, local
})
}

/** Doc paths under these prefixes reuse the default-locale sidebar keys; base is rewritten for resolvePath. */
// const SIDEBAR_LOCALE_PREFIXES = ['/fr']
const LOCALES = ['fr', 'en']

/**
* @param { Route } route
* @param { Array<string|string[]> | Array<SidebarGroup> | [link: string]: SidebarConfig } config
* @returns { base: string, config: SidebarConfig }
*/
export function resolveMatchingConfig (regularPath, config) {
export function resolveMatchingConfig(regularPath, config) {
if (Array.isArray(config)) {
return {
base: '/',
Expand All @@ -252,27 +256,83 @@ export function resolveMatchingConfig (regularPath, config) {
}
}
}
const localePrefix = LOCALES.find(
(l) =>
regularPath === `/${l}` ||
regularPath === `/${l}/` ||
regularPath.startsWith(`/${l}/`)
)

if (!localePrefix) {
return {}
}

const rest = regularPath.slice(localePrefix.length + 1)

const pathWithoutLocale =
!rest || rest === '/' ? '/' : rest.startsWith('/') ? rest : `/${rest}`

for (const base in config) {
if (ensureEndingSlash(pathWithoutLocale).indexOf(base) === 0) {
return {
base: `/${localePrefix}${base}`,
config: config[base]
}
}
}
return {}
}

function ensureEndingSlash (path) {
function ensureEndingSlash(path) {
return /(\.html|\/)$/.test(path)
? path
: path + '/'
}

function resolveItem (item, pages, base, groupDepth = 1) {
function isSidebarLocaleBase(base) {
if (!base) {
return false
}
return LOCALES.some(
locale => base === `/${locale}/` || base.startsWith(`/${locale}/`)
)
}

/**
* For localized doc trees (e.g. /fr/...), prefer each page's title or frontmatter.sidebarTitle
* over the English label from themeConfig.
*/
function sidebarTitleForResolvedPage(resolved, base, fallbackTitle) {
if (resolved.type !== 'page') {
return fallbackTitle
}
const frontmatter = resolved.frontmatter || {}

if (frontmatter.sidebarTitle) {
return frontmatter.sidebarTitle
}

if (isSidebarLocaleBase(base)) {
return resolved.title || fallbackTitle
}

return fallbackTitle || resolved.title
}

function resolveItem(item, pages, base, groupDepth = 1) {
if (typeof item === 'string') {
return resolvePage(pages, item, base)
} else if (Array.isArray(item)) {
return Object.assign(resolvePage(pages, item[0], base), {
title: item[1]
const resolved = resolvePage(pages, item[0], base)
return Object.assign(resolved, {
title: sidebarTitleForResolvedPage(resolved, base, item[1])
})
} else {
const children = item.children || []
if (children.length === 0 && item.path) {
return Object.assign(resolvePage(pages, item.path, base), {
title: item.title
const resolved = resolvePage(pages, item.path, base)
return Object.assign(resolved, {
title: sidebarTitleForResolvedPage(resolved, base, item.title)
})
}
return {
Expand All @@ -286,7 +346,7 @@ function resolveItem (item, pages, base, groupDepth = 1) {
}
}

export function calculateCurrentAnchor (sidebarLinks) {
export function calculateCurrentAnchor(sidebarLinks) {
const anchors = [].slice
.call(document.querySelectorAll('.header-anchor'))
.filter(anchor => sidebarLinks.some(sidebarLink => sidebarLink.hash === anchor.hash))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Intégration métier des DFSP

Le parcours d'intégration des DFSP comprend des étapes qui se déroulent en dehors du Hub Mojaloop. Elles sont liées au volet métier de l'intégration, et il est utile pour l'opérateur du Hub d'en être informé.

::: tip NOTE
Les étapes du processus de candidature du DFSP et du parcours d'intégration métier sont définies par le schéma, en conformité avec les exigences réglementaires financières locales.
:::

Les étapes clés du parcours d'intégration métier sont :

1. Le DFSP découvre le service offert par le schéma et indique son intention et sa raison commerciale de rejoindre le schéma.
1. Le DFSP signe un accord de candidature.
1. La documentation est partagée avec le DFSP, ce qui permet au DFSP d'évaluer l'effort technique d'intégration, ainsi que sa compatibilité commerciale avec les règles du schéma.
1. L'opérateur du schéma effectue une vérification préalable de l'éligibilité du candidat.
1. Le DFSP comprend et signe un accord de participation (contrat).
1. Le DFSP effectue une procédure KYC auprès de la banque de règlement. Cela fait partie du processus d'ouverture d'un compte bancaire de règlement (également appelé compte de liquidité).
1. Le DFSP développe de nouvelles fonctionnalités d'interface utilisateur / met à jour les fonctionnalités d'interface utilisateur existantes pour exposer le ou les cas d'utilisation pris en charge par le schéma aux utilisateurs finaux.
1. Le DFSP ouvre et pré-alimente son compte de liquidité à la banque de règlement.

En parallèle des étapes métier, après la signature de l'accord de participation, le DFSP peut commencer son [parcours d'intégration technique](technical-onboarding.md).
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Introduction – Guide d'intégration pour l'opérateur du Hub

Ce guide est destiné à l'opérateur d'un Hub Mojaloop et fournit des informations sur le processus d'intégration des DFSP. Il offre une vue d'ensemble de haut niveau du parcours d'intégration que suivent les DFSP, servant de liste de contrôle des activités d'intégration. L'objectif est d'aider les employés du Hub à comprendre les étapes à accomplir lors de la connexion des DFSP aux différents environnements du Hub.


Loading