mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-01-05 08:09:50 -06:00
* feat: init lago client * feat: billable meter * feat: db persistence * wip: expose sub * feat: rename page * wip: billing section * wip: lago integration * feat: separate plan and period * wip: webhook * feat: improve empty state * feat: update limits on plan changes * feat: can change plans * feat: change plan loading state * feat: yearly filter * feat: billing clarification * fix: treatment * feat: filter plans * feat: prevent non-owner from changing plan * fix: loading state * fix: jit portal link * fix: rm import * fix: build errors * fix: default to free * fix: wrong files * fix: select or insert customer * fix: note * feat: upgrade dependent on payment method state * fix: dedupe * chore: remove github-app from core * chore: port to cloud * chore: port to cloud * chore: port to cloud * chore: port to cloud * chore: port to cloud * add new components, repository callbacks * chore: rm unused packages * chore: fix generation * chore: gen * fix: cloud api references * debug * debug * fix: actually set plans * chore: rm debug * fix: build * feat: callbacks * fix: add generated code * chore: group cloud components * chore: group by feature * feat: alert change * feat: confirm * fix: confirm modal * fix: ui * fix: remove arrears * fix: open in same tab * fix: wan alert * fix: call the callback * fix: callback obj * fix: disable if no cloud meta --------- Co-authored-by: Alexander Belanger <alexander@hatchet.run>
401 lines
11 KiB
YAML
401 lines
11 KiB
YAML
login:
|
|
post:
|
|
description: Logs in a user.
|
|
operationId: user:update:login
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/UserLoginRequest"
|
|
responses:
|
|
"200":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/User"
|
|
description: Successfully logged in
|
|
"400":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: A malformed or bad request
|
|
"401":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: Unauthorized
|
|
"405":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: Method not allowed
|
|
security: []
|
|
summary: Login user
|
|
tags:
|
|
- User
|
|
update-password:
|
|
post:
|
|
description: Update a user password.
|
|
operationId: user:update:password
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/UserChangePasswordRequest"
|
|
responses:
|
|
"200":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/User"
|
|
description: Successfully changed password
|
|
"400":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: A malformed or bad request
|
|
"401":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: Unauthorized
|
|
"405":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: Method not allowed
|
|
security:
|
|
- cookieAuth: []
|
|
summary: Change user password
|
|
tags:
|
|
- User
|
|
current:
|
|
get:
|
|
description: Gets the current user
|
|
operationId: user:get:current
|
|
responses:
|
|
"200":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/User"
|
|
description: Successfully retrieved the user
|
|
"400":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: A malformed or bad request
|
|
"401":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: Unauthorized
|
|
"405":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: Method not allowed
|
|
security:
|
|
- cookieAuth: []
|
|
summary: Get current user
|
|
tags:
|
|
- User
|
|
register:
|
|
post:
|
|
description: Registers a user.
|
|
operationId: user:create
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/UserRegisterRequest"
|
|
responses:
|
|
"200":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/User"
|
|
description: Successfully registered the user
|
|
"400":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: A malformed or bad request
|
|
"401":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: Unauthorized
|
|
"405":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: Method not allowed
|
|
security: []
|
|
summary: Register user
|
|
tags:
|
|
- User
|
|
oauth-start-google:
|
|
get:
|
|
description: Starts the OAuth flow
|
|
operationId: user:update:google-oauth-start
|
|
responses:
|
|
"302":
|
|
description: Successfully started the OAuth flow
|
|
headers:
|
|
location:
|
|
schema:
|
|
type: string
|
|
security: []
|
|
summary: Start OAuth flow
|
|
tags:
|
|
- User
|
|
oauth-callback-google:
|
|
get:
|
|
description: Completes the OAuth flow
|
|
operationId: user:update:google-oauth-callback
|
|
responses:
|
|
"302":
|
|
description: Successfully completed the OAuth flow
|
|
headers:
|
|
location:
|
|
schema:
|
|
type: string
|
|
security: []
|
|
summary: Complete OAuth flow
|
|
tags:
|
|
- User
|
|
oauth-start-github:
|
|
get:
|
|
description: Starts the OAuth flow
|
|
operationId: user:update:github-oauth-start
|
|
responses:
|
|
"302":
|
|
description: Successfully started the OAuth flow
|
|
headers:
|
|
location:
|
|
schema:
|
|
type: string
|
|
security: []
|
|
summary: Start OAuth flow
|
|
tags:
|
|
- User
|
|
oauth-callback-github:
|
|
get:
|
|
description: Completes the OAuth flow
|
|
operationId: user:update:github-oauth-callback
|
|
responses:
|
|
"302":
|
|
description: Successfully completed the OAuth flow
|
|
headers:
|
|
location:
|
|
schema:
|
|
type: string
|
|
security: []
|
|
summary: Complete OAuth flow
|
|
tags:
|
|
- User
|
|
oauth-start-slack:
|
|
get:
|
|
x-resources: ["tenant"]
|
|
description: Starts the OAuth flow
|
|
operationId: user:update:slack-oauth-start
|
|
parameters:
|
|
- description: The tenant id
|
|
in: path
|
|
name: tenant
|
|
required: true
|
|
schema:
|
|
type: string
|
|
format: uuid
|
|
minLength: 36
|
|
maxLength: 36
|
|
responses:
|
|
"302":
|
|
description: Successfully started the OAuth flow
|
|
headers:
|
|
location:
|
|
schema:
|
|
type: string
|
|
# Note that the security scheme requires cookies, because this endpoint is for linking
|
|
# a Slack account to an existing user account.
|
|
security:
|
|
- cookieAuth: []
|
|
summary: Start OAuth flow
|
|
tags:
|
|
- User
|
|
oauth-callback-slack:
|
|
get:
|
|
description: Completes the OAuth flow
|
|
operationId: user:update:slack-oauth-callback
|
|
responses:
|
|
"302":
|
|
description: Successfully completed the OAuth flow
|
|
headers:
|
|
location:
|
|
schema:
|
|
type: string
|
|
# Note that the security scheme requires cookies, because this endpoint is for linking
|
|
# a Slack account to an existing user account.
|
|
security:
|
|
- cookieAuth: []
|
|
summary: Complete OAuth flow
|
|
tags:
|
|
- User
|
|
logout:
|
|
post:
|
|
description: Logs out a user.
|
|
operationId: user:update:logout
|
|
responses:
|
|
"200":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/User"
|
|
description: Successfully logged out
|
|
"400":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: A malformed or bad request
|
|
"401":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: Unauthorized
|
|
"405":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: Method not allowed
|
|
security:
|
|
- cookieAuth: []
|
|
summary: Logout user
|
|
tags:
|
|
- User
|
|
memberships:
|
|
get:
|
|
description: Lists all tenant memberships for the current user
|
|
operationId: tenant-memberships:list
|
|
responses:
|
|
"200":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/UserTenantMembershipsList"
|
|
description: Successfully listed the tenant memberships
|
|
"400":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: A malformed or bad request
|
|
"403":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: Forbidden
|
|
security:
|
|
- cookieAuth: []
|
|
summary: List tenant memberships
|
|
tags:
|
|
- User
|
|
invites:
|
|
get:
|
|
description: Lists all tenant invites for the current user
|
|
operationId: user:list:tenant-invites
|
|
responses:
|
|
"200":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/TenantInviteList"
|
|
description: Successfully listed the tenant invites
|
|
"400":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: A malformed or bad request
|
|
"403":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: Forbidden
|
|
security:
|
|
- cookieAuth: []
|
|
summary: List tenant invites
|
|
tags:
|
|
- Tenant
|
|
acceptInvite:
|
|
post:
|
|
description: Accepts a tenant invite
|
|
operationId: tenant-invite:accept
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/AcceptInviteRequest"
|
|
responses:
|
|
"200":
|
|
description: Successfully accepted the tenant invite
|
|
"400":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: A malformed or bad request
|
|
"403":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIError"
|
|
description: Forbidden
|
|
summary: Accept tenant invite
|
|
tags:
|
|
- Tenant
|
|
rejectInvite:
|
|
post:
|
|
description: Rejects a tenant invite
|
|
operationId: tenant-invite:reject
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/RejectInviteRequest"
|
|
responses:
|
|
"200":
|
|
description: Successfully rejected the tenant invite
|
|
"400":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: A malformed or bad request
|
|
"403":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIError"
|
|
description: Forbidden
|
|
summary: Reject tenant invite
|
|
tags:
|
|
- Tenant
|