feat(server): user and server license endpoints (#10682)

* feat: user license endpoints

* feat: server license endpoints

* chore: pr feedback

* chore: add more test cases

* chore: add prod license public keys

* chore: open-api generation
This commit is contained in:
Zack Pollard
2024-07-01 18:43:16 +01:00
committed by GitHub
parent 4193b0dede
commit 3b37b70626
40 changed files with 1474 additions and 18 deletions
+260
View File
@@ -4994,6 +4994,101 @@
}
}
},
"/server/license": {
"delete": {
"operationId": "deleteServerLicense",
"parameters": [],
"responses": {
"200": {
"description": ""
}
},
"security": [
{
"bearer": []
},
{
"cookie": []
},
{
"api_key": []
}
],
"tags": [
"Server"
]
},
"get": {
"operationId": "getServerLicense",
"parameters": [],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
},
"description": ""
}
},
"security": [
{
"bearer": []
},
{
"cookie": []
},
{
"api_key": []
}
],
"tags": [
"Server"
]
},
"put": {
"operationId": "setServerLicense",
"parameters": [],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LicenseKeyDto"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LicenseResponseDto"
}
}
},
"description": ""
}
},
"security": [
{
"bearer": []
},
{
"cookie": []
},
{
"api_key": []
}
],
"tags": [
"Server"
]
}
},
"/sessions": {
"delete": {
"operationId": "deleteAllSessions",
@@ -6594,6 +6689,101 @@
]
}
},
"/users/me/license": {
"delete": {
"operationId": "deleteUserLicense",
"parameters": [],
"responses": {
"200": {
"description": ""
}
},
"security": [
{
"bearer": []
},
{
"cookie": []
},
{
"api_key": []
}
],
"tags": [
"Users"
]
},
"get": {
"operationId": "getUserLicense",
"parameters": [],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LicenseResponseDto"
}
}
},
"description": ""
}
},
"security": [
{
"bearer": []
},
{
"cookie": []
},
{
"api_key": []
}
],
"tags": [
"Users"
]
},
"put": {
"operationId": "setUserLicense",
"parameters": [],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LicenseKeyDto"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LicenseResponseDto"
}
}
},
"description": ""
}
},
"security": [
{
"bearer": []
},
{
"cookie": []
},
{
"api_key": []
}
],
"tags": [
"Users"
]
}
},
"/users/me/preferences": {
"get": {
"operationId": "getMyPreferences",
@@ -8765,6 +8955,43 @@
],
"type": "object"
},
"LicenseKeyDto": {
"properties": {
"activationKey": {
"type": "string"
},
"licenseKey": {
"pattern": "/IM(SV|CL)(-[\\dA-Za-z]{4}){8}/",
"type": "string"
}
},
"required": [
"activationKey",
"licenseKey"
],
"type": "object"
},
"LicenseResponseDto": {
"properties": {
"activatedAt": {
"format": "date-time",
"type": "string"
},
"activationKey": {
"type": "string"
},
"licenseKey": {
"pattern": "/IM(SV|CL)(-[\\dA-Za-z]{4}){8}/",
"type": "string"
}
},
"required": [
"activatedAt",
"activationKey",
"licenseKey"
],
"type": "object"
},
"LogLevel": {
"enum": [
"verbose",
@@ -9752,6 +9979,9 @@
"libvips": {
"type": "string"
},
"licensed": {
"type": "boolean"
},
"nodejs": {
"type": "string"
},
@@ -9778,6 +10008,7 @@
}
},
"required": [
"licensed",
"version",
"versionUrl"
],
@@ -11330,6 +11561,14 @@
"isAdmin": {
"type": "boolean"
},
"license": {
"allOf": [
{
"$ref": "#/components/schemas/UserLicense"
}
],
"nullable": true
},
"name": {
"type": "string"
},
@@ -11371,6 +11610,7 @@
"email",
"id",
"isAdmin",
"license",
"name",
"oauthId",
"profileImagePath",
@@ -11425,6 +11665,26 @@
],
"type": "string"
},
"UserLicense": {
"properties": {
"activatedAt": {
"format": "date-time",
"type": "string"
},
"activationKey": {
"type": "string"
},
"licenseKey": {
"type": "string"
}
},
"required": [
"activatedAt",
"activationKey",
"licenseKey"
],
"type": "object"
},
"UserPreferencesResponseDto": {
"properties": {
"avatar": {