properties.stone 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. namespace properties
  2. "This namespace contains helper entities for property and property/template endpoints."
  3. alias TemplateId = String(min_length=1,pattern="(/|ptid:).*")
  4. struct PropertyGroupTemplate
  5. "Describes property templates that can be filled and associated with a file."
  6. name String
  7. "A display name for the property template. Property template names can
  8. be up to 256 bytes."
  9. description String
  10. "Description for new property template. Property template descriptions
  11. can be up to 1024 bytes."
  12. fields List(PropertyFieldTemplate)
  13. "This is a list of custom properties associated with a property template.
  14. There can be up to 64 properties in a single property template."
  15. example default
  16. name = "Security"
  17. description = "These properties describe how confidential this file is."
  18. fields = [default]
  19. struct PropertyFieldTemplate
  20. "Describe a single property field type which that can be part of a property template."
  21. name String
  22. "This is the name or key of a custom property in a property template.
  23. File property names can be up to 256 bytes."
  24. description String
  25. "This is the description for a custom property in a property template.
  26. File property description can be up to 1024 bytes."
  27. type PropertyType
  28. "This is the data type of the value of this property. This type
  29. will be enforced upon property creation and modifications."
  30. example default
  31. name = "Security Policy"
  32. description = "This is the security policy of the file or folder described.
  33. Policies can be Confidential, Public or Internal."
  34. type = default
  35. union ModifyPropertyTemplateError extends PropertyTemplateError
  36. conflicting_property_names
  37. "A property field name already exists in the template."
  38. too_many_properties
  39. "There are too many properties in the changed template.
  40. The maximum number of properties per template is 32."
  41. too_many_templates
  42. "There are too many templates for the team."
  43. template_attribute_too_large
  44. "The template name, description or field names is too large."
  45. union PropertyTemplateError
  46. template_not_found TemplateId
  47. "Property template does not exist for given identifier."
  48. restricted_content
  49. "You do not have the permissions to modify this property template."
  50. struct PropertyGroup
  51. "Collection of custom properties in filled property templates."
  52. template_id TemplateId
  53. "A unique identifier for a property template type."
  54. fields List(PropertyField)
  55. "This is a list of custom properties associated with a file.
  56. There can be up to 32 properties for a template."
  57. example default
  58. template_id = "ptid:1a5n2i6d3OYEAAAAAAAAAYa"
  59. fields = [default]
  60. struct PropertyField
  61. name String
  62. "This is the name or key of a custom property in a property template.
  63. File property names can be up to 256 bytes."
  64. value String
  65. "Value of a custom property attached to a file. Values can be up to 1024
  66. bytes."
  67. example default
  68. name = "Security Policy"
  69. value = "Confidential"
  70. union PropertyType
  71. "Data type of the given property added. This endpoint is in beta and
  72. only properties of type strings is supported."
  73. string
  74. "The associated property will be of type string. Unicode is supported."
  75. example default
  76. string = null
  77. #
  78. # Shared struct used for /template/list and /template/get
  79. #
  80. struct GetPropertyTemplateArg
  81. template_id TemplateId
  82. "An identifier for property template added by route properties/template/add."
  83. example default
  84. template_id = "ptid:1a5n2i6d3OYEAAAAAAAAAYa"
  85. struct GetPropertyTemplateResult extends PropertyGroupTemplate
  86. "The Property template for the specified template."
  87. example default
  88. name = "Security"
  89. description = "These properties describe how confidential this file is."
  90. fields = [default]
  91. struct ListPropertyTemplateIds
  92. template_ids List(TemplateId)
  93. "List of identifiers for templates added by route properties/template/add."
  94. example default
  95. template_ids = ["ptid:1a5n2i6d3OYEAAAAAAAAAYa"]