Namirasoft Content Template API V1

Namira Software Corporation Content Template API Version 1 (1.4.2)

Install


To use this cli, we need to first Install Nodejs, then run the following command.

npm i -g namirasoft-content-template-api-v1

Copied!

Commands


Healthz

Get

Returns the application health status

ns-content-template healthz get

Copied!

Value

List

Returns the value list of a given table and column

ns-content-template value list {table} {column}

Copied!

ContentTemplateCategory

List

Returns the content template category list

ns-content-template contenttemplatecategory list {filters} {page} {size}

Copied!

Get

Returns a content template category by id.

ns-content-template contenttemplatecategory get {id}

Copied!

Create

Creates a new content template category

ns-content-template contenttemplatecategory create

Copied!

--entity_id (String)

--category_id (String)

Delete

Deletes a content template category by an id.

ns-content-template contenttemplatecategory delete {id}

Copied!

ContentTemplateField

List

Returns the content template field list

ns-content-template contenttemplatefield list {filters} {page} {size}

Copied!

Get

Returns a content template field by id.

ns-content-template contenttemplatefield get {id}

Copied!

Create

Creates a new content template field

ns-content-template contenttemplatefield create

Copied!

--entity_id (String)

--field_id (String)

--value (String)

--description (String)

Update

Updates a content template field by an id

ns-content-template contenttemplatefield update {id}

Copied!

--entity_id (String)

--field_id (String)

--value (String)

--description (String)

Delete

Deletes a content template field by an id.

ns-content-template contenttemplatefield delete {id}

Copied!

ContentTemplateTag

List

Returns the content template tag list

ns-content-template contenttemplatetag list {filters} {page} {size}

Copied!

Get

Returns a content template tag by id.

ns-content-template contenttemplatetag get {id}

Copied!

Create

Creates a new content template tag

ns-content-template contenttemplatetag create

Copied!

--entity_id (String)

--name (String)

--value (String)

--description (String)

Update

Updates a content template tag by an id

ns-content-template contenttemplatetag update {id}

Copied!

--entity_id (String)

--name (String)

--value (String)

--description (String)

Delete

Deletes a content template tag by an id.

ns-content-template contenttemplatetag delete {id}

Copied!

ContentTemplate

List

Returns the content template list

ns-content-template contenttemplate list {filters} {page} {size}

Copied!

Get

Returns a content template by an id

ns-content-template contenttemplate get {id}

Copied!

Create

Creates a new content template

ns-content-template contenttemplate create

Copied!

--workspace_id (String)

--name (String)

--type (Enum)

--content (String)

--description (String)

--content_template_parameters (Array)

Update

Updates a content template by an id

ns-content-template contenttemplate update {id}

Copied!

--workspace_id (String)

--name (String)

--type (Enum)

--content (String)

--description (String)

--content_template_parameters (Array)

Delete

Deletes a content template by an id

ns-content-template contenttemplate delete {id}

Copied!

Make

Returns the content of the ContentTemplate

ns-content-template contenttemplate make {id}

Copied!

--parameters (Object)

SendSMS

Sends an SMS with the content of the Content Template

ns-content-template contenttemplate sendsms {id} {provider_id}

Copied!

--phone (String)

--parameters (Object)

SendEmail

Sends an Email with the content of the Content Template

ns-content-template contenttemplate sendemail {id} {provider_id}

Copied!

--email (String)

--title (String)

--parameters (Object)

Schemas


ContentTemplateCategory

{
  "name": "ContentTemplateCategory",
  "type": "Object",
  "required": true,
  "fields": {
    "id": {
      "type": "Integer",
      "required": true
    },
    "user_id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20,
      "allowEmpty": false
    },
    "entity_id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20,
      "allowEmpty": false
    },
    "category_id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20,
      "allowEmpty": false
    },
    "created_at": {
      "type": "DateTime",
      "required": true
    },
    "updated_at": {
      "type": "DateTime",
      "required": true
    }
  }
}

EntityCategoryInput

{
  "name": "EntityCategoryInput",
  "type": "Object",
  "required": true,
  "fields": {
    "entity_id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20,
      "allowEmpty": false
    },
    "category_id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20,
      "allowEmpty": false
    }
  }
}

ContentTemplateField

{
  "name": "ContentTemplateField",
  "type": "Object",
  "required": true,
  "fields": {
    "id": {
      "type": "Integer",
      "required": true
    },
    "user_id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20,
      "allowEmpty": false
    },
    "entity_id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20,
      "allowEmpty": false
    },
    "field_id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20,
      "allowEmpty": false
    },
    "value": {
      "type": "String",
      "required": true,
      "allowEmpty": false
    },
    "description": {
      "type": "String",
      "required": false,
      "allowEmpty": true
    },
    "created_at": {
      "type": "DateTime",
      "required": true
    },
    "updated_at": {
      "type": "DateTime",
      "required": true
    }
  }
}

EntityFieldInput

{
  "name": "EntityFieldInput",
  "type": "Object",
  "required": true,
  "fields": {
    "entity_id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20,
      "allowEmpty": false
    },
    "field_id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20,
      "allowEmpty": false
    },
    "value": {
      "type": "String",
      "required": true,
      "allowEmpty": false
    },
    "description": {
      "type": "String",
      "required": false,
      "allowEmpty": true
    }
  }
}

ContentTemplateTag

{
  "name": "ContentTemplateTag",
  "type": "Object",
  "required": true,
  "fields": {
    "id": {
      "type": "Integer",
      "required": true
    },
    "user_id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20,
      "allowEmpty": false
    },
    "entity_id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20,
      "allowEmpty": false
    },
    "name": {
      "type": "String",
      "required": true,
      "allowEmpty": false
    },
    "value": {
      "type": "String",
      "required": true,
      "allowEmpty": false
    },
    "description": {
      "type": "String",
      "required": false,
      "allowEmpty": true
    },
    "created_at": {
      "type": "DateTime",
      "required": true
    },
    "updated_at": {
      "type": "DateTime",
      "required": true
    }
  }
}

EntityTagInput

{
  "name": "EntityTagInput",
  "type": "Object",
  "required": true,
  "fields": {
    "entity_id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20,
      "allowEmpty": false
    },
    "name": {
      "type": "String",
      "required": true,
      "allowEmpty": false
    },
    "value": {
      "type": "String",
      "required": true,
      "allowEmpty": false
    },
    "description": {
      "type": "String",
      "required": false,
      "allowEmpty": true
    }
  }
}

ContentTemplate

{
  "name": "ContentTemplate",
  "type": "Object",
  "required": true,
  "fields": {
    "id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20,
      "allowEmpty": false
    },
    "user_id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20,
      "allowEmpty": false
    },
    "workspace_id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20,
      "allowEmpty": false
    },
    "name": {
      "type": "String",
      "required": true,
      "allowEmpty": false
    },
    "type": {
      "name": "ContentTemplateType",
      "type": "Enum",
      "required": true,
      "valids": [
        "Plain",
        "Json",
        "Xml",
        "Html",
        "Yaml"
      ]
    },
    "content": {
      "type": "String",
      "required": true,
      "allowEmpty": false
    },
    "description": {
      "type": "String",
      "required": false,
      "allowEmpty": true
    },
    "created_at": {
      "type": "DateTime",
      "required": true
    },
    "updated_at": {
      "type": "DateTime",
      "required": true
    }
  }
}

ContentTemplateInput

{
  "name": "ContentTemplateInput",
  "type": "Object",
  "required": true,
  "fields": {
    "workspace_id": {
      "type": "String",
      "required": false,
      "min": 20,
      "max": 20,
      "allowEmpty": false
    },
    "name": {
      "type": "String",
      "required": true,
      "allowEmpty": false
    },
    "type": {
      "name": "ContentTemplateType",
      "type": "Enum",
      "required": true,
      "valids": [
        "Plain",
        "Json",
        "Xml",
        "Html",
        "Yaml"
      ]
    },
    "content": {
      "type": "String",
      "required": true,
      "allowEmpty": false
    },
    "description": {
      "type": "String",
      "required": false,
      "allowEmpty": true
    },
    "content_template_parameters": {
      "type": "Array",
      "required": false,
      "items": [
        {
          "name": "ContentTemplateParameterInput",
          "type": "Object",
          "required": false,
          "fields": {
            "name": {
              "type": "String",
              "required": true,
              "allowEmpty": false
            },
            "type": {
              "name": "ContentTemplateParameterType",
              "type": "Enum",
              "required": true,
              "valids": [
                "Boolean",
                "Integer",
                "Float",
                "String",
                "Array",
                "Object"
              ]
            },
            "required": {
              "type": "Boolean",
              "required": true
            },
            "default": {
              "type": "String",
              "required": false,
              "allowEmpty": true
            }
          }
        }
      ]
    }
  }
}

ContentTemplateParameterInput

{
  "name": "ContentTemplateParameterInput",
  "type": "Object",
  "required": false,
  "fields": {
    "name": {
      "type": "String",
      "required": true,
      "allowEmpty": false
    },
    "type": {
      "name": "ContentTemplateParameterType",
      "type": "Enum",
      "required": true,
      "valids": [
        "Boolean",
        "Integer",
        "Float",
        "String",
        "Array",
        "Object"
      ]
    },
    "required": {
      "type": "Boolean",
      "required": true
    },
    "default": {
      "type": "String",
      "required": false,
      "allowEmpty": true
    }
  }
}

Enums

ContentTemplateType

Plain

Json

Xml

Html

Yaml

ContentTemplateParameterType

Boolean

Integer

Float

String

Array

Object

Namira Software Corporation

©Copyright 2010 to 2024 Namira Software Corporation. All rights reserved.