Skip to content

Commit 333b09f

Browse files
committed
chore: generate OpenAPI specification
1 parent cdc7b0b commit 333b09f

1 file changed

Lines changed: 93 additions & 8 deletions

File tree

‎OpenAPI.json‎

Lines changed: 93 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1483,6 +1483,16 @@
14831483
}
14841484
}
14851485
],
1486+
"requestBody": {
1487+
"content": {
1488+
"application/json": {
1489+
"schema": {
1490+
"$ref": "#/components/schemas/DataCreateInvite"
1491+
}
1492+
}
1493+
},
1494+
"required": true
1495+
},
14861496
"responses": {
14871497
"default": {
14881498
"description": "An error occurred.",
@@ -6838,6 +6848,7 @@
68386848
"required": [
68396849
"body_limit_size",
68406850
"group_size",
6851+
"max_invite_duration_days",
68416852
"message_embeds",
68426853
"message_reactions",
68436854
"message_replies",
@@ -6898,6 +6909,11 @@
68986909
"description": "New user hours",
68996910
"type": "integer",
69006911
"format": "int64"
6912+
},
6913+
"max_invite_duration_days": {
6914+
"description": "Number of days after creation before an invite expires",
6915+
"type": "integer",
6916+
"format": "int64"
69016917
}
69026918
}
69036919
},
@@ -9847,7 +9863,8 @@
98479863
"channel",
98489864
"creator",
98499865
"server",
9850-
"type"
9866+
"type",
9867+
"uses"
98519868
],
98529869
"properties": {
98539870
"type": {
@@ -9871,6 +9888,28 @@
98719888
"channel": {
98729889
"description": "Id of the server channel this invite points to",
98739890
"type": "string"
9891+
},
9892+
"max_uses": {
9893+
"description": "Maximum number of times this invite can be used",
9894+
"type": "integer",
9895+
"format": "uint64",
9896+
"minimum": 0.0,
9897+
"nullable": true
9898+
},
9899+
"uses": {
9900+
"description": "Number of times this invite has been used",
9901+
"type": "integer",
9902+
"format": "uint64",
9903+
"minimum": 0.0
9904+
},
9905+
"expires": {
9906+
"description": "Timestamp at which this invite expires",
9907+
"allOf": [
9908+
{
9909+
"$ref": "#/components/schemas/ISO8601 Timestamp"
9910+
}
9911+
],
9912+
"nullable": true
98749913
}
98759914
}
98769915
},
@@ -9881,7 +9920,8 @@
98819920
"_id",
98829921
"channel",
98839922
"creator",
9884-
"type"
9923+
"type",
9924+
"uses"
98859925
],
98869926
"properties": {
98879927
"type": {
@@ -9901,11 +9941,62 @@
99019941
"channel": {
99029942
"description": "Id of the group channel this invite points to",
99039943
"type": "string"
9944+
},
9945+
"max_uses": {
9946+
"description": "Maximum number of times this invite can be used",
9947+
"type": "integer",
9948+
"format": "uint64",
9949+
"minimum": 0.0,
9950+
"nullable": true
9951+
},
9952+
"uses": {
9953+
"description": "Number of times this invite has been used",
9954+
"type": "integer",
9955+
"format": "uint64",
9956+
"minimum": 0.0
9957+
},
9958+
"expires": {
9959+
"description": "Timestamp at which this invite expires",
9960+
"allOf": [
9961+
{
9962+
"$ref": "#/components/schemas/ISO8601 Timestamp"
9963+
}
9964+
],
9965+
"nullable": true
99049966
}
99059967
}
99069968
}
99079969
]
99089970
},
9971+
"ISO8601 Timestamp": {
9972+
"description": "ISO8601 formatted timestamp",
9973+
"type": "string",
9974+
"format": "date-time",
9975+
"example": "1970-01-01T00:00:00Z"
9976+
},
9977+
"DataCreateInvite": {
9978+
"description": "Create Invite",
9979+
"type": "object",
9980+
"properties": {
9981+
"max_uses": {
9982+
"description": "Maximum number of times this invite can be used",
9983+
"type": "integer",
9984+
"format": "uint64",
9985+
"maximum": 100.0,
9986+
"minimum": 1.0,
9987+
"nullable": true
9988+
},
9989+
"expires": {
9990+
"description": "Number of seconds until this invite expires",
9991+
"allOf": [
9992+
{
9993+
"$ref": "#/components/schemas/ISO8601 Timestamp"
9994+
}
9995+
],
9996+
"nullable": true
9997+
}
9998+
}
9999+
},
990910000
"Message": {
991010001
"description": "Message",
991110002
"type": "object",
@@ -10150,12 +10241,6 @@
1015010241
}
1015110242
}
1015210243
},
10153-
"ISO8601 Timestamp": {
10154-
"description": "ISO8601 formatted timestamp",
10155-
"type": "string",
10156-
"format": "date-time",
10157-
"example": "1970-01-01T00:00:00Z"
10158-
},
1015910244
"MessageWebhook": {
1016010245
"description": "Information about the webhook bundled with Message",
1016110246
"type": "object",

0 commit comments

Comments
 (0)