Skip to content

Commit

Permalink
[MODORGSTOR-171]. Add more schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
BKadirkhodjaev committed Nov 18, 2024
1 parent eda3362 commit 840a017
Show file tree
Hide file tree
Showing 4 changed files with 222 additions and 0 deletions.
74 changes: 74 additions & 0 deletions mod-orgs/schemas/edi_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "EDI config",
"type": "object",
"properties": {
"accountNoList": {
"description": "The list of account numbers of the vendor",
"type": "array",
"items": {
"type": "string"
}
},
"defaultAcquisitionMethods": {
"description": "Default acquisition methods for the accounts",
"type": "array",
"items": {
"description": "UUID of the acquisition method",
"$ref": "../../common/schemas/uuid.json"
}
},
"ediNamingConvention": {
"description": "The naming convention for this EDI",
"type": "string"
},
"libEdiCode": {
"description": "The library code for this EDI",
"type": "string"
},
"libEdiType": {
"description": "The library type for this EDI",
"type": "string",
"enum": [
"014/EAN",
"31B/US-SAN",
"091/Vendor-assigned",
"092/Customer-assigned"
]
},
"vendorEdiCode": {
"description": "The library code for this EDI",
"type": "string"
},
"vendorEdiType": {
"description": "The library type for this EDI",
"type": "string",
"enum": [
"014/EAN",
"31B/US-SAN",
"091/Vendor-assigned",
"092/Customer-assigned"
]
},
"notes": {
"description": "The notes for this EDI",
"type": "string"
},
"sendAccountNumber": {
"description": "If true then send account number",
"type": "boolean",
"default": false
},
"supportOrder": {
"description": "If true then order support",
"type": "boolean",
"default": false
},
"supportInvoice": {
"description": "If true then invoice support",
"type": "boolean",
"default": false
}
},
"additionalProperties": false
}
64 changes: 64 additions & 0 deletions mod-orgs/schemas/edi_ftp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "The FTP object for this EDI",
"type": "object",
"properties": {
"ftpConnMode": {
"description": "The FTP connection mode for this EDI",
"type": "string",
"enum": [
"Active",
"Passive"
]
},
"ftpFormat": {
"description": "The FTP format for this EDI",
"type": "string",
"enum": [
"SFTP",
"FTP"
]
},
"ftpMode": {
"description": "The FTP mode for this EDI",
"type": "string",
"enum": [
"ASCII",
"Binary"
]
},
"ftpPort": {
"description": "The port for this EDI",
"type": "integer"
},
"invoiceDirectory": {
"description": "The invoice directory for this EDI",
"type": "string"
},
"isPrimaryTransmissionMethod": {
"description": "Primary transmission method",
"type": "boolean"
},
"notes": {
"description": "The notes for this EDI",
"type": "string"
},
"orderDirectory": {
"description": "The order directory for this EDI",
"type": "string"
},
"password": {
"description": "The login password for this EDI",
"type": "string"
},
"serverAddress": {
"description": "The server address for this EDI",
"type": "string"
},
"username": {
"description": "The login username for this EDI",
"type": "string"
}
},
"additionalProperties": false
}
20 changes: 20 additions & 0 deletions mod-orgs/schemas/edi_schedule.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "The job object for this EDI",
"type": "object",
"properties": {
"enableScheduledExport": {
"description": "Whether or not to enable scheduled for exports",
"type": "boolean",
"default": false
},
"scheduleParameters": {
"$ref": "schedule_parameters.json"
},
"schedulingNotes": {
"description": "The schedule notes for this EDI job",
"type": "string"
}
},
"additionalProperties": false
}
64 changes: 64 additions & 0 deletions mod-orgs/schemas/schedule_parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "The job object for this EDI",
"type": "object",
"properties": {
"id": {
"description": "Schedule unique identifier",
"type": "string",
"format": "uuid"
},
"scheduleFrequency": {
"type": "integer",
"description": "Number of time periods"
},
"schedulePeriod": {
"type": "string",
"description": "Time period for repeating job",
"enum": [
"MONTH",
"WEEK",
"DAY",
"HOUR",
"EXACT_DATE",
"NONE"
]
},
"schedulingDate": {
"description": "The date (MM/DD/YYYY) for this job to start running",
"format": "date-time",
"type": "string"
},
"scheduleTime": {
"type": "string",
"description": "Time to run the job"
},
"scheduleDay": {
"type": "integer",
"description": "Day of month to run the job (One-based)"
},
"weekDays": {
"type": "array",
"description": "Day of week to run the job",
"items": {
"type": "string",
"description": "Day of week",
"enum": [
"MONDAY",
"TUESDAY",
"WEDNESDAY",
"THURSDAY",
"FRIDAY",
"SATURDAY",
"SUNDAY"
]
}
},
"timeZone": {
"type": "string",
"description": "Schedule time zone",
"default": "UTC"
}
},
"additionalProperties": false
}

0 comments on commit 840a017

Please sign in to comment.