Beispiel #1
0
class HandshakeInvitedAnswerSchema(BaseSchema):
    handshake = fields.CheckedConstant("answer", required=True)
    type = fields.EnumCheckedConstant(HandshakeType.INVITED, required=True)
    client_api_version = ApiVersionField(required=True)
    organization_id = OrganizationIDField(required=True)
    invitation_type = InvitationTypeField(required=True)
    token = fields.UUID(required=True)
Beispiel #2
0
class APIV1_HandshakeAnonymousAnswerSchema(BaseSchema):
    handshake = fields.CheckedConstant("answer", required=True)
    type = fields.EnumCheckedConstant(APIV1_HandshakeType.ANONYMOUS, required=True)
    client_api_version = ApiVersionField(required=True)
    organization_id = OrganizationIDField(required=True)
    # Cannot provide rvk during organization bootstrap
    rvk = fields.VerifyKey(missing=None)
Beispiel #3
0
class APIV1_HandshakeAuthenticatedAnswerSchema(BaseSchema):
    handshake = fields.CheckedConstant("answer", required=True)
    type = fields.EnumCheckedConstant(APIV1_HandshakeType.AUTHENTICATED, required=True)
    client_api_version = ApiVersionField(required=True)
    organization_id = OrganizationIDField(required=True)
    device_id = DeviceIDField(required=True)
    rvk = fields.VerifyKey(required=True)
    answer = fields.Bytes(required=True)
Beispiel #4
0
class OrganizationCreateReqSchema(BaseSchema):
    organization_id = OrganizationIDField(required=True)
    # /!\ Missing field and field set to `None` does not mean the same thing:
    # - missing field: ask the backend to use it default value for this field
    # - field set to `None`: `None` is a valid value to use for this field
    user_profile_outsider_allowed = fields.Boolean(required=False,
                                                   allow_none=False)
    # `None` stands for "no limit" here
    active_users_limit = fields.Integer(required=False,
                                        allow_none=True,
                                        validate=lambda x: x >= 0)
Beispiel #5
0
class APIV1_OrganizationStatusReqSchema(BaseReqSchema):
    organization_id = OrganizationIDField(required=True)
Beispiel #6
0
class APIV1_OrganizationCreateReqSchema(BaseReqSchema):
    organization_id = OrganizationIDField(required=True)
    expiration_date = fields.DateTime(allow_none=True, required=False)
Beispiel #7
0
class OrganizationBootstrapWebhookSchema(BaseSchema):
    organization_id = OrganizationIDField(required=True)
    device_id = DeviceIDField(required=True)
    device_label = fields.String(allow_none=True, required=True)
    human_email = fields.String(allow_none=True, required=True)
    human_label = fields.String(allow_none=True, required=True)
Beispiel #8
0
class APIV1_OrganizationUpdateReqSchema(BaseReqSchema):
    organization_id = OrganizationIDField(required=True)
    expiration_date = fields.DateTime(allow_none=True, required=False)
    user_profile_outsider_allowed = fields.Boolean(required=False)