slackline/api/admin/legal_hold
This module is generated by gleam run -m slackline_codegen/generate. Do not edit it by hand.
Admin legal holds (admin.legalHold.*): policies that hold message data
for custodians. Enterprise plans only. The methods are documented together
on https://docs.slack.dev/reference/legal-holds-api-reference.
Types
Identifies admin.legalHold.entities.add in the slackline.Call that
entities_add returns.
pub type EntitiesAdd
A successful response from admin.legalHold.entities.add.
pub type EntitiesAddResponse {
EntitiesAddResponse(
created_entities: option.Option(List(LegalHoldEntity)),
failed_entities: option.Option(List(value.Value)),
)
}
Constructors
-
EntitiesAddResponse( created_entities: option.Option(List(LegalHoldEntity)), failed_entities: option.Option(List(value.Value)), )
Identifies admin.legalHold.entities.list in the slackline.Call that
entities_list returns.
pub type EntitiesList
A successful response from admin.legalHold.entities.list.
pub type EntitiesListResponse {
EntitiesListResponse(
entities: option.Option(List(LegalHoldEntity)),
response_metadata: option.Option(slackline.ResponseMetadata),
)
}
Constructors
-
EntitiesListResponse( entities: option.Option(List(LegalHoldEntity)), response_metadata: option.Option(slackline.ResponseMetadata), )
Identifies admin.legalHold.entities.remove in the slackline.Call that
entities_remove returns.
pub type EntitiesRemove
A successful response from admin.legalHold.entities.remove.
pub type EntitiesRemoveResponse {
EntitiesRemoveResponse(failed_ids: option.Option(List(String)))
}
Constructors
-
EntitiesRemoveResponse(failed_ids: option.Option(List(String)))
A custodian of a policy.
pub type LegalHoldEntity {
LegalHoldEntity(
id: String,
team_id: option.Option(String),
policy_id: option.Option(String),
entity_type: option.Option(LegalHoldEntityType),
entity_id: option.Option(String),
date_created: option.Option(Int),
date_deleted: option.Option(Int),
)
}
Constructors
-
LegalHoldEntity( id: String, team_id: option.Option(String), policy_id: option.Option(String), entity_type: option.Option(LegalHoldEntityType), entity_id: option.Option(String), date_created: option.Option(Int), date_deleted: option.Option(Int), )Arguments
- id
-
The ID of this custodian on the policy, for
admin.legalHold.entities.remove. - date_created
-
Unix time.
0while the custodian is on the policy.
A custodian to add to a policy.
pub type LegalHoldEntityInput {
LegalHoldEntityInput(
entity_type: LegalHoldEntityType,
entity_id: String,
)
}
Constructors
-
LegalHoldEntityInput( entity_type: LegalHoldEntityType, entity_id: String, )Arguments
- entity_id
-
The encoded user ID.
The kind of custodian a policy holds data for.
pub type LegalHoldEntityType {
UserEntity
UnknownLegalHoldEntityType(String)
}
Constructors
-
UserEntityMessages authored by or visible to a user.
-
UnknownLegalHoldEntityType(String)A value that this version of slackline does not know.
A Legal Hold policy.
pub type LegalHoldPolicy {
LegalHoldPolicy(
id: String,
team_id: option.Option(String),
creator_id: option.Option(String),
name: option.Option(String),
description: option.Option(String),
restrictions: option.Option(List(LegalHoldRestriction)),
status: option.Option(LegalHoldStatus),
date_created: option.Option(Int),
date_updated: option.Option(Int),
date_released: option.Option(Int),
date_policy_start: option.Option(Int),
date_policy_end: option.Option(Int),
)
}
Constructors
-
LegalHoldPolicy( id: String, team_id: option.Option(String), creator_id: option.Option(String), name: option.Option(String), description: option.Option(String), restrictions: option.Option(List(LegalHoldRestriction)), status: option.Option(LegalHoldStatus), date_created: option.Option(Int), date_updated: option.Option(Int), date_released: option.Option(Int), date_policy_start: option.Option(Int), date_policy_end: option.Option(Int), )Arguments
- team_id
-
The organization.
- date_created
-
Unix time.
0when unset, as for the release and policy dates below.
Which conversations a policy holds.
pub type LegalHoldRestriction {
NoRestriction
OnlyDms
UnknownLegalHoldRestriction(String)
}
Constructors
-
NoRestrictionHold data for all relevant conversations.
-
OnlyDmsHold data from direct messages only.
-
UnknownLegalHoldRestriction(String)A value that this version of slackline does not know.
Whether a policy is holding data.
pub type LegalHoldStatus {
ActiveLegalHold
ReleasedLegalHold
UnknownLegalHoldStatus(String)
}
Constructors
-
ActiveLegalHoldACTIVE -
ReleasedLegalHoldRELEASED -
UnknownLegalHoldStatus(String)A value that this version of slackline does not know.
Identifies admin.legalHold.policies.activate in the slackline.Call that
policies_activate returns.
pub type PoliciesActivate
A successful response from admin.legalHold.policies.activate.
pub type PoliciesActivateResponse {
PoliciesActivateResponse(policy: LegalHoldPolicy)
}
Constructors
-
PoliciesActivateResponse(policy: LegalHoldPolicy)
Identifies admin.legalHold.policies.create in the slackline.Call that
policies_create returns.
pub type PoliciesCreate
A successful response from admin.legalHold.policies.create.
pub type PoliciesCreateResponse {
PoliciesCreateResponse(policy: LegalHoldPolicy)
}
Constructors
-
PoliciesCreateResponse(policy: LegalHoldPolicy)
Identifies admin.legalHold.policies.info in the slackline.Call that
policies_info returns.
pub type PoliciesInfo
A successful response from admin.legalHold.policies.info.
pub type PoliciesInfoResponse {
PoliciesInfoResponse(policy: LegalHoldPolicy)
}
Constructors
-
PoliciesInfoResponse(policy: LegalHoldPolicy)
Identifies admin.legalHold.policies.list in the slackline.Call that
policies_list returns.
pub type PoliciesList
A successful response from admin.legalHold.policies.list.
pub type PoliciesListResponse {
PoliciesListResponse(
policies: option.Option(List(LegalHoldPolicy)),
policy_total_count: option.Option(Int),
response_metadata: option.Option(slackline.ResponseMetadata),
)
}
Constructors
-
PoliciesListResponse( policies: option.Option(List(LegalHoldPolicy)), policy_total_count: option.Option(Int), response_metadata: option.Option(slackline.ResponseMetadata), )
Identifies admin.legalHold.policies.release in the slackline.Call that
policies_release returns.
pub type PoliciesRelease
A successful response from admin.legalHold.policies.release.
pub type PoliciesReleaseResponse {
PoliciesReleaseResponse(policy: LegalHoldPolicy)
}
Constructors
-
PoliciesReleaseResponse(policy: LegalHoldPolicy)
Identifies admin.legalHold.policies.set in the slackline.Call that
policies_set returns.
pub type PoliciesSet
A successful response from admin.legalHold.policies.set.
pub type PoliciesSetResponse {
PoliciesSetResponse(policy: LegalHoldPolicy)
}
Constructors
-
PoliciesSetResponse(policy: LegalHoldPolicy)
Values
pub fn entities_add(
policy_id policy_id: String,
entities entities: List(LegalHoldEntityInput),
) -> slackline.Call(EntitiesAdd, EntitiesAddResponse)
admin.legalHold.entities.add:
This method associates one or more custodians (or entities) to an active
Legal Hold policy.
legal_hold.EntitiesAdd identifies this method in slackline.Call.
User token scopes: admin.legal_holds:write.
Documented errors: invalid_cursor, legal_hold_not_found,
released_policy_edit_not_allowed, too_many_entities,
max_active_entities_reached, unknown_method.
pub fn entities_add_response_decoder() -> decode.Decoder(
EntitiesAddResponse,
)
Decodes the response from admin.legalHold.entities.add.
pub fn entities_list(
policy_id policy_id: String,
) -> slackline.Call(EntitiesList, EntitiesListResponse)
admin.legalHold.entities.list:
This method returns a paginated list of custodians (or entities) assigned to
a Legal Hold policy. This method accepts a cursor parameter for
pagination. When paginating, these values will be returned as next_cursor
value located within the response_metadata object of the response.
legal_hold.EntitiesList identifies this method in slackline.Call.
Set optional arguments with the functions in
slackline/api/admin/legal_hold/entities_list.
User token scopes: admin.legal_holds:read.
Documented errors: invalid_cursor, legal_hold_not_found,
released_policy_edit_not_allowed, too_many_entities,
max_active_entities_reached, unknown_method.
pub fn entities_list_response_decoder() -> decode.Decoder(
EntitiesListResponse,
)
Decodes the response from admin.legalHold.entities.list.
pub fn entities_remove(
policy_id policy_id: String,
ids ids: List(String),
) -> slackline.Call(EntitiesRemove, EntitiesRemoveResponse)
admin.legalHold.entities.remove:
This method removes one or more custodians (or entities) from an active
Legal Hold policy.
legal_hold.EntitiesRemove identifies this method in slackline.Call.
User token scopes: admin.legal_holds:write.
Documented errors: invalid_cursor, legal_hold_not_found,
released_policy_edit_not_allowed, too_many_entities,
max_active_entities_reached, unknown_method.
pub fn entities_remove_response_decoder() -> decode.Decoder(
EntitiesRemoveResponse,
)
Decodes the response from admin.legalHold.entities.remove.
pub fn legal_hold_entity_decoder() -> decode.Decoder(
LegalHoldEntity,
)
Decodes LegalHoldEntity from json.
pub fn legal_hold_entity_input_decoder() -> decode.Decoder(
LegalHoldEntityInput,
)
Decodes LegalHoldEntityInput from json.
pub fn legal_hold_entity_input_to_json(
it: LegalHoldEntityInput,
) -> json.Json
Encodes LegalHoldEntityInput as json.
pub fn legal_hold_entity_to_json(
it: LegalHoldEntity,
) -> json.Json
Encodes LegalHoldEntity as json.
pub fn legal_hold_entity_type_decoder() -> decode.Decoder(
LegalHoldEntityType,
)
Decodes LegalHoldEntityType from a json string.
pub fn legal_hold_entity_type_from_string(
string: String,
) -> LegalHoldEntityType
Parses LegalHoldEntityType from its json string.
pub fn legal_hold_entity_type_to_json(
it: LegalHoldEntityType,
) -> json.Json
Encodes LegalHoldEntityType as a json string.
pub fn legal_hold_entity_type_to_string(
it: LegalHoldEntityType,
) -> String
The json string of LegalHoldEntityType.
pub fn legal_hold_policy_decoder() -> decode.Decoder(
LegalHoldPolicy,
)
Decodes LegalHoldPolicy from json.
pub fn legal_hold_policy_to_json(
it: LegalHoldPolicy,
) -> json.Json
Encodes LegalHoldPolicy as json.
pub fn legal_hold_restriction_decoder() -> decode.Decoder(
LegalHoldRestriction,
)
Decodes LegalHoldRestriction from a json string.
pub fn legal_hold_restriction_from_string(
string: String,
) -> LegalHoldRestriction
Parses LegalHoldRestriction from its json string.
pub fn legal_hold_restriction_to_json(
it: LegalHoldRestriction,
) -> json.Json
Encodes LegalHoldRestriction as a json string.
pub fn legal_hold_restriction_to_string(
it: LegalHoldRestriction,
) -> String
The json string of LegalHoldRestriction.
pub fn legal_hold_status_decoder() -> decode.Decoder(
LegalHoldStatus,
)
Decodes LegalHoldStatus from a json string.
pub fn legal_hold_status_from_string(
string: String,
) -> LegalHoldStatus
Parses LegalHoldStatus from its json string.
pub fn legal_hold_status_to_json(
it: LegalHoldStatus,
) -> json.Json
Encodes LegalHoldStatus as a json string.
pub fn legal_hold_status_to_string(it: LegalHoldStatus) -> String
The json string of LegalHoldStatus.
pub fn policies_activate(
policy_id policy_id: String,
) -> slackline.Call(PoliciesActivate, PoliciesActivateResponse)
admin.legalHold.policies.activate:
This method activates a previously
released
policy. Activating a policy will hold data visible to custodians specified
by the policy.
legal_hold.PoliciesActivate identifies this method in slackline.Call.
User token scopes: admin.legal_holds:write.
Documented errors: invalid_cursor, legal_hold_not_found,
released_policy_edit_not_allowed, too_many_entities,
max_active_entities_reached, unknown_method.
pub fn policies_activate_response_decoder() -> decode.Decoder(
PoliciesActivateResponse,
)
Decodes the response from admin.legalHold.policies.activate.
pub fn policies_create(
name name: String,
) -> slackline.Call(PoliciesCreate, PoliciesCreateResponse)
admin.legalHold.policies.create:
This method creates a new Legal Hold policy. By default all policies are
created as ACTIVE (enforced) policies.
legal_hold.PoliciesCreate identifies this method in slackline.Call.
Set optional arguments with the functions in
slackline/api/admin/legal_hold/policies_create.
User token scopes: admin.legal_holds:write.
Documented errors: invalid_cursor, legal_hold_not_found,
released_policy_edit_not_allowed, too_many_entities,
max_active_entities_reached, unknown_method.
pub fn policies_create_response_decoder() -> decode.Decoder(
PoliciesCreateResponse,
)
Decodes the response from admin.legalHold.policies.create.
pub fn policies_info(
policy_id policy_id: String,
) -> slackline.Call(PoliciesInfo, PoliciesInfoResponse)
admin.legalHold.policies.info:
This method returns the complete details for an existing Legal Hold policy.
legal_hold.PoliciesInfo identifies this method in slackline.Call.
User token scopes: admin.legal_holds:read.
Documented errors: invalid_cursor, legal_hold_not_found,
released_policy_edit_not_allowed, too_many_entities,
max_active_entities_reached, unknown_method.
pub fn policies_info_response_decoder() -> decode.Decoder(
PoliciesInfoResponse,
)
Decodes the response from admin.legalHold.policies.info.
pub fn policies_list() -> slackline.Call(
PoliciesList,
PoliciesListResponse,
)
admin.legalHold.policies.list:
This method returns a paginated list of Legal Hold policies. This method
accepts a cursor parameter for pagination. When paginating, these values
will be returned as next_cursor value located within the
response_metadata object of the response.
legal_hold.PoliciesList identifies this method in slackline.Call.
Set optional arguments with the functions in
slackline/api/admin/legal_hold/policies_list.
User token scopes: admin.legal_holds:read.
Documented errors: invalid_cursor, legal_hold_not_found,
released_policy_edit_not_allowed, too_many_entities,
max_active_entities_reached, unknown_method.
pub fn policies_list_response_decoder() -> decode.Decoder(
PoliciesListResponse,
)
Decodes the response from admin.legalHold.policies.list.
pub fn policies_release(
policy_id policy_id: String,
) -> slackline.Call(PoliciesRelease, PoliciesReleaseResponse)
admin.legalHold.policies.release:
This method releases an
active
Legal Hold policy. Released policies will no longer hold data for any
custodians that fall under those policies.
legal_hold.PoliciesRelease identifies this method in slackline.Call.
User token scopes: admin.legal_holds:write.
Documented errors: invalid_cursor, legal_hold_not_found,
released_policy_edit_not_allowed, too_many_entities,
max_active_entities_reached, unknown_method.
pub fn policies_release_response_decoder() -> decode.Decoder(
PoliciesReleaseResponse,
)
Decodes the response from admin.legalHold.policies.release.
pub fn policies_set(
policy_id policy_id: String,
) -> slackline.Call(PoliciesSet, PoliciesSetResponse)
admin.legalHold.policies.set:
This method can be used to update the details of an existing Legal Hold
policy. Changes can only be made to active policies.
legal_hold.PoliciesSet identifies this method in slackline.Call.
Set optional arguments with the functions in
slackline/api/admin/legal_hold/policies_set.
User token scopes: admin.legal_holds:write.
Documented errors: invalid_cursor, legal_hold_not_found,
released_policy_edit_not_allowed, too_many_entities,
max_active_entities_reached, unknown_method.
pub fn policies_set_response_decoder() -> decode.Decoder(
PoliciesSetResponse,
)
Decodes the response from admin.legalHold.policies.set.