|
| 1 | +namespace team |
| 2 | + |
| 3 | +import common |
| 4 | + |
| 5 | +struct SharingAllowlistAddArgs |
| 6 | + "Structure representing Approve List entries. Domain and emails are supported. |
| 7 | + At least one entry of any supported type is required." |
| 8 | + domains List(String)? |
| 9 | + "List of domains represented by valid string representation (RFC-1034/5)." |
| 10 | + emails List(String)? |
| 11 | + "List of emails represented by valid string representation (RFC-5322/822)." |
| 12 | + |
| 13 | + example default |
| 14 | + domains = ["test-domain.com", "subdomain.some.com"] |
| 15 | + emails = ["adam@test-domain.com", "john@some.com"] |
| 16 | + |
| 17 | +struct SharingAllowlistAddResponse |
| 18 | + "This struct is empty. The comment here is intentionally emitted to avoid indentation issues with Stone." |
| 19 | + |
| 20 | +union SharingAllowlistAddError |
| 21 | + malformed_entry String |
| 22 | + "One of provided values is not valid." |
| 23 | + no_entries_provided |
| 24 | + "Neither single domain nor email provided." |
| 25 | + too_many_entries_provided |
| 26 | + "Too many entries provided within one call." |
| 27 | + team_limit_reached |
| 28 | + "Team entries limit reached." |
| 29 | + unknown_error |
| 30 | + "Unknown error." |
| 31 | + entries_already_exist String |
| 32 | + "Entries already exists." |
| 33 | + |
| 34 | + |
| 35 | +struct SharingAllowlistListArg |
| 36 | + limit UInt32(max_value=1000, min_value=1) = 1000 |
| 37 | + "The number of entries to fetch at one time." |
| 38 | + |
| 39 | + example default |
| 40 | + limit = 100 |
| 41 | + |
| 42 | +struct SharingAllowlistListContinueArg |
| 43 | + cursor String |
| 44 | + "The cursor returned from a previous call to :route:`sharing_allowlist/list` or :route:`sharing_allowlist/list/continue`." |
| 45 | + |
| 46 | + example default |
| 47 | + cursor = "dGVzdF9jdXJzb3IK" |
| 48 | + |
| 49 | +struct SharingAllowlistListError |
| 50 | + "This struct is empty. The comment here is intentionally emitted to avoid indentation issues with Stone." |
| 51 | + |
| 52 | +struct SharingAllowlistListResponse |
| 53 | + domains List(String) |
| 54 | + "List of domains represented by valid string representation (RFC-1034/5)." |
| 55 | + emails List(String) |
| 56 | + "List of emails represented by valid string representation (RFC-5322/822)." |
| 57 | + cursor String = "" |
| 58 | + "If this is nonempty, there are more entries that can be fetched with :route:`sharing_allowlist/list/continue`." |
| 59 | + has_more Boolean = false |
| 60 | + "if true indicates that more entries can be fetched with :route:`sharing_allowlist/list/continue`." |
| 61 | + |
| 62 | + example default |
| 63 | + domains = ["test-domain.com", "subdomain.some.com"] |
| 64 | + emails = ["adam@test-domain.com", "john@some.com"] |
| 65 | + cursor = "dGVzdF9jdXJzb3IK" |
| 66 | + has_more = true |
| 67 | + |
| 68 | +union SharingAllowlistListContinueError |
| 69 | + invalid_cursor |
| 70 | + "Provided cursor is not valid." |
| 71 | + |
| 72 | +struct SharingAllowlistRemoveArgs |
| 73 | + domains List(String)? |
| 74 | + "List of domains represented by valid string representation (RFC-1034/5)." |
| 75 | + emails List(String)? |
| 76 | + "List of emails represented by valid string representation (RFC-5322/822)." |
| 77 | + |
| 78 | + example default |
| 79 | + domains = ["test-domain.com", "subdomain.some.com"] |
| 80 | + emails = ["adam@test-domain.com", "john@some.com"] |
| 81 | + |
| 82 | + |
| 83 | +struct SharingAllowlistRemoveResponse |
| 84 | + "This struct is empty. The comment here is intentionally emitted to avoid indentation issues with Stone." |
| 85 | + |
| 86 | +union SharingAllowlistRemoveError |
| 87 | + malformed_entry String |
| 88 | + "One of provided values is not valid." |
| 89 | + entries_do_not_exist String |
| 90 | + "One or more provided values do not exist." |
| 91 | + no_entries_provided |
| 92 | + "Neither single domain nor email provided." |
| 93 | + too_many_entries_provided |
| 94 | + "Too many entries provided within one call." |
| 95 | + unknown_error |
| 96 | + "Unknown error." |
| 97 | + |
| 98 | + |
| 99 | +route sharing_allowlist/add (SharingAllowlistAddArgs, SharingAllowlistAddResponse, SharingAllowlistAddError) |
| 100 | + "Endpoint adds Approve List entries. Changes are effective immediately. |
| 101 | + Changes are committed in transaction. In case of single validation error - all entries are rejected. |
| 102 | + Valid domains (RFC-1034/5) and emails (RFC-5322/822) are accepted. |
| 103 | + Added entries cannot overflow limit of 10000 entries per team. |
| 104 | + Maximum 100 entries per call is allowed." |
| 105 | + |
| 106 | + attrs |
| 107 | + auth = "team" |
| 108 | + is_preview = true |
| 109 | + scope = "team_info.write" |
| 110 | + |
| 111 | +route sharing_allowlist/list (SharingAllowlistListArg, SharingAllowlistListResponse, SharingAllowlistListError) |
| 112 | + "Lists Approve List entries for given team, from newest to oldest, returning |
| 113 | + up to `limit` entries at a time. If there are more than `limit` entries |
| 114 | + associated with the current team, more can be fetched by passing the |
| 115 | + returned `cursor` to :route:`sharing_allowlist/list/continue`." |
| 116 | + |
| 117 | + attrs |
| 118 | + auth = "team" |
| 119 | + is_preview = true |
| 120 | + scope = "team_info.read" |
| 121 | + |
| 122 | +route sharing_allowlist/list/continue (SharingAllowlistListContinueArg, SharingAllowlistListResponse, SharingAllowlistListContinueError) |
| 123 | + "Lists entries associated with given team, starting from a the cursor. See :route:`sharing_allowlist/list`." |
| 124 | + |
| 125 | + attrs |
| 126 | + auth = "team" |
| 127 | + is_preview = true |
| 128 | + scope = "team_info.read" |
| 129 | + |
| 130 | +route sharing_allowlist/remove (SharingAllowlistRemoveArgs, SharingAllowlistRemoveResponse, SharingAllowlistRemoveError) |
| 131 | + "Endpoint removes Approve List entries. Changes are effective immediately. |
| 132 | + Changes are committed in transaction. In case of single validation error - all entries are rejected. |
| 133 | + Valid domains (RFC-1034/5) and emails (RFC-5322/822) are accepted. |
| 134 | + Entries being removed have to be present on the list. |
| 135 | + Maximum 1000 entries per call is allowed." |
| 136 | + |
| 137 | + attrs |
| 138 | + auth = "team" |
| 139 | + is_preview = true |
| 140 | + scope = "team_info.write" |
| 141 | + |
0 commit comments