|
| 1 | +/* |
| 2 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 3 | + * you may not use this file except in compliance with the License. |
| 4 | + * You may obtain a copy of the License at |
| 5 | + * |
| 6 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 7 | + * |
| 8 | + * Unless required by applicable law or agreed to in writing, software |
| 9 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | + * See the License for the specific language governing permissions and |
| 12 | + * limitations under the License. |
| 13 | + */ |
| 14 | +concerto version "^3.0.0" |
| 15 | + |
| 16 | + |
| 17 | +/* |
| 18 | + * Definitions in this file do not enforce character constraints (for example, using |
| 19 | + * regular expressions or digits). It is the responsibility of the application to enforce |
| 20 | + * theseconstraints. This allows broader compatibility between systems and agreements which |
| 21 | + * may have different requirements. |
| 22 | + */ |
| 23 | + |
| 24 | +/* |
| 25 | + * An email address without enclosing angle brackets |
| 26 | + * |
| 27 | + * Note: There is a restriction in RFC 2821 on the length of an |
| 28 | + * address in MAIL and RCPT commands of 254 characters |
| 29 | + * https://www.rfc-editor.org/errata_search.php?rfc=3696 |
| 30 | + */ |
| 31 | +scalar EmailAddress extends String length=[,254] |
| 32 | + |
| 33 | +/* |
| 34 | + * A representation of telephone numbers to define commonly used structures |
| 35 | + */ |
| 36 | +concept PhoneNumber { |
| 37 | + /* |
| 38 | + * A formatted E.123 national number, potentially including spaces parentheses |
| 39 | + * and separators (e.g. '-'). Does not include an International Prefix, extension, |
| 40 | + * trunk prefix or alternate endings. |
| 41 | + * https://www.itu.int/rec/T-REC-E.123-200102-I/en |
| 42 | + */ |
| 43 | + o String number length=[0,32] |
| 44 | + |
| 45 | + /* |
| 46 | + * A standardized E.164 international telephone number without formatting such |
| 47 | + * as spaces, parentheses or separators (e.g. '-'). Includes the International Prefix |
| 48 | + * and Subscriber Number (National Destination Code and Base Number). Does not |
| 49 | + * include an extension, trunk prefix or alternate endings. |
| 50 | + * https://www.itu.int/rec/T-REC-E.164-201011-I/en |
| 51 | + */ |
| 52 | + o String normalizedNumber length=[,15] optional |
| 53 | + |
| 54 | + /* |
| 55 | + * An E.164 Network Address Extension / Sub-address ("Ext.", Direct Dial In, |
| 56 | + * or Direct Inward Dial) number. Does not include a "Ext." characters. |
| 57 | + * https://www.itu.int/rec/T-REC-E.164-201011-I/en |
| 58 | + */ |
| 59 | + o String extension length=[0,6] optional |
| 60 | + |
| 61 | + /* |
| 62 | + * The International Prefix or Country Code (CC) for the telephone number. Includes |
| 63 | + * the leading '+' character or zeros. The International Prefix has 1-3 digits. |
| 64 | + * https://www.itu.int/rec/T-REC-E.164-201011-I/en |
| 65 | + */ |
| 66 | + o String countryCode length=[0,7] optional |
| 67 | +} |
0 commit comments