forked from misskey-dev/misskey
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(subscription): サブスクリプション #7
Draft
kakkokari-gtyih
wants to merge
69
commits into
hanami
Choose a base branch
from
feat-subscription
base: hanami
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(cherry picked from commit 27aaf61)
このPRによるapi.jsonの差分 差分はこちら--- base
+++ head
@@ -544,6 +544,12 @@
"null"
]
},
+ "commerceDisclosureUrl": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
"uri": {
"type": "string"
},
@@ -582,6 +588,9 @@
"items": {
"type": "string"
}
+ },
+ "enableSubscriptions": {
+ "type": "boolean"
}
},
"required": [
@@ -688,6 +697,7 @@
"summalyProxy",
"themeColor",
"tosUrl",
+ "commerceDisclosureUrl",
"uri",
"version",
"urlPreviewEnabled",
@@ -697,7 +707,8 @@
"urlPreviewUserAgent",
"urlPreviewSummaryProxyUrl",
"federation",
- "federationHosts"
+ "federationHosts",
+ "enableSubscriptions"
]
}
}
@@ -2217,6 +2228,15 @@
"$ref": "#/components/schemas/Error"
},
"examples": {
+ "SUBSCRIPTION_IS_ACTIVE": {
+ "value": {
+ "error": {
+ "message": "If Subscription is active, cannot move account.",
+ "code": "SUBSCRIPTION_IS_ACTIVE",
+ "id": "f5c8b3b4-9e4d-4b7f-9f4d-9f1f0a7a3d0a"
+ }
+ }
+ },
"INVALID_PARAM": {
"value": {
"error": {
@@ -2481,6 +2501,170 @@
}
}
},
+ "/admin/accounts/find-by-stripe-customer": {
+ "post": {
+ "operationId": "admin___accounts___find-by-stripe-customer",
+ "summary": "admin/accounts/find-by-stripe-customer",
+ "description": "No description provided.\n\n**Credential required**: *Yes* / **Permission**: *read:admin:account*",
+ "externalDocs": {
+ "description": "Source code",
+ "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/admin/accounts/find-by-stripe-customer.ts"
+ },
+ "tags": [
+ "admin"
+ ],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "customerId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "customerId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK (with results)",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "$ref": "#/components/schemas/UserDetailed"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Client error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "USER_NOT_FOUND": {
+ "value": {
+ "error": {
+ "message": "No such user who has the customer id",
+ "code": "USER_NOT_FOUND",
+ "id": "cb865949-8af5-4062-a88c-ef55e8786d1d"
+ }
+ }
+ },
+ "INVALID_PARAM": {
+ "value": {
+ "error": {
+ "message": "Invalid param.",
+ "code": "INVALID_PARAM",
+ "id": "3d81ceae-475f-4600-b2a8-2bc116157532"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authentication error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "CREDENTIAL_REQUIRED": {
+ "value": {
+ "error": {
+ "message": "Credential required.",
+ "code": "CREDENTIAL_REQUIRED",
+ "id": "1384574d-a912-4b81-8601-c7b1c4085df1"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "AUTHENTICATION_FAILED": {
+ "value": {
+ "error": {
+ "message": "Authentication failed. Please ensure your token is correct.",
+ "code": "AUTHENTICATION_FAILED",
+ "id": "b0a7f5f8-dc2f-4171-b91f-de88ad238e14"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "418": {
+ "description": "I'm Ai",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "I_AM_AI": {
+ "value": {
+ "error": {
+ "message": "You sent a request to Ai-chan, Misskey's showgirl, instead of the server.",
+ "code": "I_AM_AI",
+ "id": "60c46cd1-f23a-46b1-bebe-5d2b73951a84"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "INTERNAL_ERROR": {
+ "value": {
+ "error": {
+ "message": "Internal error occurred. Please contact us if the error persists.",
+ "code": "INTERNAL_ERROR",
+ "id": "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/admin/ad/create": {
"post": {
"operationId": "admin___ad___create",
@@ -10637,6 +10821,190 @@
}
}
},
+ "/admin/refresh-user-subscription-status": {
+ "post": {
+ "operationId": "admin___refresh-user-subscription-status",
+ "summary": "admin/refresh-user-subscription-status",
+ "description": "No description provided.\n\n**Credential required**: *Yes* / **Permission**: *write:admin:refresh-user-subscription-status*",
+ "externalDocs": {
+ "description": "Source code",
+ "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/admin/refresh-user-subscription-status.ts"
+ },
+ "tags": [
+ "subscription"
+ ],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "userId": {
+ "type": "string",
+ "format": "misskey:id"
+ }
+ },
+ "required": [
+ "userId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "204": {
+ "description": "OK (without any results)"
+ },
+ "400": {
+ "description": "Client error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "NO_SUCH_USER": {
+ "value": {
+ "error": {
+ "message": "No such user.",
+ "code": "NO_SUCH_USER",
+ "id": "6a27f458-92aa-4807-bbc3-3b8223a84a7e"
+ }
+ }
+ },
+ "ACCESS_DENIED": {
+ "value": {
+ "error": {
+ "message": "Access denied.",
+ "code": "ACCESS_DENIED",
+ "id": "fe8d7103-0ea8-4ec3-814d-f8b401dc69e9"
+ }
+ }
+ },
+ "REQUIRED_EMAIL": {
+ "value": {
+ "error": {
+ "message": "Email is required.",
+ "code": "REQUIRED_EMAIL",
+ "id": "f1b0a9f3-9f8a-4e8c-9b4d-0d2c1b7a9c0b"
+ }
+ }
+ },
+ "UNAVAILABLE": {
+ "value": {
+ "error": {
+ "message": "Subscription unavailable.",
+ "code": "UNAVAILABLE",
+ "id": "ca50e7c1-2589-4360-a338-e729100af0c4"
+ }
+ }
+ },
+ "INVALID_PARAM": {
+ "value": {
+ "error": {
+ "message": "Invalid param.",
+ "code": "INVALID_PARAM",
+ "id": "3d81ceae-475f-4600-b2a8-2bc116157532"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authentication error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "CREDENTIAL_REQUIRED": {
+ "value": {
+ "error": {
+ "message": "Credential required.",
+ "code": "CREDENTIAL_REQUIRED",
+ "id": "1384574d-a912-4b81-8601-c7b1c4085df1"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "AUTHENTICATION_FAILED": {
+ "value": {
+ "error": {
+ "message": "Authentication failed. Please ensure your token is correct.",
+ "code": "AUTHENTICATION_FAILED",
+ "id": "b0a7f5f8-dc2f-4171-b91f-de88ad238e14"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "418": {
+ "description": "I'm Ai",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "I_AM_AI": {
+ "value": {
+ "error": {
+ "message": "You sent a request to Ai-chan, Misskey's showgirl, instead of the server.",
+ "code": "I_AM_AI",
+ "id": "60c46cd1-f23a-46b1-bebe-5d2b73951a84"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "INTERNAL_ERROR": {
+ "value": {
+ "error": {
+ "message": "Internal error occurred. Please contact us if the error persists.",
+ "code": "INTERNAL_ERROR",
+ "id": "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/admin/relays/add": {
"post": {
"operationId": "admin___relays___add",
@@ -12431,6 +12799,18 @@
"null"
]
},
+ "stripeCustomerId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "stripeSubscriptionId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
"autoAcceptFollowed": {
"type": "boolean"
},
@@ -13152,6 +13532,8 @@
"email",
"emailVerified",
"followedMessage",
+ "stripeCustomerId",
+ "stripeSubscriptionId",
"autoAcceptFollowed",
"noCrawle",
"preventAiLearning",
@@ -14355,6 +14737,12 @@
"notesPerOneAd": {
"type": "integer"
},
+ "commerceDisclosureUrl": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
"silencedHosts": {
"type": [
"array",
@@ -14417,6 +14805,9 @@
"items": {
"type": "string"
}
+ },
+ "enableSubscriptions": {
+ "type": "boolean"
}
}
}
@@ -15109,6 +15500,15 @@
}
}
},
+ "IN_USE_ROLE": {
+ "value": {
+ "error": {
+ "message": "Role is in use.",
+ "code": "IN_USE_ROLE",
+ "id": "c1d8e1a8-0d7f-4a5c-8f8e-9e6f6f1e4a7a"
+ }
+ }
+ },
"INVALID_PARAM": {
"value": {
"error": {
@@ -17509,6 +17909,552 @@
}
}
},
+ "/admin/subscription-plans/create": {
+ "post": {
+ "operationId": "admin___subscription-plans___create",
+ "summary": "admin/subscription-plans/create",
+ "description": "No description provided.\n\n**Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.\n**Credential required**: *Yes* / **Permission**: *write:admin:subscription-plans*",
+ "externalDocs": {
+ "description": "Source code",
+ "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/admin/subscription-plans/create.ts"
+ },
+ "tags": [
+ "admin"
+ ],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "slug": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "pattern": "^[a-zA-Z0-9_-]+$"
+ },
+ "price": {
+ "type": "integer"
+ },
+ "currency": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "stripePriceId": {
+ "type": "string"
+ },
+ "roleId": {
+ "type": "string",
+ "format": "misskey:id"
+ }
+ },
+ "required": [
+ "name",
+ "price",
+ "currency",
+ "stripePriceId",
+ "roleId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK (with results)",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "$ref": "#/components/schemas/SubscriptionPlan"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Client error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "NO_SUCH_ROLE": {
+ "value": {
+ "error": {
+ "message": "No such role.",
+ "code": "NO_SUCH_ROLE",
+ "id": "de0d6ecd-8e0a-4253-88ff-74bc89ae3d45"
+ }
+ }
+ },
+ "PLAN_WITH_THIS_SLUG_ALREADY_EXISTS": {
+ "value": {
+ "error": {
+ "message": "Plan with this slug already exists.",
+ "code": "PLAN_WITH_THIS_SLUG_ALREADY_EXISTS",
+ "id": "17098d0d-514f-49c1-826f-27c06475d1b7"
+ }
+ }
+ },
+ "INVALID_PARAM": {
+ "value": {
+ "error": {
+ "message": "Invalid param.",
+ "code": "INVALID_PARAM",
+ "id": "3d81ceae-475f-4600-b2a8-2bc116157532"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authentication error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "CREDENTIAL_REQUIRED": {
+ "value": {
+ "error": {
+ "message": "Credential required.",
+ "code": "CREDENTIAL_REQUIRED",
+ "id": "1384574d-a912-4b81-8601-c7b1c4085df1"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "AUTHENTICATION_FAILED": {
+ "value": {
+ "error": {
+ "message": "Authentication failed. Please ensure your token is correct.",
+ "code": "AUTHENTICATION_FAILED",
+ "id": "b0a7f5f8-dc2f-4171-b91f-de88ad238e14"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "418": {
+ "description": "I'm Ai",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "I_AM_AI": {
+ "value": {
+ "error": {
+ "message": "You sent a request to Ai-chan, Misskey's showgirl, instead of the server.",
+ "code": "I_AM_AI",
+ "id": "60c46cd1-f23a-46b1-bebe-5d2b73951a84"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "INTERNAL_ERROR": {
+ "value": {
+ "error": {
+ "message": "Internal error occurred. Please contact us if the error persists.",
+ "code": "INTERNAL_ERROR",
+ "id": "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/admin/subscription-plans/update": {
+ "post": {
+ "operationId": "admin___subscription-plans___update",
+ "summary": "admin/subscription-plans/update",
+ "description": "No description provided.\n\n**Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.\n**Credential required**: *Yes* / **Permission**: *write:admin:subscription-plans*",
+ "externalDocs": {
+ "description": "Source code",
+ "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/admin/subscription-plans/update.ts"
+ },
+ "tags": [
+ "admin"
+ ],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "planId": {
+ "type": "string",
+ "format": "misskey:id"
+ },
+ "slug": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "pattern": "^[a-zA-Z0-9_-]+$"
+ },
+ "name": {
+ "type": "string"
+ },
+ "price": {
+ "type": "integer"
+ },
+ "currency": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "roleId": {
+ "type": "string",
+ "format": "misskey:id"
+ }
+ },
+ "required": [
+ "planId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "204": {
+ "description": "OK (without any results)"
+ },
+ "400": {
+ "description": "Client error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "NO_SUCH_PLAN": {
+ "value": {
+ "error": {
+ "message": "No such plan.",
+ "code": "NO_SUCH_PLAN",
+ "id": "cd23ef55-09ad-428a-ac61-95a45e124b32"
+ }
+ }
+ },
+ "PLAN_WITH_THIS_SLUG_ALREADY_EXISTS": {
+ "value": {
+ "error": {
+ "message": "Plan with this slug already exists.",
+ "code": "PLAN_WITH_THIS_SLUG_ALREADY_EXISTS",
+ "id": "17098d0d-514f-49c1-826f-27c06475d1b7"
+ }
+ }
+ },
+ "INVALID_PARAM": {
+ "value": {
+ "error": {
+ "message": "Invalid param.",
+ "code": "INVALID_PARAM",
+ "id": "3d81ceae-475f-4600-b2a8-2bc116157532"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authentication error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "CREDENTIAL_REQUIRED": {
+ "value": {
+ "error": {
+ "message": "Credential required.",
+ "code": "CREDENTIAL_REQUIRED",
+ "id": "1384574d-a912-4b81-8601-c7b1c4085df1"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "AUTHENTICATION_FAILED": {
+ "value": {
+ "error": {
+ "message": "Authentication failed. Please ensure your token is correct.",
+ "code": "AUTHENTICATION_FAILED",
+ "id": "b0a7f5f8-dc2f-4171-b91f-de88ad238e14"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "418": {
+ "description": "I'm Ai",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "I_AM_AI": {
+ "value": {
+ "error": {
+ "message": "You sent a request to Ai-chan, Misskey's showgirl, instead of the server.",
+ "code": "I_AM_AI",
+ "id": "60c46cd1-f23a-46b1-bebe-5d2b73951a84"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "INTERNAL_ERROR": {
+ "value": {
+ "error": {
+ "message": "Internal error occurred. Please contact us if the error persists.",
+ "code": "INTERNAL_ERROR",
+ "id": "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/admin/subscription-plans/archive": {
+ "post": {
+ "operationId": "admin___subscription-plans___archive",
+ "summary": "admin/subscription-plans/archive",
+ "description": "No description provided.\n\n**Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.\n**Credential required**: *Yes* / **Permission**: *write:admin:subscription-plans*",
+ "externalDocs": {
+ "description": "Source code",
+ "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/admin/subscription-plans/archive.ts"
+ },
+ "tags": [
+ "admin"
+ ],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "planId": {
+ "type": "string",
+ "format": "misskey:id"
+ }
+ },
+ "required": [
+ "planId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "204": {
+ "description": "OK (without any results)"
+ },
+ "400": {
+ "description": "Client error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "NO_SUCH_PLAN": {
+ "value": {
+ "error": {
+ "message": "No such plan.",
+ "code": "NO_SUCH_PLAN",
+ "id": "cd23ef55-09ad-428a-ac61-95a45e124b32"
+ }
+ }
+ },
+ "INVALID_PARAM": {
+ "value": {
+ "error": {
+ "message": "Invalid param.",
+ "code": "INVALID_PARAM",
+ "id": "3d81ceae-475f-4600-b2a8-2bc116157532"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authentication error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "CREDENTIAL_REQUIRED": {
+ "value": {
+ "error": {
+ "message": "Credential required.",
+ "code": "CREDENTIAL_REQUIRED",
+ "id": "1384574d-a912-4b81-8601-c7b1c4085df1"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "AUTHENTICATION_FAILED": {
+ "value": {
+ "error": {
+ "message": "Authentication failed. Please ensure your token is correct.",
+ "code": "AUTHENTICATION_FAILED",
+ "id": "b0a7f5f8-dc2f-4171-b91f-de88ad238e14"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "418": {
+ "description": "I'm Ai",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "I_AM_AI": {
+ "value": {
+ "error": {
+ "message": "You sent a request to Ai-chan, Misskey's showgirl, instead of the server.",
+ "code": "I_AM_AI",
+ "id": "60c46cd1-f23a-46b1-bebe-5d2b73951a84"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "INTERNAL_ERROR": {
+ "value": {
+ "error": {
+ "message": "Internal error occurred. Please contact us if the error persists.",
+ "code": "INTERNAL_ERROR",
+ "id": "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/announcements": {
"post": {
"operationId": "announcements",
@@ -43835,6 +44781,33 @@
"$ref": "#/components/schemas/Error"
},
"examples": {
+ "INCORRECT_PASSWORD": {
+ "value": {
+ "error": {
+ "message": "Incorrect password.",
+ "code": "INCORRECT_PASSWORD",
+ "id": "44326b04-08ea-4525-b01c-98cc117bdd2a"
+ }
+ }
+ },
+ "AUTHENTICATION_FAILED": {
+ "value": {
+ "error": {
+ "message": "Authentication failed.",
+ "code": "AUTHENTICATION_FAILED",
+ "id": "ea791cff-63e7-4b2a-92fc-646ab641794e"
+ }
+ }
+ },
+ "SUBSCRIPTION_IS_ACTIVE": {
+ "value": {
+ "error": {
+ "message": "If Subscription is active, cannot move account.",
+ "code": "SUBSCRIPTION_IS_ACTIVE",
+ "id": "f5c8b3b4-9e4d-4b7f-9f4d-9f1f0a7a3d0a"
+ }
+ }
+ },
"INVALID_PARAM": {
"value": {
"error": {
@@ -51792,6 +52765,15 @@
}
}
},
+ "SUBSCRIPTION_IS_ACTIVE": {
+ "value": {
+ "error": {
+ "message": "If Subscription is active, cannot move account.",
+ "code": "SUBSCRIPTION_IS_ACTIVE",
+ "id": "f5c8b3b4-9e4d-4b7f-9f4d-9f1f0a7a3d0a"
+ }
+ }
+ },
"INVALID_PARAM": {
"value": {
"error": {
@@ -68061,6 +69043,776 @@
}
}
},
+ "/subscription/create": {
+ "post": {
+ "operationId": "subscription___create",
+ "summary": "subscription/create",
+ "description": "No description provided.\n\n**Credential required**: *Yes* / **Permission**: *write:account*",
+ "externalDocs": {
+ "description": "Source code",
+ "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/subscription/create.ts"
+ },
+ "tags": [
+ "subscription"
+ ],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "planId": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "format": "misskey:id"
+ },
+ "planSlug": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "pattern": "^[a-zA-Z0-9_-]+$"
+ },
+ "returnPath": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "pattern": "^\\/[a-zA-Z0-9_\\/-]+$"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK (with results)",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "redirect": {
+ "type": "object",
+ "properties": {
+ "permanent": {
+ "type": "boolean"
+ },
+ "destination": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "permanent",
+ "destination"
+ ]
+ }
+ },
+ "required": [
+ "redirect"
+ ]
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Client error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "NO_SUCH_USER": {
+ "value": {
+ "error": {
+ "message": "No such user.",
+ "code": "NO_SUCH_USER",
+ "id": "6a27f458-92aa-4807-bbc3-3b8223a84a7e"
+ }
+ }
+ },
+ "NO_SUCH_PLAN": {
+ "value": {
+ "error": {
+ "message": "No such plan.",
+ "code": "NO_SUCH_PLAN",
+ "id": "d9f0d5c1-0b5b-4b7a-9d2c-1c1c5c6d1d1d"
+ }
+ }
+ },
+ "ACCESS_DENIED": {
+ "value": {
+ "error": {
+ "message": "Access denied.",
+ "code": "ACCESS_DENIED",
+ "id": "fe8d7103-0ea8-4ec3-814d-f8b401dc69e9"
+ }
+ }
+ },
+ "REQUIRED_EMAIL": {
+ "value": {
+ "error": {
+ "message": "Email is required.",
+ "code": "REQUIRED_EMAIL",
+ "id": "f1b0a9f3-9f8a-4e8c-9b4d-0d2c1b7a9c0b"
+ }
+ }
+ },
+ "STATUS_INCONSENT": {
+ "value": {
+ "error": {
+ "message": "The information registered in the payment service and the information stored on the server do not match.",
+ "code": "STATUS_INCONSENT",
+ "id": "f1d204e7-276a-4277-9e7b-14f5e038c2d8"
+ }
+ }
+ },
+ "UNAVAILABLE": {
+ "value": {
+ "error": {
+ "message": "Subscription unavailable.",
+ "code": "UNAVAILABLE",
+ "id": "ca50e7c1-2589-4360-a338-e729100af0c4"
+ }
+ }
+ },
+ "SESSION_INVALID": {
+ "value": {
+ "error": {
+ "message": "Session is invalid.",
+ "code": "SESSION_INVALID",
+ "id": "4cee5674-69de-474d-aea7-00ed3c4fc8d7"
+ }
+ }
+ },
+ "INVALID_PARAM": {
+ "value": {
+ "error": {
+ "message": "Invalid param.",
+ "code": "INVALID_PARAM",
+ "id": "3d81ceae-475f-4600-b2a8-2bc116157532"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authentication error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "CREDENTIAL_REQUIRED": {
+ "value": {
+ "error": {
+ "message": "Credential required.",
+ "code": "CREDENTIAL_REQUIRED",
+ "id": "1384574d-a912-4b81-8601-c7b1c4085df1"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "AUTHENTICATION_FAILED": {
+ "value": {
+ "error": {
+ "message": "Authentication failed. Please ensure your token is correct.",
+ "code": "AUTHENTICATION_FAILED",
+ "id": "b0a7f5f8-dc2f-4171-b91f-de88ad238e14"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "418": {
+ "description": "I'm Ai",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "I_AM_AI": {
+ "value": {
+ "error": {
+ "message": "You sent a request to Ai-chan, Misskey's showgirl, instead of the server.",
+ "code": "I_AM_AI",
+ "id": "60c46cd1-f23a-46b1-bebe-5d2b73951a84"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "429": {
+ "description": "Too many requests",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "RATE_LIMIT_EXCEEDED": {
+ "value": {
+ "error": {
+ "message": "Rate limit exceeded. Please try again later.",
+ "code": "RATE_LIMIT_EXCEEDED",
+ "id": "d5826d14-3982-4d2e-8011-b9e9f02499ef"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "INTERNAL_ERROR": {
+ "value": {
+ "error": {
+ "message": "Internal error occurred. Please contact us if the error persists.",
+ "code": "INTERNAL_ERROR",
+ "id": "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/subscription/manage": {
+ "post": {
+ "operationId": "subscription___manage",
+ "summary": "subscription/manage",
+ "description": "No description provided.\n\n**Credential required**: *Yes* / **Permission**: *read:account*",
+ "externalDocs": {
+ "description": "Source code",
+ "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/subscription/manage.ts"
+ },
+ "tags": [
+ "subscription"
+ ],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "returnPath": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "pattern": "^\\/[a-zA-Z0-9_\\/-]+$"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK (with results)",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "redirect": {
+ "type": "object",
+ "properties": {
+ "permanent": {
+ "type": "boolean"
+ },
+ "destination": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "permanent",
+ "destination"
+ ]
+ }
+ },
+ "required": [
+ "redirect"
+ ]
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Client error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "UNAVAILABLE": {
+ "value": {
+ "error": {
+ "message": "Subscription unavailable.",
+ "code": "UNAVAILABLE",
+ "id": "ca50e7c1-2589-4360-a338-e729100af0c4"
+ }
+ }
+ },
+ "NO_SUCH_USER": {
+ "value": {
+ "error": {
+ "message": "No such user.",
+ "code": "NO_SUCH_USER",
+ "id": "6a27f458-92aa-4807-bbc3-3b8223a84a7e"
+ }
+ }
+ },
+ "SESSION_INVALID": {
+ "value": {
+ "error": {
+ "message": "Session is invalid.",
+ "code": "SESSION_INVALID",
+ "id": "4cee5674-69de-474d-aea7-00ed3c4fc8d7"
+ }
+ }
+ },
+ "INVALID_PARAM": {
+ "value": {
+ "error": {
+ "message": "Invalid param.",
+ "code": "INVALID_PARAM",
+ "id": "3d81ceae-475f-4600-b2a8-2bc116157532"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authentication error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "CREDENTIAL_REQUIRED": {
+ "value": {
+ "error": {
+ "message": "Credential required.",
+ "code": "CREDENTIAL_REQUIRED",
+ "id": "1384574d-a912-4b81-8601-c7b1c4085df1"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "AUTHENTICATION_FAILED": {
+ "value": {
+ "error": {
+ "message": "Authentication failed. Please ensure your token is correct.",
+ "code": "AUTHENTICATION_FAILED",
+ "id": "b0a7f5f8-dc2f-4171-b91f-de88ad238e14"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "418": {
+ "description": "I'm Ai",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "I_AM_AI": {
+ "value": {
+ "error": {
+ "message": "You sent a request to Ai-chan, Misskey's showgirl, instead of the server.",
+ "code": "I_AM_AI",
+ "id": "60c46cd1-f23a-46b1-bebe-5d2b73951a84"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "INTERNAL_ERROR": {
+ "value": {
+ "error": {
+ "message": "Internal error occurred. Please contact us if the error persists.",
+ "code": "INTERNAL_ERROR",
+ "id": "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/subscription-plans/list": {
+ "post": {
+ "operationId": "subscription-plans___list",
+ "summary": "subscription-plans/list",
+ "description": "No description provided.\n\n**Credential required**: *No*",
+ "externalDocs": {
+ "description": "Source code",
+ "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/subscription-plans/list.ts"
+ },
+ "tags": [
+ "subscription-plans"
+ ],
+ "responses": {
+ "200": {
+ "description": "OK (with results)",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "$ref": "#/components/schemas/SubscriptionPlan"
+ }
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Client error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "INVALID_PARAM": {
+ "value": {
+ "error": {
+ "message": "Invalid param.",
+ "code": "INVALID_PARAM",
+ "id": "3d81ceae-475f-4600-b2a8-2bc116157532"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authentication error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "CREDENTIAL_REQUIRED": {
+ "value": {
+ "error": {
+ "message": "Credential required.",
+ "code": "CREDENTIAL_REQUIRED",
+ "id": "1384574d-a912-4b81-8601-c7b1c4085df1"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "AUTHENTICATION_FAILED": {
+ "value": {
+ "error": {
+ "message": "Authentication failed. Please ensure your token is correct.",
+ "code": "AUTHENTICATION_FAILED",
+ "id": "b0a7f5f8-dc2f-4171-b91f-de88ad238e14"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "418": {
+ "description": "I'm Ai",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "I_AM_AI": {
+ "value": {
+ "error": {
+ "message": "You sent a request to Ai-chan, Misskey's showgirl, instead of the server.",
+ "code": "I_AM_AI",
+ "id": "60c46cd1-f23a-46b1-bebe-5d2b73951a84"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "INTERNAL_ERROR": {
+ "value": {
+ "error": {
+ "message": "Internal error occurred. Please contact us if the error persists.",
+ "code": "INTERNAL_ERROR",
+ "id": "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/subscription-plans/show": {
+ "post": {
+ "operationId": "subscription-plans___show",
+ "summary": "subscription-plans/show",
+ "description": "No description provided.\n\n**Credential required**: *No*",
+ "externalDocs": {
+ "description": "Source code",
+ "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/subscription-plans/show.ts"
+ },
+ "tags": [
+ "subscription-plans"
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "planId": {
+ "type": "string",
+ "format": "misskey:id"
+ }
+ },
+ "required": [
+ "planId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK (with results)",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "$ref": "#/components/schemas/SubscriptionPlan"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Client error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "NO_SUCH_PLAN": {
+ "value": {
+ "error": {
+ "message": "No such plan.",
+ "code": "NO_SUCH_PLAN",
+ "id": "d9f0d5c1-0b5b-4b7a-9d2c-1c1c5c6d1d1d"
+ }
+ }
+ },
+ "INVALID_PARAM": {
+ "value": {
+ "error": {
+ "message": "Invalid param.",
+ "code": "INVALID_PARAM",
+ "id": "3d81ceae-475f-4600-b2a8-2bc116157532"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authentication error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "CREDENTIAL_REQUIRED": {
+ "value": {
+ "error": {
+ "message": "Credential required.",
+ "code": "CREDENTIAL_REQUIRED",
+ "id": "1384574d-a912-4b81-8601-c7b1c4085df1"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "AUTHENTICATION_FAILED": {
+ "value": {
+ "error": {
+ "message": "Authentication failed. Please ensure your token is correct.",
+ "code": "AUTHENTICATION_FAILED",
+ "id": "b0a7f5f8-dc2f-4171-b91f-de88ad238e14"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "418": {
+ "description": "I'm Ai",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "I_AM_AI": {
+ "value": {
+ "error": {
+ "message": "You sent a request to Ai-chan, Misskey's showgirl, instead of the server.",
+ "code": "I_AM_AI",
+ "id": "60c46cd1-f23a-46b1-bebe-5d2b73951a84"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "INTERNAL_ERROR": {
+ "value": {
+ "error": {
+ "message": "Internal error occurred. Please contact us if the error persists.",
+ "code": "INTERNAL_ERROR",
+ "id": "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/sw/show-registration": {
"post": {
"operationId": "sw___show-registration",
@@ -77976,6 +79728,26 @@
"displayOrder"
]
}
+ },
+ "subscriptionStatus": {
+ "type": "string",
+ "enum": [
+ "incomplete",
+ "incomplete_expired",
+ "trialing",
+ "active",
+ "past_due",
+ "paused",
+ "canceled",
+ "unpaid",
+ "none"
+ ]
+ },
+ "subscriptionPlanId": {
+ "type": [
+ "string",
+ "null"
+ ]
}
},
"required": [
@@ -77987,7 +79759,9 @@
"avatarBlurhash",
"avatarDecorations",
"emojis",
- "onlineStatus"
+ "onlineStatus",
+ "subscriptionStatus",
+ "subscriptionPlanId"
]
},
"UserDetailedNotMeOnly": {
@@ -79096,6 +80870,18 @@
"lastUsed"
]
}
+ },
+ "stripeCustomerId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "stripeSubscriptionId": {
+ "type": [
+ "string",
+ "null"
+ ]
}
},
"required": [
@@ -79135,7 +80921,8 @@
"policies",
"twoFactorEnabled",
"usePasswordLessLogin",
- "securityKeys"
+ "securityKeys",
+ "stripeSubscriptionId"
]
},
"UserDetailedNotMe": {
@@ -82887,6 +84674,9 @@
"enableUrlPreview": {
"type": "boolean"
},
+ "enableSubscriptions": {
+ "type": "boolean"
+ },
"backgroundImageUrl": {
"type": [
"string",
@@ -82911,6 +84701,12 @@
"null"
]
},
+ "commerceDisclosureUrl": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
"inquiryUrl": {
"type": [
"string",
@@ -82988,10 +84784,12 @@
"translatorAvailable",
"mediaProxy",
"enableUrlPreview",
+ "enableSubscriptions",
"backgroundImageUrl",
"impressumUrl",
"logoImageUrl",
"privacyPolicyUrl",
+ "commerceDisclosureUrl",
"inquiryUrl",
"serverRules",
"themeColor",
@@ -83205,6 +85003,71 @@
"name",
"method"
]
+ },
+ "SubscriptionPlan": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "id",
+ "example": "xxxxxxxxxx"
+ },
+ "name": {
+ "type": "string",
+ "example": "New Plan"
+ },
+ "slug": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "example": "new-plan"
+ },
+ "price": {
+ "type": "integer",
+ "example": 1000
+ },
+ "currency": {
+ "type": "string",
+ "example": "usd"
+ },
+ "description": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "example": "New Plan"
+ },
+ "stripePriceId": {
+ "type": "string",
+ "example": "price_xxxxxxxxxx"
+ },
+ "roleId": {
+ "type": "string",
+ "format": "id",
+ "example": "xxxxxxxxxx"
+ },
+ "role": {
+ "type": "object",
+ "$ref": "#/components/schemas/RoleLite"
+ },
+ "isArchived": {
+ "type": "boolean",
+ "example": false
+ }
+ },
+ "required": [
+ "id",
+ "name",
+ "slug",
+ "price",
+ "currency",
+ "description",
+ "stripePriceId",
+ "roleId",
+ "role",
+ "isArchived"
+ ]
}
},
"securitySchemes": { |
Thank you for sending us a great Pull Request! 👍 example: pnpm run build-misskey-js-with-types |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Stripe
Why
Additional info (optional)
Checklist