UNPKG

@novo-learning/novo-sdk

Version:

SDK for the Novolanguage Speech Analysis API

1 lines 4.86 kB
{"openapi":"3.0.0","paths":{"/v1/auth/sso":{"post":{"operationId":"sso","summary":"","description":"Authenticate using SSO","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticateSsoRequestDtoV1"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticationResponseDtoV1"}}}}},"tags":["auth"]}},"/v1/auth/sso/anonymous":{"post":{"operationId":"ssoAnonymous","summary":"","description":"Authenticate using SSO with an anonymous user","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoRequestDtoV1"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticationResponseDtoV1"}}}}},"tags":["auth"]}},"/v1/auth/refresh":{"post":{"operationId":"refresh","summary":"","description":"Refresh an authentication token","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshRequestDtoV1"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticationResponseDtoV1"}}}}},"tags":["auth"]}}},"info":{"title":"Authentication API","description":"The authentication API is used to get signed JWT tokens to access other APIs","version":"1.0","contact":{}},"tags":[{"name":"auth","description":""}],"servers":[],"components":{"schemas":{"PermissionType":{"type":"string","description":"The permissions the user has for the group. A user can always send audio and retrieve its own recording / asr_result.","enum":["attempt_read_result","attempt_read_audio","attempt_read_group_result","attempt_read_group_audio","attempt_edit","attempt_delete","attempt_maintenance","exercise_edit","exercise_delete","exercise_maintenance","publisher_edit","publisher_read","publisher_maintenance","publisher_configuration_read","publisher_configuration_edit","pronunciation_edit"]},"RetentionType":{"type":"string","description":"The retention policy for this user: 'all' (default), 'attempt' or 'none'. Audio and attempts should be retained for the publisher","enum":["all","attempt","none"]},"UserDataDtoV1":{"type":"object","properties":{"userId":{"type":"string","description":"Identifier for a user"},"groupId":{"type":"string","description":"Identifier of a group to whom the user belongs."},"permissions":{"type":"array","items":{"$ref":"#/components/schemas/PermissionType"}},"retention":{"$ref":"#/components/schemas/RetentionType"},"metadata":{"type":"object","description":"Dictionary with meta data about the user, for instance native language or type of browser. \n Do not include any data which could be used to identify a user. \n The metadata is stored along the attempts made by the user in this session."}},"required":["userId"]},"AuthenticateSsoRequestDtoV1":{"type":"object","properties":{"publisherId":{"type":"string","description":"Identifier of the publisher who authenticates a session"},"userData":{"description":"Details of the user being authenticated","allOf":[{"$ref":"#/components/schemas/UserDataDtoV1"}]},"publisherToken":{"type":"string","description":"Secret key of the publisher"}},"required":["publisherId","userData","publisherToken"]},"AuthenticationPayloadDtoV1":{"type":"object","properties":{"type":{"type":"string","description":"Type"},"token":{"type":"string","description":"JWT access token"},"refresh_token":{"type":"string","description":"JWT refresh token"},"access_token_expires_in":{"type":"number","description":"expiration time in milliseconds"},"refresh_token_expires_in":{"type":"number","description":"expiration time in milliseconds"}},"required":["type","token","access_token_expires_in","refresh_token_expires_in"]},"AuthenticationDataDtoV1":{"type":"object","properties":{"user":{"description":"User data","allOf":[{"$ref":"#/components/schemas/UserDataDtoV1"}]},"payload":{"description":"JWT payload","allOf":[{"$ref":"#/components/schemas/AuthenticationPayloadDtoV1"}]}},"required":["user","payload"]},"AuthenticationResponseDtoV1":{"type":"object","properties":{"status":{"type":"string","description":"Status of the authentication request"},"data":{"description":"Authentication data","allOf":[{"$ref":"#/components/schemas/AuthenticationDataDtoV1"}]}},"required":["status","data"]},"SsoRequestDtoV1":{"type":"object","properties":{"publisherId":{"type":"string","description":"Identifier of the publisher who authenticates a session"},"userData":{"description":"Details of the user being authenticated","allOf":[{"$ref":"#/components/schemas/UserDataDtoV1"}]}},"required":["publisherId","userData"]},"RefreshRequestDtoV1":{"type":"object","properties":{"refresh_token":{"type":"string"}},"required":["refresh_token"]}}}}