From 87d0fbe13bdd226d5e53ab4d65a3f2285f5061e8 Mon Sep 17 00:00:00 2001 From: Andres Vallecilla Date: Thu, 6 Jun 2024 09:05:19 -0500 Subject: [PATCH] feat: add new organization --- .github/workflows/ci.yml | 31 +++++ examples/base.yml | 146 +++++++++++++++++++++++ examples/createCredentialProfile.yml | 169 +++++++++++++++++++++++++++ examples/getExternalData.yml | 81 +++++++++++++ schema.v1.json => schema.json | 0 5 files changed, 427 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 examples/base.yml create mode 100644 examples/createCredentialProfile.yml create mode 100644 examples/getExternalData.yml rename schema.v1.json => schema.json (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..8e6d816 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +name: Validate YAML +on: + pull_request: + branches: [main, dev] + types: [opened, synchronize, reopened, labeled] + push: + branches: [main, dev] + workflow_dispatch: + +jobs: + validate-yaml: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + # - id: generate-mapping + # run: | + # mapping=$(jq -n '{}') + # for vdir in Fastbot/v*; do + # version=${vdir#Fastbot/} + # mapping=$(jq ".\"config/schema.json\" = [\"$version/**/*.{yaml,yml}\"]" <<< "$mapping") + # done + # echo "mapping=$(printf '%s' "$mapping" | jq -c .)" >> $GITHUB_OUTPUT + + - uses: InoUno/yaml-ls-check@develop + with: + root: Fastbot/ + schemaMapping: | + { + "schema.json": [ "examples/*.{yaml,yml}" ] + } \ No newline at end of file diff --git a/examples/base.yml b/examples/base.yml new file mode 100644 index 0000000..5a11d92 --- /dev/null +++ b/examples/base.yml @@ -0,0 +1,146 @@ +## Example file +version: 1.0 +optionManage: + - type: user-manage + id: ENABLED_AVAILABLE_CMD + key: /help + - type: user-manage + id: ENABLED_AVAILABLE_CMD + key: /continue + - type: user-manage + id: ENABLED_IDENTITY_PROOF + key: welcome + value: citizenId,firstname,lastname,birthdate,photo,citizenSince + nextStep: step_0 + - type: user-manage + id: ENABLED_CREDENTIAL_TYPES + key: step_4 + value: + name: test regional credential + version: 1.0 + attributes: + - expired + - type_document + - document + - type: user-manage + id: ENABLED_INVITATION_CREDENTIAL + key: welcome + value: + type: invitation + label: Cédula Verificable 🇧🇴 (demo Segip) + imageUrl: https://q.bolivia.demos.2060.io/avatar.png + did: did:web:bolivia.demos.2060.io + - type: service-manage + id: ENABLED_STEP + key: welcome + item: + - type: text + content: Hello, welcome to the registration system for Mobiera SAS applicants + - type: text + content: Firstly, please send your email credential to begin the identity validation process + - type: identity-proof-request + requestedProofItems: + - type: verifiable-credential + credentialDefinitionId: did:web:bolivia.demos.2060.io?service=anoncreds&relativeRef=/credDef/Co5UrRrQnuovN5BapF74CUZPL7UxqeCqwPbtsJ9u6eJR + attributes: + - citizenId + - firstname + - lastname + - birthdate + - photo + - citizenSince + - type: service-manage + id: ENABLED_STEP + key: step_0 + item: + - type: text + content: Please enter your name + - type: contextual-menu-update + title: Option menu + description: Press "continue" to continue the process + options: + - id: /help + title: help + - id: /continue + title: continue + save: true + confirm: true + response: text + nextStep: step_1 + - type: service-manage + id: ENABLED_STEP + key: step_1 + item: + - type: text + content: now please enter your last name + - type: contextual-menu-update + title: Option menu + description: Press "continue" to continue the process + options: + - id: /help + title: help + - id: /continue + title: continue + save: true + confirm: true + response: text + nextStep: step_2 + - type: service-manage + id: ENABLED_STEP + key: step_2 + item: + - type: contextual-menu-update + title: Option menu + description: Press "continue" to continue the process + options: + - id: /help + title: help + - id: /continue + title: continue + - type: menu-display + prompt: select your type of identity document + menuItems: + - id: cc + text: CC + - id: ti + text: TI + - id: ce + text: CE + save: true + confirm: true + nextStep: step_3 + - type: service-manage + id: ENABLED_STEP + key: step_3 + item: + - type: text + content: Please enter your ID without periods or commas + - type: contextual-menu-update + title: Option menu + description: Press "continue" to continue the process + options: + - id: /help + title: help + - id: /continue + title: continue + save: true + confirm: true + response: text + nextStep: step_4 + - type: service-manage + id: ENABLED_STEP + key: step_4 + item: + - type: credential-issuance + credentialDefinitionId: + claims: + - name: id + value: + - name: expired + value: 2592000 + - name: type_document + value: step_2 + - name: document + value: step_3 + - name: issued + value: \ No newline at end of file diff --git a/examples/createCredentialProfile.yml b/examples/createCredentialProfile.yml new file mode 100644 index 0000000..bd44331 --- /dev/null +++ b/examples/createCredentialProfile.yml @@ -0,0 +1,169 @@ +## Example file +version: 1.0 +optionManage: + - type: user-manage + id: ENABLED_AVAILABLE_CMD + key: /help + item: + - type: text + content: To begin the creation of the verifiable identity please use the context menu the "Start register" option + - type: user-manage + id: ENABLED_AVAILABLE_CMD + key: /continue + - type: user-manage + id: ENABLED_AVAILABLE_CMD + key: /return + nextStep: welcome + - type: user-manage + id: ENABLED_AVAILABLE_CMD + key: /start + nextStep: step_0 + - type: user-manage + id: ENABLED_AVAILABLE_CMD + key: /name + item: + - type: text + content: Please enter the new full name, after confirming it will be updated. + nextStep: step_0 + - type: user-manage + id: ENABLED_AVAILABLE_CMD + key: /photo + item: + - type: text + content: Please enter the new photo, after confirming it will be updated. + nextStep: step_1 + - type: user-manage + id: ENABLED_AVAILABLE_CMD + key: /update + nextStep: update + - type: user-manage + id: ENABLED_AVAILABLE_CMD + key: /credential + nextStep: credential + - type: user-manage + id: ENABLED_CREDENTIAL_TYPES + key: credential + value: + name: test regional credential + version: 1.0 + attributes: + - id + - expired + - type_document + - document + - issued + - type: service-manage + id: ENABLED_STEP + key: welcome + item: + - type: text + content: Hello, welcome to the registration system for Mobiera SAS applicants + - type: text + content: To start the process use the "Start register" button on contextual menu + - type: contextual-menu-update + title: Option menu + description: Press "continue" to continue the process + options: + - id: /help + title: Help + - id: /continue + title: Continue + - id: /start + title: Start register + - type: service-manage + id: ENABLED_STEP + key: step_0 + item: + - type: text + content: Please enter your complete name + - type: contextual-menu-update + title: Option menu + description: Press "Continue" to continue the process or "Return" to start again + options: + - id: /continue + title: Continue + - id: /return + title: Return + save: true + confirm: true + response: text + textValidator: ^.{1,15}$ + nextStep: step_1 + - type: service-manage + id: ENABLED_STEP + key: step_1 + item: + - type: text + content: now please enter your picture + - type: contextual-menu-update + title: Option menu + description: Press "Continue" to continue the process or "Return" to start again + options: + - id: /help + title: Help + - id: /continue + title: Continue + - id: /return + title: Return + response: media + save: true + confirm: true + nextStep: step_2 + - type: service-manage + id: ENABLED_STEP + key: step_2 + item: + - type: text + content: Excellent, your identity has been created!!!, now you can update your data and generate a credential, remember that at any time it is possible to update your information + - type: contextual-menu-update + title: Option menu + description: Update menu + options: + - id: /update + title: Update data + - id: /credential + title: Generate credential + freezeState: true + - type: service-manage + id: ENABLED_STEP + key: credential + item: + - type: contextual-menu-update + title: Option menu + description: Update menu + options: + - id: /continue + title: Continue + - id: /update + title: Update data + - id: /credential + title: Generate credential + - type: credential-issuance + credentialDefinitionId: + claims: + - name: id + value: + - name: expired + value: 2592000 + - name: type_document + value: step_0 + - name: document + value: step_1 + - name: issued + value: + - type: service-manage + id: ENABLED_STEP + key: update + item: + - type: text + content: Please choose the type of update + - type: contextual-menu-update + title: Option menu + description: Update menu + options: + - id: /continue + title: Continue + - id: /name + title: Complete name + - id: /photo + title: Photo \ No newline at end of file diff --git a/examples/getExternalData.yml b/examples/getExternalData.yml new file mode 100644 index 0000000..a56875e --- /dev/null +++ b/examples/getExternalData.yml @@ -0,0 +1,81 @@ +## Example file +version: 1.0 +optionManage: + - type: user-manage + id: ENABLED_ENDPOINT_SETUP + key: step_0 + item: + - type: media + description: id + items: + - title: name + description: creationAt + uri: image + mimeType: image/jpg + - type: text + content: creationAt + value: + url: https://api.escuelajs.co/api/v1/categories?limit=1 + attributes: + - id + - name + - image + - creationAt + - updatedAt + - type: user-manage + id: ENABLED_AVAILABLE_CMD + key: /help + item: + - type: text + content: Don't forget that if you validate your identity you will be able to access our services + - type: user-manage + id: ENABLED_AVAILABLE_CMD + key: /reload + - type: user-manage + id: ENABLED_IDENTITY_PROOF + key: welcome + value: expired,type_document,document + nextStep: step_0 + - type: user-manage + id: ENABLED_INVITATION_CREDENTIAL + key: welcome + value: + type: invitation + label: Credential (dev) + imageUrl: https://q.credential.demos.dev.2060.io/avatar.png + did: did:web:credential.demos.dev.2060.io + - type: service-manage + id: ENABLED_STEP + key: welcome + item: + - type: text + content: Hello, welcome to the informative news system, to receive your daily update please validate your identity + - type: contextual-menu-update + title: Option menu + description: Press "continue" to continue the process + options: + - id: /help + title: Help + - id: /reload + title: Continue + - type: identity-proof-request + requestedProofItems: + - type: verifiable-credential + credentialDefinitionId: did:web:credential.demos.dev.2060.io?service=anoncreds&relativeRef=/credDef/DbgrAvTfQFFHhSHxkVsGAFtCYNoxgcyVTzG6S2vxTo52 + attributes: + - expired + - type_document + - document + - type: service-manage + id: ENABLED_STEP + key: step_0 + item: + - type: text + content: Welcome, this is the news that happened today + - type: contextual-menu-update + title: Option menu + description: Press "Continue" to continue the process or "Return" to start again + options: + - id: /reload + title: Reaload news + endpoint: true \ No newline at end of file diff --git a/schema.v1.json b/schema.json similarity index 100% rename from schema.v1.json rename to schema.json