mirror of
https://github.com/LukeHagar/discoursejs.git
synced 2025-12-09 20:37:45 +00:00
ci: regenerated with OpenAPI Doc latest, Speakeasy CLI 1.368.0
This commit is contained in:
@@ -35,6 +35,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { adminActivateUser } from "@lukehagar/discoursejs/funcs/adminActivateUser.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await adminActivateUser(sdk, 458565);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -75,6 +104,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { adminAdminGetUser } from "@lukehagar/discoursejs/funcs/adminAdminGetUser.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await adminAdminGetUser(sdk, 641278);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -117,6 +175,37 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { adminAdminListUsers } from "@lukehagar/discoursejs/funcs/adminAdminListUsers.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await adminAdminListUsers(sdk, {
|
||||
flag: "blocked",
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -157,6 +246,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { adminAnonymizeUser } from "@lukehagar/discoursejs/funcs/adminAnonymizeUser.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await adminAnonymizeUser(sdk, 976366);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -197,6 +315,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { adminDeactivateUser } from "@lukehagar/discoursejs/funcs/adminDeactivateUser.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await adminDeactivateUser(sdk, 495555);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -237,6 +384,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { adminDeleteUser } from "@lukehagar/discoursejs/funcs/adminDeleteUser.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await adminDeleteUser(sdk, 335223);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -278,6 +454,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { adminLogOutUser } from "@lukehagar/discoursejs/funcs/adminLogOutUser.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await adminLogOutUser(sdk, 141178);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -318,6 +523,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { adminRefreshGravatar } from "@lukehagar/discoursejs/funcs/adminRefreshGravatar.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await adminRefreshGravatar(sdk, "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -361,6 +595,38 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { adminSilenceUser } from "@lukehagar/discoursejs/funcs/adminSilenceUser.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await adminSilenceUser(sdk, 212223, {
|
||||
postAction: "delete",
|
||||
silencedTill: "2022-06-01T08:00:00.000Z",
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -406,6 +672,39 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { adminSuspendUser } from "@lukehagar/discoursejs/funcs/adminSuspendUser.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await adminSuspendUser(sdk, 192215, {
|
||||
postAction: "delete",
|
||||
reason: "<value>",
|
||||
suspendUntil: "2121-02-22",
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
|
||||
@@ -29,6 +29,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { backupsCreateBackup } from "@lukehagar/discoursejs/funcs/backupsCreateBackup.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await backupsCreateBackup(sdk);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -63,6 +92,34 @@ async function run() {
|
||||
await sdk.backups.downloadBackup("<value>", "<value>");
|
||||
|
||||
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { backupsDownloadBackup } from "@lukehagar/discoursejs/funcs/backupsDownloadBackup.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await backupsDownloadBackup(sdk, "<value>", "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
|
||||
}
|
||||
|
||||
run();
|
||||
@@ -109,6 +166,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { backupsGetBackups } from "@lukehagar/discoursejs/funcs/backupsGetBackups.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await backupsGetBackups(sdk);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -142,6 +228,34 @@ async function run() {
|
||||
await sdk.backups.sendDownloadBackupEmail("<value>");
|
||||
|
||||
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { backupsSendDownloadBackupEmail } from "@lukehagar/discoursejs/funcs/backupsSendDownloadBackupEmail.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await backupsSendDownloadBackupEmail(sdk, "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
|
||||
}
|
||||
|
||||
run();
|
||||
|
||||
@@ -30,6 +30,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { badgesAdminListBadges } from "@lukehagar/discoursejs/funcs/badgesAdminListBadges.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await badgesAdminListBadges(sdk);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -69,6 +98,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { badgesCreateBadge } from "@lukehagar/discoursejs/funcs/badgesCreateBadge.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await badgesCreateBadge(sdk);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -103,6 +161,34 @@ async function run() {
|
||||
await sdk.badges.deleteBadge(32345);
|
||||
|
||||
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { badgesDeleteBadge } from "@lukehagar/discoursejs/funcs/badgesDeleteBadge.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await badgesDeleteBadge(sdk, 402816);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
|
||||
}
|
||||
|
||||
run();
|
||||
@@ -148,6 +234,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { badgesListUserBadges } from "@lukehagar/discoursejs/funcs/badgesListUserBadges.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await badgesListUserBadges(sdk, "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -188,6 +303,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { badgesUpdateBadge } from "@lukehagar/discoursejs/funcs/badgesUpdateBadge.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await badgesUpdateBadge(sdk, 569102);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
|
||||
@@ -38,6 +38,42 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { categoriesCreateCategory } from "@lukehagar/discoursejs/funcs/categoriesCreateCategory.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await categoriesCreateCategory(sdk, {
|
||||
color: "49d9e9",
|
||||
name: "<value>",
|
||||
permissions: {
|
||||
everyone: 1,
|
||||
},
|
||||
textColor: "f0fcfd",
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -78,6 +114,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { categoriesGetCategory } from "@lukehagar/discoursejs/funcs/categoriesGetCategory.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await categoriesGetCategory(sdk, 687295);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -118,6 +183,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { categoriesGetSite } from "@lukehagar/discoursejs/funcs/categoriesGetSite.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await categoriesGetSite(sdk);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -157,6 +251,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { categoriesListCategories } from "@lukehagar/discoursejs/funcs/categoriesListCategories.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await categoriesListCategories(sdk);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -197,6 +320,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { categoriesListCategoryTopics } from "@lukehagar/discoursejs/funcs/categoriesListCategoryTopics.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await categoriesListCategoryTopics(sdk, 671891, "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -245,6 +397,42 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { categoriesUpdateCategory } from "@lukehagar/discoursejs/funcs/categoriesUpdateCategory.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await categoriesUpdateCategory(sdk, 999337, {
|
||||
color: "49d9e9",
|
||||
name: "<value>",
|
||||
permissions: {
|
||||
everyone: 1,
|
||||
},
|
||||
textColor: "f0fcfd",
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
|
||||
@@ -35,6 +35,37 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { groupsAddGroupMembers } from "@lukehagar/discoursejs/funcs/groupsAddGroupMembers.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await groupsAddGroupMembers(sdk, 946323, {
|
||||
usernames: "username1,username2",
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -76,6 +107,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { groupsCreateGroup } from "@lukehagar/discoursejs/funcs/groupsCreateGroup.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await groupsCreateGroup(sdk);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -116,6 +176,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { groupsDeleteGroup } from "@lukehagar/discoursejs/funcs/groupsDeleteGroup.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await groupsDeleteGroup(sdk, 114822);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -156,6 +245,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { groupsGetGroup } from "@lukehagar/discoursejs/funcs/groupsGetGroup.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await groupsGetGroup(sdk, "name");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
@@ -196,6 +314,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { groupsListGroupMembers } from "@lukehagar/discoursejs/funcs/groupsListGroupMembers.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await groupsListGroupMembers(sdk, "name");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
@@ -236,6 +383,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { groupsListGroups } from "@lukehagar/discoursejs/funcs/groupsListGroups.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await groupsListGroups(sdk);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -277,6 +453,37 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { groupsRemoveGroupMembers } from "@lukehagar/discoursejs/funcs/groupsRemoveGroupMembers.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await groupsRemoveGroupMembers(sdk, 699656, {
|
||||
usernames: "username1,username2",
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -318,6 +525,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { groupsUpdateGroup } from "@lukehagar/discoursejs/funcs/groupsUpdateGroup.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await groupsUpdateGroup(sdk, 750192);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
|
||||
@@ -32,6 +32,40 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { invitesCreateInvite } from "@lukehagar/discoursejs/funcs/invitesCreateInvite.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await invitesCreateInvite(sdk, "<value>", "<value>", {
|
||||
email: "not-a-user-yet@example.com",
|
||||
groupIds: "42,43",
|
||||
groupNames: "foo,bar",
|
||||
maxRedemptionsAllowed: 5,
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -74,6 +108,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { invitesInviteToTopic } from "@lukehagar/discoursejs/funcs/invitesInviteToTopic.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await invitesInviteToTopic(sdk, "<value>", "<value>", "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
|
||||
@@ -27,6 +27,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { notificationsGetNotifications } from "@lukehagar/discoursejs/funcs/notificationsGetNotifications.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await notificationsGetNotifications(sdk);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -66,6 +95,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { notificationsMarkNotificationsAsRead } from "@lukehagar/discoursejs/funcs/notificationsMarkNotificationsAsRead.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await notificationsMarkNotificationsAsRead(sdk);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
|
||||
@@ -37,6 +37,39 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { postsCreateTopicPostPM } from "@lukehagar/discoursejs/funcs/postsCreateTopicPostPM.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await postsCreateTopicPostPM(sdk, {
|
||||
archetype: "private_message",
|
||||
raw: "<value>",
|
||||
targetRecipients: "blake,sam",
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -73,6 +106,36 @@ async function run() {
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { postsDeletePost } from "@lukehagar/discoursejs/funcs/postsDeletePost.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await postsDeletePost(sdk, 928159, {
|
||||
forceDestroy: true,
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
|
||||
}
|
||||
|
||||
run();
|
||||
@@ -124,6 +187,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { postsGetPost } from "@lukehagar/discoursejs/funcs/postsGetPost.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await postsGetPost(sdk, "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -164,6 +256,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { postsListPosts } from "@lukehagar/discoursejs/funcs/postsListPosts.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await postsListPosts(sdk, "<value>", "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -206,6 +327,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { postsLockPost } from "@lukehagar/discoursejs/funcs/postsLockPost.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await postsLockPost(sdk, "<value>", "<value>", "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -249,6 +399,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { postsPerformPostAction } from "@lukehagar/discoursejs/funcs/postsPerformPostAction.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await postsPerformPostAction(sdk, "<value>", "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -291,6 +470,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { postsPostReplies } from "@lukehagar/discoursejs/funcs/postsPostReplies.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await postsPostReplies(sdk, "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -331,6 +539,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { postsUpdatePost } from "@lukehagar/discoursejs/funcs/postsUpdatePost.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await postsUpdatePost(sdk, "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
|
||||
@@ -32,6 +32,39 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { privateMessagesCreateTopicPostPM } from "@lukehagar/discoursejs/funcs/privateMessagesCreateTopicPostPM.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await privateMessagesCreateTopicPostPM(sdk, {
|
||||
archetype: "private_message",
|
||||
raw: "<value>",
|
||||
targetRecipients: "blake,sam",
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -72,6 +105,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { privateMessagesGetUserSentPrivateMessages } from "@lukehagar/discoursejs/funcs/privateMessagesGetUserSentPrivateMessages.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await privateMessagesGetUserSentPrivateMessages(sdk, "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -112,6 +174,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { privateMessagesListUserPrivateMessages } from "@lukehagar/discoursejs/funcs/privateMessagesListUserPrivateMessages.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await privateMessagesListUserPrivateMessages(sdk, "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -26,6 +26,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { siteGetSite } from "@lukehagar/discoursejs/funcs/siteGetSite.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await siteGetSite(sdk);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
|
||||
@@ -31,6 +31,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { tagsCreateTagGroup } from "@lukehagar/discoursejs/funcs/tagsCreateTagGroup.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await tagsCreateTagGroup(sdk);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -71,6 +100,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { tagsGetTag } from "@lukehagar/discoursejs/funcs/tagsGetTag.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await tagsGetTag(sdk, "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -111,6 +169,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { tagsGetTagGroup } from "@lukehagar/discoursejs/funcs/tagsGetTagGroup.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await tagsGetTagGroup(sdk, "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -151,6 +238,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { tagsListTagGroups } from "@lukehagar/discoursejs/funcs/tagsListTagGroups.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await tagsListTagGroups(sdk);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -190,6 +306,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { tagsListTags } from "@lukehagar/discoursejs/funcs/tagsListTags.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await tagsListTags(sdk);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -229,6 +374,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { tagsUpdateTagGroup } from "@lukehagar/discoursejs/funcs/tagsUpdateTagGroup.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await tagsUpdateTagGroup(sdk, "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
|
||||
@@ -32,6 +32,34 @@ async function run() {
|
||||
await sdk.topics.bookmarkTopic("<value>", "<value>", "<value>");
|
||||
|
||||
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { topicsBookmarkTopic } from "@lukehagar/discoursejs/funcs/topicsBookmarkTopic.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await topicsBookmarkTopic(sdk, "<value>", "<value>", "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
|
||||
}
|
||||
|
||||
run();
|
||||
@@ -83,6 +111,39 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { topicsCreateTopicPostPM } from "@lukehagar/discoursejs/funcs/topicsCreateTopicPostPM.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await topicsCreateTopicPostPM(sdk, {
|
||||
archetype: "private_message",
|
||||
raw: "<value>",
|
||||
targetRecipients: "blake,sam",
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -125,6 +186,37 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { topicsCreateTopicTimer } from "@lukehagar/discoursejs/funcs/topicsCreateTopicTimer.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await topicsCreateTopicTimer(sdk, "<value>", "<value>", "<value>", {
|
||||
time: "",
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -168,6 +260,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { topicsGetTopic } from "@lukehagar/discoursejs/funcs/topicsGetTopic.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await topicsGetTopic(sdk, "<value>", "<value>", "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -204,6 +325,34 @@ async function run() {
|
||||
await sdk.topics.getTopicByExternalId("<value>");
|
||||
|
||||
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { topicsGetTopicByExternalId } from "@lukehagar/discoursejs/funcs/topicsGetTopicByExternalId.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await topicsGetTopicByExternalId(sdk, "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
|
||||
}
|
||||
|
||||
run();
|
||||
@@ -249,6 +398,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { topicsInviteToTopic } from "@lukehagar/discoursejs/funcs/topicsInviteToTopic.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await topicsInviteToTopic(sdk, "<value>", "<value>", "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -292,6 +470,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { topicsListLatestTopics } from "@lukehagar/discoursejs/funcs/topicsListLatestTopics.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await topicsListLatestTopics(sdk, "<value>", "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -335,6 +542,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { topicsListTopTopics } from "@lukehagar/discoursejs/funcs/topicsListTopTopics.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await topicsListTopTopics(sdk, "<value>", "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -371,6 +607,34 @@ async function run() {
|
||||
await sdk.topics.removeTopic("<value>", "<value>", "<value>");
|
||||
|
||||
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { topicsRemoveTopic } from "@lukehagar/discoursejs/funcs/topicsRemoveTopic.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await topicsRemoveTopic(sdk, "<value>", "<value>", "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
|
||||
}
|
||||
|
||||
run();
|
||||
@@ -418,6 +682,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { topicsSetNotificationLevel } from "@lukehagar/discoursejs/funcs/topicsSetNotificationLevel.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await topicsSetNotificationLevel(sdk, "<value>", "<value>", "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -461,6 +754,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { topicsUpdateTopic } from "@lukehagar/discoursejs/funcs/topicsUpdateTopic.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await topicsUpdateTopic(sdk, "<value>", "<value>", "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -508,6 +830,39 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { topicsUpdateTopicStatus } from "@lukehagar/discoursejs/funcs/topicsUpdateTopicStatus.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await topicsUpdateTopicStatus(sdk, "<value>", "<value>", "<value>", {
|
||||
enabled: "true",
|
||||
status: "visible",
|
||||
until: "2030-12-31",
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -553,6 +908,37 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { topicsUpdateTopicTimestamp } from "@lukehagar/discoursejs/funcs/topicsUpdateTopicTimestamp.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await topicsUpdateTopicTimestamp(sdk, "<value>", "<value>", "<value>", {
|
||||
timestamp: "1594291380",
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
|
||||
@@ -46,6 +46,37 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { uploadsAbortMultipart } from "@lukehagar/discoursejs/funcs/uploadsAbortMultipart.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await uploadsAbortMultipart(sdk, {
|
||||
externalUploadIdentifier: "84x83tmxy398t3y._Q_z8CoJYVr69bE6D7f8J6Oo0434QquLFoYdGVerWFx9X5HDEI_TP_95c34n853495x35345394.d.ghQ",
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -114,6 +145,42 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { uploadsBatchPresignMultipartParts } from "@lukehagar/discoursejs/funcs/uploadsBatchPresignMultipartParts.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await uploadsBatchPresignMultipartParts(sdk, {
|
||||
partNumbers: [
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
],
|
||||
uniqueIdentifier: "66e86218-80d9-4bda-b4d5-2b6def968705",
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -176,6 +243,40 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { uploadsCompleteExternalUpload } from "@lukehagar/discoursejs/funcs/uploadsCompleteExternalUpload.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await uploadsCompleteExternalUpload(sdk, {
|
||||
forPrivateMessage: "true",
|
||||
forSiteSetting: "true",
|
||||
pasted: "true",
|
||||
uniqueIdentifier: "66e86218-80d9-4bda-b4d5-2b6def968705",
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -242,6 +343,47 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { uploadsCompleteMultipart } from "@lukehagar/discoursejs/funcs/uploadsCompleteMultipart.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await uploadsCompleteMultipart(sdk, {
|
||||
parts: [
|
||||
{
|
||||
"part_number": 1,
|
||||
"etag": "0c376dcfcc2606f4335bbc732de93344",
|
||||
},
|
||||
{
|
||||
"part_number": 2,
|
||||
"etag": "09ert8cfcc2606f4335bbc732de91122",
|
||||
},
|
||||
],
|
||||
uniqueIdentifier: "66e86218-80d9-4bda-b4d5-2b6def968705",
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -297,6 +439,39 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { uploadsCreateMultipartUpload } from "@lukehagar/discoursejs/funcs/uploadsCreateMultipartUpload.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await uploadsCreateMultipartUpload(sdk, {
|
||||
fileName: "IMG_2021.jpeg",
|
||||
fileSize: 4096,
|
||||
uploadType: "card_background",
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -337,6 +512,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { uploadsCreateUpload } from "@lukehagar/discoursejs/funcs/uploadsCreateUpload.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await uploadsCreateUpload(sdk);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -401,6 +605,39 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { uploadsGeneratePresignedPut } from "@lukehagar/discoursejs/funcs/uploadsGeneratePresignedPut.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await uploadsGeneratePresignedPut(sdk, {
|
||||
fileName: "IMG_2021.jpeg",
|
||||
fileSize: 4096,
|
||||
type: "avatar",
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
|
||||
@@ -49,6 +49,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { usersActivateUser } from "@lukehagar/discoursejs/funcs/usersActivateUser.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await usersActivateUser(sdk, 458565);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -89,6 +118,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { usersAdminGetUser } from "@lukehagar/discoursejs/funcs/usersAdminGetUser.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await usersAdminGetUser(sdk, 641278);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -131,6 +189,37 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { usersAdminListUsers } from "@lukehagar/discoursejs/funcs/usersAdminListUsers.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await usersAdminListUsers(sdk, {
|
||||
flag: "blocked",
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -171,6 +260,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { usersAnonymizeUser } from "@lukehagar/discoursejs/funcs/usersAnonymizeUser.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await usersAnonymizeUser(sdk, 976366);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -205,6 +323,34 @@ async function run() {
|
||||
await sdk.users.changePassword("<value>");
|
||||
|
||||
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { usersChangePassword } from "@lukehagar/discoursejs/funcs/usersChangePassword.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await usersChangePassword(sdk, "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
|
||||
}
|
||||
|
||||
run();
|
||||
@@ -251,6 +397,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { usersCreateUser } from "@lukehagar/discoursejs/funcs/usersCreateUser.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await usersCreateUser(sdk, "<value>", "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -293,6 +468,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { usersDeactivateUser } from "@lukehagar/discoursejs/funcs/usersDeactivateUser.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await usersDeactivateUser(sdk, 495555);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -333,6 +537,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { usersDeleteUser } from "@lukehagar/discoursejs/funcs/usersDeleteUser.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await usersDeleteUser(sdk, 335223);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -374,6 +607,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { usersGetUser } from "@lukehagar/discoursejs/funcs/usersGetUser.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await usersGetUser(sdk, "<value>", "<value>", "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -416,6 +678,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { usersGetUserEmails } from "@lukehagar/discoursejs/funcs/usersGetUserEmails.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await usersGetUserEmails(sdk, "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -456,6 +747,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { usersGetUserExternalId } from "@lukehagar/discoursejs/funcs/usersGetUserExternalId.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await usersGetUserExternalId(sdk, "<value>", "<value>", "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -498,6 +818,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { usersGetUserIdentiyProviderExternalId } from "@lukehagar/discoursejs/funcs/usersGetUserIdentiyProviderExternalId.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await usersGetUserIdentiyProviderExternalId(sdk, "<value>", "<value>", "<value>", "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -541,6 +890,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { usersListUserActions } from "@lukehagar/discoursejs/funcs/usersListUserActions.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await usersListUserActions(sdk, "<value>", 257087, "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -583,6 +961,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { usersListUserBadges } from "@lukehagar/discoursejs/funcs/usersListUserBadges.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await usersListUserBadges(sdk, "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -623,6 +1030,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { usersListUsersPublic } from "@lukehagar/discoursejs/funcs/usersListUsersPublic.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await usersListUsersPublic(sdk, "likes_given", "quarterly");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -666,6 +1102,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { usersLogOutUser } from "@lukehagar/discoursejs/funcs/usersLogOutUser.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await usersLogOutUser(sdk, 141178);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -706,6 +1171,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { usersRefreshGravatar } from "@lukehagar/discoursejs/funcs/usersRefreshGravatar.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await usersRefreshGravatar(sdk, "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -746,6 +1240,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { usersSendPasswordResetEmail } from "@lukehagar/discoursejs/funcs/usersSendPasswordResetEmail.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await usersSendPasswordResetEmail(sdk);
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -789,6 +1312,38 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { usersSilenceUser } from "@lukehagar/discoursejs/funcs/usersSilenceUser.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await usersSilenceUser(sdk, 212223, {
|
||||
postAction: "delete",
|
||||
silencedTill: "2022-06-01T08:00:00.000Z",
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -834,6 +1389,39 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { usersSuspendUser } from "@lukehagar/discoursejs/funcs/usersSuspendUser.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await usersSuspendUser(sdk, 192215, {
|
||||
postAction: "delete",
|
||||
reason: "<value>",
|
||||
suspendUntil: "2121-02-22",
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -875,6 +1463,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { usersUpdateAvatar } from "@lukehagar/discoursejs/funcs/usersUpdateAvatar.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await usersUpdateAvatar(sdk, "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -910,6 +1527,34 @@ async function run() {
|
||||
await sdk.users.updateEmail("<value>");
|
||||
|
||||
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { usersUpdateEmail } from "@lukehagar/discoursejs/funcs/usersUpdateEmail.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await usersUpdateEmail(sdk, "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
|
||||
}
|
||||
|
||||
run();
|
||||
@@ -956,6 +1601,35 @@ async function run() {
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { usersUpdateUser } from "@lukehagar/discoursejs/funcs/usersUpdateUser.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await usersUpdateUser(sdk, "<value>", "<value>", "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
@@ -993,6 +1667,34 @@ async function run() {
|
||||
await sdk.users.updateUsername("<value>");
|
||||
|
||||
|
||||
}
|
||||
|
||||
run();
|
||||
```
|
||||
|
||||
|
||||
### Standalone function
|
||||
|
||||
The standalone function version of this method:
|
||||
|
||||
```typescript
|
||||
import { SDKCore } from "@lukehagar/discoursejs/core.js";
|
||||
import { usersUpdateUsername } from "@lukehagar/discoursejs/funcs/usersUpdateUsername.js";
|
||||
|
||||
// Use `SDKCore` for best tree-shaking performance.
|
||||
// You can create one instance of it to use across an application.
|
||||
const sdk = new SDKCore();
|
||||
|
||||
async function run() {
|
||||
const res = await usersUpdateUsername(sdk, "<value>");
|
||||
|
||||
if (!res.ok) {
|
||||
throw res.error;
|
||||
}
|
||||
|
||||
const { value: result } = res;
|
||||
|
||||
|
||||
}
|
||||
|
||||
run();
|
||||
|
||||
Reference in New Issue
Block a user