Uploaded image for project: 'mod-circulation-storage'
  1. mod-circulation-storage
  2. CIRCSTORE-132

CRUD for scheduled notices

    XMLWordPrintable

Details

    • Story
    • Status: Closed (View Workflow)
    • P1
    • Resolution: Done
    • None
    • 8.1.0
    • None
    • EPAM-Veg Sprint 16, EPAM-Veg Sprint 17
    • 5
    • Vega

    Description

      Create CRUD for scheduled tasks.

      Endpoints:

      Method Url Required permission
      GET /scheduled-notice-storage/scheduled-notices scheduled-notice-storage.scheduled-notices.collection.get
      GET /scheduled-notice-storage/scheduled-notices/id scheduled-notice-storage.scheduled-notices.item.get
      POST /scheduled-notice-storage/scheduled-notices scheduled-notice-storage.scheduled-notices.item.post
      POST /scheduled-notice-storage/bulk-save scheduled-notice-storage.bulk-save
      PUT /scheduled-notice-storage/scheduled-notices/id scheduled-notice-storage.scheduled-notices.item.put
      DELETE /scheduled-notice-storage/scheduled-notices scheduled-notice-storage.scheduled-notices.collection.delete
      DELETE /scheduled-notice-storage/scheduled-notices/id scheduled-notice-storage.scheduled-notices.item.delete

      Table:

          {
            "tableName": "scheduled_notice",
            "generateId": true,
            "pkColumnName": "_id",
            "withMetadata": true,
            "withAuditing": false
          }
      

      Schema:

      {
        "$schema": "http://json-schema.org/draft-04/schema#",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "UUID of scheduled task",
            "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
          },
          "loanId": {
            "type": "string",
            "description": "UUID of related loan for loan notices",
            "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
          },
          "requestId": {
            "type": "string",
            "description": "UUID of related request for request notices",
            "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
          },
          "nextRunTime": {
            "type": "string",
            "format": "date-time",
            "description": "Next run time"
          },
          "noticeConfig": {
            "type": "object",
            "properties": {
              "timing": {
                "type": "string",
                "description": "Timing represents when we need to send notice, before, at or after loan due date",
                "enum": [
                  "Upon At",
                  "Before",
                  "After"
                ]
              },
              "recurringPeriod": {
                "type": "object",
                "$ref": "period.json",
                "description": "Interval for recurring events"
              },
              "templateId": {
                "type": "string",
                "description": "UUID of related template",
                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
              },
              "format": {
                "type": "string",
                "description": "Notice format",
                "enum": [
                  "Email",
                  "SMS",
                  "Print"
                ]
              },
              "sendInRealTime": {
                "type": "boolean",
                "description": "Real time notice flag"
              }
            },
            "additionalProperties": false,
            "required": [
              "timing",
              "templateId",
              "format"
            ]
          },
          "metadata": {
            "$ref": "raml-util/schemas/metadata.schema",
            "readonly": true
          }
        },
        "additionalProperties": false,
        "required": [
          "nextRunTime",
          "noticeConfig"
        ]
      }
      
      
      

      Example:

      {
        "id": "4413b99a-111a-48c0-a818-fa478cb0958e",
        "loanId": "188522a4-a2df-4a48-ab3d-44b62daef27f",
        "nextRunTime": "2018-09-01T00:00:00.000+00:00",
        "noticeConfig": {
          "timing": "Before",
          "recurringPeriod": {
            "duration": 1,
            "intervalId": "Days"
          },
          "templateId": "15cdf026-dbf5-4442-8e1b-fbc900256b56",
          "format": "Email",
          "sendInRealTime": true
        }
      }
      

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                opoch Oleh Pochernin
                kostyantyn-kh Kostyantyn Khodarev (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases