Skip to content

Commit

Permalink
Update Documentation with core changes (#102)
Browse files Browse the repository at this point in the history
Co-authored-by: discoursebuild <[email protected]>
  • Loading branch information
github-actions[bot] and discoursebuild authored Jan 12, 2024
1 parent 9785677 commit d518e0f
Show file tree
Hide file tree
Showing 2 changed files with 247 additions and 12 deletions.
147 changes: 141 additions & 6 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3991,6 +3991,141 @@
}
}
},
"/invites/create-multiple.json": {
"post": {
"summary": "Create multiple invites",
"tags": [
"Invites"
],
"operationId": "createMultipleInvites",
"parameters": [
{
"name": "Api-Key",
"in": "header",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "Api-Username",
"in": "header",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "success response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"num_successfully_created_invitations": {
"type": "integer",
"example": 42
},
"num_failed_invitations": {
"type": "integer",
"example": 42
},
"failed_invitations": {
"type": "array",
"items": {},
"example": []
},
"successful_invitations": {
"type": "array",
"example": [
{
"id": 42,
"link": "http://example.com/invites/9045fd767efe201ca60c6658bcf14158",
"email": "[email protected]",
"emailed": true,
"custom_message": "Hello world!",
"topics": [],
"groups": [],
"created_at": "2021-01-01T12:00:00.000Z",
"updated_at": "2021-01-01T12:00:00.000Z",
"expires_at": "2021-02-01T12:00:00.000Z",
"expired": false
},
{
"id": 42,
"link": "http://example.com/invites/c6658bcf141589045fd767efe201ca60",
"email": "[email protected]",
"emailed": true,
"custom_message": "Hello world!",
"topics": [],
"groups": [],
"created_at": "2021-01-01T12:00:00.000Z",
"updated_at": "2021-01-01T12:00:00.000Z",
"expires_at": "2021-02-01T12:00:00.000Z",
"expired": false
}
]
}
}
}
}
}
}
},
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"email": {
"type": "string",
"example": [
"[email protected]",
"[email protected]"
],
"description": "pass 1 email per invite to be generated. other properties\nwill be shared by each invite."
},
"skip_email": {
"type": "boolean",
"default": false
},
"custom_message": {
"type": "string",
"description": "optional, for email invites"
},
"max_redemptions_allowed": {
"type": "integer",
"example": 5,
"default": 1,
"description": "optional, for link invites"
},
"topic_id": {
"type": "integer"
},
"group_ids": {
"type": "string",
"description": "Optional, either this or `group_names`. Comma separated\nlist for multiple ids.",
"example": "42,43"
},
"group_names": {
"type": "string",
"description": "Optional, either this or `group_ids`. Comma separated\nlist for multiple names.",
"example": "foo,bar"
},
"expires_at": {
"type": "string",
"description": "optional, if not supplied, the invite_expiry_days site\nsetting is used"
}
}
}
}
}
}
}
},
"/notifications.json": {
"get": {
"summary": "Get the notifications that belong to the current user",
Expand Down Expand Up @@ -4455,7 +4590,7 @@
"type": "integer"
},
"score": {
"type": "integer"
"type": "number"
},
"yours": {
"type": "boolean"
Expand Down Expand Up @@ -4801,7 +4936,7 @@
"type": "integer"
},
"score": {
"type": ""
"type": "number"
},
"yours": {
"type": "boolean"
Expand Down Expand Up @@ -5102,7 +5237,7 @@
"type": "integer"
},
"score": {
"type": ""
"type": "number"
},
"yours": {
"type": "boolean"
Expand Down Expand Up @@ -5472,7 +5607,7 @@
"type": "integer"
},
"score": {
"type": "integer"
"type": "number"
},
"yours": {
"type": "boolean"
Expand Down Expand Up @@ -8165,7 +8300,7 @@
"type": "integer"
},
"score": {
"type": "integer"
"type": "number"
},
"yours": {
"type": "boolean"
Expand Down Expand Up @@ -8431,7 +8566,7 @@
"type": "integer"
},
"score": {
"type": "integer"
"type": "number"
},
"yours": {
"type": "boolean"
Expand Down
112 changes: 106 additions & 6 deletions openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2863,6 +2863,106 @@ paths:
type: string
description: optional, if not supplied, the invite_expiry_days site
setting is used
"/invites/create-multiple.json":
post:
summary: Create multiple invites
tags:
- Invites
operationId: createMultipleInvites
parameters:
- name: Api-Key
in: header
required: true
schema:
type: string
- name: Api-Username
in: header
required: true
schema:
type: string
responses:
'200':
description: success response
content:
application/json:
schema:
type: object
properties:
num_successfully_created_invitations:
type: integer
example: 42
num_failed_invitations:
type: integer
example: 42
failed_invitations:
type: array
items: {}
example: []
successful_invitations:
type: array
example:
- id: 42
link: http://example.com/invites/9045fd767efe201ca60c6658bcf14158
email: [email protected]
emailed: true
custom_message: Hello world!
topics: []
groups: []
created_at: '2021-01-01T12:00:00.000Z'
updated_at: '2021-01-01T12:00:00.000Z'
expires_at: '2021-02-01T12:00:00.000Z'
expired: false
- id: 42
link: http://example.com/invites/c6658bcf141589045fd767efe201ca60
email: [email protected]
emailed: true
custom_message: Hello world!
topics: []
groups: []
created_at: '2021-01-01T12:00:00.000Z'
updated_at: '2021-01-01T12:00:00.000Z'
expires_at: '2021-02-01T12:00:00.000Z'
expired: false
requestBody:
content:
application/json:
schema:
type: object
properties:
email:
type: string
example:
- [email protected]
- [email protected]
description: pass 1 email per invite to be generated. other properties
will be shared by each invite.
skip_email:
type: boolean
default: false
custom_message:
type: string
description: optional, for email invites
max_redemptions_allowed:
type: integer
example: 5
default: 1
description: optional, for link invites
topic_id:
type: integer
group_ids:
type: string
description: Optional, either this or `group_names`. Comma separated
list for multiple ids.
example: '42,43'
group_names:
type: string
description: Optional, either this or `group_ids`. Comma separated
list for multiple names.
example: foo,bar
expires_at:
type: string
description: optional, if not supplied, the invite_expiry_days site
setting is used
"/notifications.json":
get:
summary: Get the notifications that belong to the current user
Expand Down Expand Up @@ -3172,7 +3272,7 @@ paths:
readers_count:
type: integer
score:
type: integer
type: number
yours:
type: boolean
topic_id:
Expand Down Expand Up @@ -3429,7 +3529,7 @@ paths:
readers_count:
type: integer
score:
type: ''
type: number
yours:
type: boolean
topic_id:
Expand Down Expand Up @@ -3645,7 +3745,7 @@ paths:
readers_count:
type: integer
score:
type: ''
type: number
yours:
type: boolean
topic_id:
Expand Down Expand Up @@ -3907,7 +4007,7 @@ paths:
readers_count:
type: integer
score:
type: integer
type: number
yours:
type: boolean
topic_id:
Expand Down Expand Up @@ -5775,7 +5875,7 @@ paths:
readers_count:
type: integer
score:
type: integer
type: number
yours:
type: boolean
topic_id:
Expand Down Expand Up @@ -5948,7 +6048,7 @@ paths:
readers_count:
type: integer
score:
type: integer
type: number
yours:
type: boolean
topic_id:
Expand Down

0 comments on commit d518e0f

Please sign in to comment.