Skip to content

Commit

Permalink
feat: API spec for user creation on user dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
Chakravarthy7102 committed Dec 7, 2023
1 parent 9c4c672 commit 68ed887
Showing 1 changed file with 218 additions and 0 deletions.
218 changes: 218 additions & 0 deletions api_spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1664,6 +1664,224 @@ paths:
enum:
- Method not supported

/<tenantId>/dashboard/api/user/create/emailpassword:
post:
tags:
- User Creation
summary: Creates a new emailpassword user.
requestBody:
content:
application/json:
schema:
type: object
properties:
email:
type: string
password:
type: string
responses:
200:
description: signup response
content:
application/json:
schema:
oneOf:
- type: object
properties:
status:
type: string
default: "OK"
user:
$ref: "#/components/schemas/authRecipeUser"
recipeUserId:
$ref: "#/components/schemas/userId"
- type: object
properties:
status:
type: string
default: "EMAIL_ALREADY_EXISTS_ERROR"
- type: object
properties:
status:
type: string
default: "FEATURE_NOT_ENABLED_ERROR"

/<tenantId>/dashboard/api/user/create/thirdparty:
post:
tags:
- User Creation
summary: Creates a new thirdparty user.
requestBody:
content:
application/json:
schema:
type: object
properties:
thirdPartyId:
type: string
thirdPartyUserId:
type: string
email:
type: string
isVerified:
type: boolean
responses:
200:
description: signup response
content:
application/json:
schema:
oneOf:
- type: object
properties:
status:
type: string
default: "OK"
createdNewRecipeUser:
type: boolean
default: true
user:
$ref: "#/components/schemas/authRecipeUser"
recipeUserId:
$ref: "#/components/schemas/userId"
- type: object
properties:
status:
type: string
default: "EMAIL_CHANGE_NOT_ALLOWED_ERROR"
reason:
type: string
- type: object
properties:
status:
type: string
default: "SIGN_IN_UP_NOT_ALLOWED"
reason:
type: string
- type: object
properties:
status:
type: string
default: "FEATURE_NOT_ENABLED_ERROR"

/<tenantId>/dashboard/api/user/create/passwordless:
post:
tags:
- User Creation
summary: Creates a new passwordless user
requestBody:
content:
application/json:
schema:
type: object
properties:
email:
type: string
password:
type: string
responses:
200:
description: Success
content:
application/json:
schema:
type: object
properties:
tags:
type: array
items:
type: string

components:
schemas:
authRecipeUser:
type: object
properties:
id:
$ref: "#/components/schemas/userId"
isPrimaryUser:
type: boolean
example: true
tenantIds:
type: array
items:
$ref: "#/components/schemas/tenantId"
timeJoined:
$ref: "#/components/schemas/timeJoined"
emails:
type: array
items:
$ref: "#/components/schemas/email"
phoneNumbers:
type: array
items:
$ref: "#/components/schemas/phoneNumber"
thirdParty:
type: array
items:
type: object
properties:
id:
$ref: "#/components/schemas/thirdPartyId"
userId:
$ref: "#/components/schemas/thirdPartyUserId"
loginMethods:
type: array
items:
type: object
properties:
tenantIds:
type: array
items:
$ref: "#/components/schemas/tenantId"
recipeUserId:
$ref: "#/components/schemas/userId"
verified:
type: boolean
example: true
timeJoined:
$ref: "#/components/schemas/timeJoined"
recipeId:
$ref: "#/components/schemas/recipeId"
email:
$ref: "#/components/schemas/email"
phoneNumber:
$ref: "#/components/schemas/phoneNumber"
thirdParty:
type: object
properties:
id:
$ref: "#/components/schemas/thirdPartyId"
userId:
$ref: "#/components/schemas/thirdPartyUserId"
recipeId:
type: string
enum:
- emailpassword
- passwordless
- thirdparty
thirdPartyId:
type: string
example: google
thirdPartyUserId:
type: string
example: 106347997792363865062
email:
type: string
example: [email protected]
userId:
type: string
example: fa7a0841-b533-4478-95533-0fde890c3483
timeJoined:
type: number
example: 1623918032231
phoneNumber:
type: string
example: "+14155552671"
tenantId:
type: string
example: "customer1"

servers:
# Added by API Auto Mocking Plugin
- description: SwaggerHub API Auto Mocking
Expand Down

0 comments on commit 68ed887

Please sign in to comment.