-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Documentation with core changes (#102)
Co-authored-by: discoursebuild <[email protected]>
- Loading branch information
1 parent
9785677
commit d518e0f
Showing
2 changed files
with
247 additions
and
12 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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", | ||
|
@@ -4455,7 +4590,7 @@ | |
"type": "integer" | ||
}, | ||
"score": { | ||
"type": "integer" | ||
"type": "number" | ||
}, | ||
"yours": { | ||
"type": "boolean" | ||
|
@@ -4801,7 +4936,7 @@ | |
"type": "integer" | ||
}, | ||
"score": { | ||
"type": "" | ||
"type": "number" | ||
}, | ||
"yours": { | ||
"type": "boolean" | ||
|
@@ -5102,7 +5237,7 @@ | |
"type": "integer" | ||
}, | ||
"score": { | ||
"type": "" | ||
"type": "number" | ||
}, | ||
"yours": { | ||
"type": "boolean" | ||
|
@@ -5472,7 +5607,7 @@ | |
"type": "integer" | ||
}, | ||
"score": { | ||
"type": "integer" | ||
"type": "number" | ||
}, | ||
"yours": { | ||
"type": "boolean" | ||
|
@@ -8165,7 +8300,7 @@ | |
"type": "integer" | ||
}, | ||
"score": { | ||
"type": "integer" | ||
"type": "number" | ||
}, | ||
"yours": { | ||
"type": "boolean" | ||
|
@@ -8431,7 +8566,7 @@ | |
"type": "integer" | ||
}, | ||
"score": { | ||
"type": "integer" | ||
"type": "number" | ||
}, | ||
"yours": { | ||
"type": "boolean" | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -3172,7 +3272,7 @@ paths: | |
readers_count: | ||
type: integer | ||
score: | ||
type: integer | ||
type: number | ||
yours: | ||
type: boolean | ||
topic_id: | ||
|
@@ -3429,7 +3529,7 @@ paths: | |
readers_count: | ||
type: integer | ||
score: | ||
type: '' | ||
type: number | ||
yours: | ||
type: boolean | ||
topic_id: | ||
|
@@ -3645,7 +3745,7 @@ paths: | |
readers_count: | ||
type: integer | ||
score: | ||
type: '' | ||
type: number | ||
yours: | ||
type: boolean | ||
topic_id: | ||
|
@@ -3907,7 +4007,7 @@ paths: | |
readers_count: | ||
type: integer | ||
score: | ||
type: integer | ||
type: number | ||
yours: | ||
type: boolean | ||
topic_id: | ||
|
@@ -5775,7 +5875,7 @@ paths: | |
readers_count: | ||
type: integer | ||
score: | ||
type: integer | ||
type: number | ||
yours: | ||
type: boolean | ||
topic_id: | ||
|
@@ -5948,7 +6048,7 @@ paths: | |
readers_count: | ||
type: integer | ||
score: | ||
type: integer | ||
type: number | ||
yours: | ||
type: boolean | ||
topic_id: | ||
|