mirror of
https://github.com/LukeHagar/discoursejs.git
synced 2025-12-07 20:37:48 +00:00
ci: regenerated with OpenAPI Doc latest, Speakeasy CLI 1.147.0
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
lockVersion: 2.0.0
|
lockVersion: 2.0.0
|
||||||
id: 599a9576-4665-431e-be1e-44cc13ef28aa
|
id: 599a9576-4665-431e-be1e-44cc13ef28aa
|
||||||
management:
|
management:
|
||||||
docChecksum: 172e648f7bfe018e3bb1d9cbe1a74ac8
|
docChecksum: bff491e1e4058fd68bef5fc6e1674b33
|
||||||
docVersion: latest
|
docVersion: latest
|
||||||
speakeasyVersion: internal
|
speakeasyVersion: internal
|
||||||
generationVersion: 2.237.2
|
generationVersion: 2.237.2
|
||||||
releaseVersion: 0.2.2
|
releaseVersion: 0.3.0
|
||||||
configChecksum: 6cb272037727282881e08de46c1f70d7
|
configChecksum: 2d72986f082e2760e841b98f4feb609a
|
||||||
repoURL: https://github.com/LukeHagar/discoursejs.git
|
repoURL: https://github.com/LukeHagar/discoursejs.git
|
||||||
repoSubDirectory: .
|
repoSubDirectory: .
|
||||||
installationURL: https://github.com/LukeHagar/discoursejs
|
installationURL: https://github.com/LukeHagar/discoursejs
|
||||||
@@ -16,6 +16,7 @@ features:
|
|||||||
core: 3.4.6
|
core: 3.4.6
|
||||||
deprecations: 2.81.1
|
deprecations: 2.81.1
|
||||||
flattening: 2.81.1
|
flattening: 2.81.1
|
||||||
|
globalSecurity: 2.82.2
|
||||||
globalServerURLs: 2.82.1
|
globalServerURLs: 2.82.1
|
||||||
generatedFiles:
|
generatedFiles:
|
||||||
- src/sdk/backups.ts
|
- src/sdk/backups.ts
|
||||||
@@ -138,8 +139,10 @@ generatedFiles:
|
|||||||
- src/sdk/models/operations/createmultipartupload.ts
|
- src/sdk/models/operations/createmultipartupload.ts
|
||||||
- src/sdk/models/operations/createupload.ts
|
- src/sdk/models/operations/createupload.ts
|
||||||
- src/sdk/models/operations/generatepresignedput.ts
|
- src/sdk/models/operations/generatepresignedput.ts
|
||||||
|
- src/sdk/models/shared/security.ts
|
||||||
- src/sdk/models/errors/index.ts
|
- src/sdk/models/errors/index.ts
|
||||||
- src/sdk/models/operations/index.ts
|
- src/sdk/models/operations/index.ts
|
||||||
|
- src/sdk/models/shared/index.ts
|
||||||
- docs/sdk/models/operations/createbackuprequestbody.md
|
- docs/sdk/models/operations/createbackuprequestbody.md
|
||||||
- docs/sdk/models/operations/createbackupresponsebody.md
|
- docs/sdk/models/operations/createbackupresponsebody.md
|
||||||
- docs/sdk/models/operations/createbackupresponse.md
|
- docs/sdk/models/operations/createbackupresponse.md
|
||||||
@@ -585,6 +588,7 @@ generatedFiles:
|
|||||||
- docs/sdk/models/operations/signedheaders.md
|
- docs/sdk/models/operations/signedheaders.md
|
||||||
- docs/sdk/models/operations/generatepresignedputresponsebody.md
|
- docs/sdk/models/operations/generatepresignedputresponsebody.md
|
||||||
- docs/sdk/models/operations/generatepresignedputresponse.md
|
- docs/sdk/models/operations/generatepresignedputresponse.md
|
||||||
|
- docs/sdk/models/shared/security.md
|
||||||
- docs/sdks/sdk/README.md
|
- docs/sdks/sdk/README.md
|
||||||
- docs/sdks/backups/README.md
|
- docs/sdks/backups/README.md
|
||||||
- docs/sdks/badges/README.md
|
- docs/sdks/badges/README.md
|
||||||
|
|||||||
60
README.md
60
README.md
@@ -32,7 +32,12 @@ yarn add @lukehagar/discoursejs
|
|||||||
import { SDK } from "@lukehagar/discoursejs";
|
import { SDK } from "@lukehagar/discoursejs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const res = await sdk.backups.createBackup({
|
const res = await sdk.backups.createBackup({
|
||||||
withUploads: false,
|
withUploads: false,
|
||||||
@@ -212,7 +217,12 @@ Example
|
|||||||
import { SDK } from "@lukehagar/discoursejs";
|
import { SDK } from "@lukehagar/discoursejs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
let res;
|
let res;
|
||||||
try {
|
try {
|
||||||
@@ -255,6 +265,10 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new SDK({
|
||||||
serverIdx: 0,
|
serverIdx: 0,
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.backups.createBackup({
|
const res = await sdk.backups.createBackup({
|
||||||
@@ -284,6 +298,10 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK({
|
const sdk = new SDK({
|
||||||
serverURL: "https://{defaultHost}",
|
serverURL: "https://{defaultHost}",
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await sdk.backups.createBackup({
|
const res = await sdk.backups.createBackup({
|
||||||
@@ -319,6 +337,44 @@ const sdk = new SDK({defaultClient: httpClient});
|
|||||||
```
|
```
|
||||||
<!-- End Custom HTTP Client [http-client] -->
|
<!-- End Custom HTTP Client [http-client] -->
|
||||||
|
|
||||||
|
<!-- Start Authentication [security] -->
|
||||||
|
## Authentication
|
||||||
|
|
||||||
|
### Per-Client Security Schemes
|
||||||
|
|
||||||
|
This SDK supports the following security schemes globally:
|
||||||
|
|
||||||
|
| Name | Type | Scheme |
|
||||||
|
| ---------- | ---------- | ---------- |
|
||||||
|
| `key` | apiKey | API key |
|
||||||
|
| `username` | apiKey | API key |
|
||||||
|
|
||||||
|
You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. The selected scheme will be used by default to authenticate with the API for all operations that support it. For example:
|
||||||
|
```typescript
|
||||||
|
import { SDK } from "@lukehagar/discoursejs";
|
||||||
|
|
||||||
|
async function run() {
|
||||||
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const res = await sdk.backups.createBackup({
|
||||||
|
withUploads: false,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (res.statusCode == 200) {
|
||||||
|
// handle response
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
run();
|
||||||
|
|
||||||
|
```
|
||||||
|
<!-- End Authentication [security] -->
|
||||||
|
|
||||||
<!-- Placeholder for Future Speakeasy SDK Sections -->
|
<!-- Placeholder for Future Speakeasy SDK Sections -->
|
||||||
|
|
||||||
# Development
|
# Development
|
||||||
|
|||||||
12
RELEASES.md
12
RELEASES.md
@@ -48,4 +48,14 @@ Based on:
|
|||||||
### Generated
|
### Generated
|
||||||
- [typescript v0.2.2] .
|
- [typescript v0.2.2] .
|
||||||
### Releases
|
### Releases
|
||||||
- [NPM v0.2.2] https://www.npmjs.com/package/@lukehagar/discoursejs/v/0.2.2 - .
|
- [NPM v0.2.2] https://www.npmjs.com/package/@lukehagar/discoursejs/v/0.2.2 - .
|
||||||
|
|
||||||
|
## 2024-01-19 19:32:18
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc latest
|
||||||
|
- Speakeasy CLI 1.147.0 (2.237.2) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [typescript v0.3.0] .
|
||||||
|
### Releases
|
||||||
|
- [NPM v0.3.0] https://www.npmjs.com/package/@lukehagar/discoursejs/v/0.3.0 - .
|
||||||
7
USAGE.md
7
USAGE.md
@@ -3,7 +3,12 @@
|
|||||||
import { SDK } from "@lukehagar/discoursejs";
|
import { SDK } from "@lukehagar/discoursejs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const res = await sdk.backups.createBackup({
|
const res = await sdk.backups.createBackup({
|
||||||
withUploads: false,
|
withUploads: false,
|
||||||
|
|||||||
9
docs/sdk/models/shared/security.md
Normal file
9
docs/sdk/models/shared/security.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# Security
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||||
|
| `key` | *string* | :heavy_check_mark: | N/A |
|
||||||
|
| `username` | *string* | :heavy_check_mark: | N/A |
|
||||||
@@ -25,7 +25,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { ActivateUserRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { ActivateUserRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: number = 203554;
|
const id: number = 203554;
|
||||||
|
|
||||||
const res = await sdk.admin.activateUser(id);
|
const res = await sdk.admin.activateUser(id);
|
||||||
@@ -66,7 +71,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { AdminGetUserRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { AdminGetUserRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: number = 386776;
|
const id: number = 386776;
|
||||||
|
|
||||||
const res = await sdk.admin.adminGetUser(id);
|
const res = await sdk.admin.adminGetUser(id);
|
||||||
@@ -107,7 +117,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { Flag, QueryParamAsc, QueryParamOrder } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { Flag, QueryParamAsc, QueryParamOrder } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const res = await sdk.admin.adminListUsers({
|
const res = await sdk.admin.adminListUsers({
|
||||||
flag: Flag.New,
|
flag: Flag.New,
|
||||||
@@ -149,7 +164,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { AnonymizeUserRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { AnonymizeUserRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: number = 418778;
|
const id: number = 418778;
|
||||||
|
|
||||||
const res = await sdk.admin.anonymizeUser(id);
|
const res = await sdk.admin.anonymizeUser(id);
|
||||||
@@ -190,7 +210,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { DeactivateUserRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { DeactivateUserRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: number = 143950;
|
const id: number = 143950;
|
||||||
|
|
||||||
const res = await sdk.admin.deactivateUser(id);
|
const res = await sdk.admin.deactivateUser(id);
|
||||||
@@ -231,7 +256,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { DeleteUserRequest, DeleteUserRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { DeleteUserRequest, DeleteUserRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: number = 251343;
|
const id: number = 251343;
|
||||||
const requestBody: DeleteUserRequestBody = {};
|
const requestBody: DeleteUserRequestBody = {};
|
||||||
|
|
||||||
@@ -274,7 +304,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { LogOutUserRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { LogOutUserRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: number = 379568;
|
const id: number = 379568;
|
||||||
|
|
||||||
const res = await sdk.admin.logOutUser(id);
|
const res = await sdk.admin.logOutUser(id);
|
||||||
@@ -315,7 +350,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { RefreshGravatarRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { RefreshGravatarRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const username: string = "string";
|
const username: string = "string";
|
||||||
|
|
||||||
const res = await sdk.admin.refreshGravatar(username);
|
const res = await sdk.admin.refreshGravatar(username);
|
||||||
@@ -356,7 +396,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { SilenceUserRequest, SilenceUserRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { SilenceUserRequest, SilenceUserRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: number = 606247;
|
const id: number = 606247;
|
||||||
const requestBody: SilenceUserRequestBody = {
|
const requestBody: SilenceUserRequestBody = {
|
||||||
postAction: "delete",
|
postAction: "delete",
|
||||||
@@ -402,7 +447,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { SuspendUserRequest, SuspendUserRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { SuspendUserRequest, SuspendUserRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: number = 970832;
|
const id: number = 970832;
|
||||||
const requestBody: SuspendUserRequestBody = {
|
const requestBody: SuspendUserRequestBody = {
|
||||||
postAction: "delete",
|
postAction: "delete",
|
||||||
|
|||||||
@@ -18,7 +18,12 @@ Create backup
|
|||||||
import { SDK } from "@lukehagar/discoursejs";
|
import { SDK } from "@lukehagar/discoursejs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const res = await sdk.backups.createBackup({
|
const res = await sdk.backups.createBackup({
|
||||||
withUploads: false,
|
withUploads: false,
|
||||||
@@ -60,7 +65,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { DownloadBackupRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { DownloadBackupRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const filename: string = "string";
|
const filename: string = "string";
|
||||||
const token: string = "string";
|
const token: string = "string";
|
||||||
|
|
||||||
@@ -102,7 +112,12 @@ List backups
|
|||||||
import { SDK } from "@lukehagar/discoursejs";
|
import { SDK } from "@lukehagar/discoursejs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const res = await sdk.backups.getBackups();
|
const res = await sdk.backups.getBackups();
|
||||||
|
|
||||||
@@ -141,7 +156,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { SendDownloadBackupEmailRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { SendDownloadBackupEmailRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const filename: string = "string";
|
const filename: string = "string";
|
||||||
|
|
||||||
const res = await sdk.backups.sendDownloadBackupEmail(filename);
|
const res = await sdk.backups.sendDownloadBackupEmail(filename);
|
||||||
|
|||||||
@@ -19,7 +19,12 @@ List badges
|
|||||||
import { SDK } from "@lukehagar/discoursejs";
|
import { SDK } from "@lukehagar/discoursejs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const res = await sdk.badges.adminListBadges();
|
const res = await sdk.badges.adminListBadges();
|
||||||
|
|
||||||
@@ -57,7 +62,12 @@ Create badge
|
|||||||
import { SDK } from "@lukehagar/discoursejs";
|
import { SDK } from "@lukehagar/discoursejs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const res = await sdk.badges.createBadge({
|
const res = await sdk.badges.createBadge({
|
||||||
badgeTypeId: 190613,
|
badgeTypeId: 190613,
|
||||||
@@ -100,7 +110,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { DeleteBadgeRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { DeleteBadgeRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: number = 32345;
|
const id: number = 32345;
|
||||||
|
|
||||||
const res = await sdk.badges.deleteBadge(id);
|
const res = await sdk.badges.deleteBadge(id);
|
||||||
@@ -141,7 +156,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { ListUserBadgesRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { ListUserBadgesRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const username: string = "string";
|
const username: string = "string";
|
||||||
|
|
||||||
const res = await sdk.badges.listUserBadges(username);
|
const res = await sdk.badges.listUserBadges(username);
|
||||||
@@ -182,7 +202,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { UpdateBadgeRequest, UpdateBadgeRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { UpdateBadgeRequest, UpdateBadgeRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: number = 280628;
|
const id: number = 280628;
|
||||||
const requestBody: UpdateBadgeRequestBody = {
|
const requestBody: UpdateBadgeRequestBody = {
|
||||||
badgeTypeId: 568845,
|
badgeTypeId: 568845,
|
||||||
|
|||||||
@@ -20,7 +20,12 @@ Creates a category
|
|||||||
import { SDK } from "@lukehagar/discoursejs";
|
import { SDK } from "@lukehagar/discoursejs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const res = await sdk.categories.createCategory({
|
const res = await sdk.categories.createCategory({
|
||||||
color: "49d9e9",
|
color: "49d9e9",
|
||||||
@@ -70,7 +75,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { GetCategoryRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { GetCategoryRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: number = 39147;
|
const id: number = 39147;
|
||||||
|
|
||||||
const res = await sdk.categories.getCategory(id);
|
const res = await sdk.categories.getCategory(id);
|
||||||
@@ -110,7 +120,12 @@ Can be used to fetch all categories and subcategories
|
|||||||
import { SDK } from "@lukehagar/discoursejs";
|
import { SDK } from "@lukehagar/discoursejs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const res = await sdk.categories.getSite();
|
const res = await sdk.categories.getSite();
|
||||||
|
|
||||||
@@ -149,7 +164,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { ListCategoriesRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { ListCategoriesRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const includeSubcategories: boolean = false;
|
const includeSubcategories: boolean = false;
|
||||||
|
|
||||||
const res = await sdk.categories.listCategories(includeSubcategories);
|
const res = await sdk.categories.listCategories(includeSubcategories);
|
||||||
@@ -190,7 +210,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { ListCategoryTopicsRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { ListCategoryTopicsRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: number = 394133;
|
const id: number = 394133;
|
||||||
const slug: string = "string";
|
const slug: string = "string";
|
||||||
|
|
||||||
@@ -233,7 +258,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { UpdateCategoryRequest, UpdateCategoryRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { UpdateCategoryRequest, UpdateCategoryRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: number = 353500;
|
const id: number = 353500;
|
||||||
const requestBody: UpdateCategoryRequestBody = {
|
const requestBody: UpdateCategoryRequestBody = {
|
||||||
color: "49d9e9",
|
color: "49d9e9",
|
||||||
|
|||||||
@@ -23,7 +23,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { AddGroupMembersRequest, AddGroupMembersRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { AddGroupMembersRequest, AddGroupMembersRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: number = 985975;
|
const id: number = 985975;
|
||||||
const requestBody: AddGroupMembersRequestBody = {
|
const requestBody: AddGroupMembersRequestBody = {
|
||||||
usernames: "username1,username2",
|
usernames: "username1,username2",
|
||||||
@@ -67,7 +72,12 @@ Create a group
|
|||||||
import { SDK } from "@lukehagar/discoursejs";
|
import { SDK } from "@lukehagar/discoursejs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const res = await sdk.groups.createGroup({
|
const res = await sdk.groups.createGroup({
|
||||||
group: {
|
group: {
|
||||||
@@ -126,7 +136,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { DeleteGroupRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { DeleteGroupRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: number = 21302;
|
const id: number = 21302;
|
||||||
|
|
||||||
const res = await sdk.groups.deleteGroup(id);
|
const res = await sdk.groups.deleteGroup(id);
|
||||||
@@ -167,7 +182,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { GetGroupRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { GetGroupRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: string = "string";
|
const id: string = "string";
|
||||||
|
|
||||||
const res = await sdk.groups.getGroup(id);
|
const res = await sdk.groups.getGroup(id);
|
||||||
@@ -208,7 +228,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { ListGroupMembersRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { ListGroupMembersRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: string = "string";
|
const id: string = "string";
|
||||||
|
|
||||||
const res = await sdk.groups.listGroupMembers(id);
|
const res = await sdk.groups.listGroupMembers(id);
|
||||||
@@ -248,7 +273,12 @@ List groups
|
|||||||
import { SDK } from "@lukehagar/discoursejs";
|
import { SDK } from "@lukehagar/discoursejs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const res = await sdk.groups.listGroups();
|
const res = await sdk.groups.listGroups();
|
||||||
|
|
||||||
@@ -287,7 +317,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { RemoveGroupMembersRequest, RemoveGroupMembersRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { RemoveGroupMembersRequest, RemoveGroupMembersRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: number = 649523;
|
const id: number = 649523;
|
||||||
const requestBody: RemoveGroupMembersRequestBody = {
|
const requestBody: RemoveGroupMembersRequestBody = {
|
||||||
usernames: "username1,username2",
|
usernames: "username1,username2",
|
||||||
@@ -332,7 +367,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { UpdateGroupGroup, UpdateGroupRequest, UpdateGroupRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { UpdateGroupGroup, UpdateGroupRequest, UpdateGroupRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: number = 438471;
|
const id: number = 438471;
|
||||||
const requestBody: UpdateGroupRequestBody = {
|
const requestBody: UpdateGroupRequestBody = {
|
||||||
group: {
|
group: {
|
||||||
|
|||||||
@@ -17,7 +17,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { CreateInviteRequest, CreateInviteRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { CreateInviteRequest, CreateInviteRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const apiKey: string = "string";
|
const apiKey: string = "string";
|
||||||
const apiUsername: string = "string";
|
const apiUsername: string = "string";
|
||||||
const requestBody: CreateInviteRequestBody = {
|
const requestBody: CreateInviteRequestBody = {
|
||||||
@@ -67,7 +72,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { InviteToTopicRequest, InviteToTopicRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { InviteToTopicRequest, InviteToTopicRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const apiKey: string = "string";
|
const apiKey: string = "string";
|
||||||
const apiUsername: string = "string";
|
const apiUsername: string = "string";
|
||||||
const id: string = "string";
|
const id: string = "string";
|
||||||
|
|||||||
@@ -16,7 +16,12 @@ Get the notifications that belong to the current user
|
|||||||
import { SDK } from "@lukehagar/discoursejs";
|
import { SDK } from "@lukehagar/discoursejs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const res = await sdk.notifications.getNotifications();
|
const res = await sdk.notifications.getNotifications();
|
||||||
|
|
||||||
@@ -54,7 +59,12 @@ Mark notifications as read
|
|||||||
import { SDK } from "@lukehagar/discoursejs";
|
import { SDK } from "@lukehagar/discoursejs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const res = await sdk.notifications.markNotificationsAsRead({});
|
const res = await sdk.notifications.markNotificationsAsRead({});
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,12 @@ Creates a new topic, a new post, or a private message
|
|||||||
import { SDK } from "@lukehagar/discoursejs";
|
import { SDK } from "@lukehagar/discoursejs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const res = await sdk.posts.createTopicPostPM({
|
const res = await sdk.posts.createTopicPostPM({
|
||||||
archetype: "private_message",
|
archetype: "private_message",
|
||||||
@@ -66,7 +71,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { DeletePostRequest, DeletePostRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { DeletePostRequest, DeletePostRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: number = 188146;
|
const id: number = 188146;
|
||||||
const requestBody: DeletePostRequestBody = {
|
const requestBody: DeletePostRequestBody = {
|
||||||
forceDestroy: true,
|
forceDestroy: true,
|
||||||
@@ -116,7 +126,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { GetPostRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { GetPostRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: string = "string";
|
const id: string = "string";
|
||||||
|
|
||||||
const res = await sdk.posts.getPost(id);
|
const res = await sdk.posts.getPost(id);
|
||||||
@@ -157,7 +172,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { ListPostsRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { ListPostsRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const apiKey: string = "string";
|
const apiKey: string = "string";
|
||||||
const apiUsername: string = "string";
|
const apiUsername: string = "string";
|
||||||
const before: string = "string";
|
const before: string = "string";
|
||||||
@@ -202,7 +222,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { LockPostRequest, LockPostRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { LockPostRequest, LockPostRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const apiKey: string = "string";
|
const apiKey: string = "string";
|
||||||
const apiUsername: string = "string";
|
const apiUsername: string = "string";
|
||||||
const id: string = "string";
|
const id: string = "string";
|
||||||
@@ -251,7 +276,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { PerformPostActionRequest, PerformPostActionRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { PerformPostActionRequest, PerformPostActionRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const apiKey: string = "string";
|
const apiKey: string = "string";
|
||||||
const apiUsername: string = "string";
|
const apiUsername: string = "string";
|
||||||
const requestBody: PerformPostActionRequestBody = {
|
const requestBody: PerformPostActionRequestBody = {
|
||||||
@@ -299,7 +329,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { PostRepliesRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { PostRepliesRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: string = "string";
|
const id: string = "string";
|
||||||
|
|
||||||
const res = await sdk.posts.postReplies(id);
|
const res = await sdk.posts.postReplies(id);
|
||||||
@@ -340,7 +375,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { Post, UpdatePostRequest, UpdatePostRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { Post, UpdatePostRequest, UpdatePostRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: string = "string";
|
const id: string = "string";
|
||||||
const requestBody: UpdatePostRequestBody = {
|
const requestBody: UpdatePostRequestBody = {
|
||||||
post: {
|
post: {
|
||||||
|
|||||||
@@ -17,7 +17,12 @@ Creates a new topic, a new post, or a private message
|
|||||||
import { SDK } from "@lukehagar/discoursejs";
|
import { SDK } from "@lukehagar/discoursejs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const res = await sdk.privateMessages.createTopicPostPM({
|
const res = await sdk.privateMessages.createTopicPostPM({
|
||||||
archetype: "private_message",
|
archetype: "private_message",
|
||||||
@@ -61,7 +66,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { GetUserSentPrivateMessagesRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { GetUserSentPrivateMessagesRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const username: string = "string";
|
const username: string = "string";
|
||||||
|
|
||||||
const res = await sdk.privateMessages.getUserSentPrivateMessages(username);
|
const res = await sdk.privateMessages.getUserSentPrivateMessages(username);
|
||||||
@@ -102,7 +112,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { ListUserPrivateMessagesRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { ListUserPrivateMessagesRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const username: string = "string";
|
const username: string = "string";
|
||||||
|
|
||||||
const res = await sdk.privateMessages.listUserPrivateMessages(username);
|
const res = await sdk.privateMessages.listUserPrivateMessages(username);
|
||||||
|
|||||||
@@ -16,7 +16,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { SearchRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { SearchRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const page: number = 307631;
|
const page: number = 307631;
|
||||||
const q: string = "string";
|
const q: string = "string";
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,12 @@ Can be used to fetch all categories and subcategories
|
|||||||
import { SDK } from "@lukehagar/discoursejs";
|
import { SDK } from "@lukehagar/discoursejs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const res = await sdk.site.getSite();
|
const res = await sdk.site.getSite();
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,12 @@ Creates a tag group
|
|||||||
import { SDK } from "@lukehagar/discoursejs";
|
import { SDK } from "@lukehagar/discoursejs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const res = await sdk.tags.createTagGroup({
|
const res = await sdk.tags.createTagGroup({
|
||||||
name: "string",
|
name: "string",
|
||||||
@@ -62,7 +67,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { GetTagRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { GetTagRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const name: string = "string";
|
const name: string = "string";
|
||||||
|
|
||||||
const res = await sdk.tags.getTag(name);
|
const res = await sdk.tags.getTag(name);
|
||||||
@@ -103,7 +113,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { GetTagGroupRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { GetTagGroupRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: string = "string";
|
const id: string = "string";
|
||||||
|
|
||||||
const res = await sdk.tags.getTagGroup(id);
|
const res = await sdk.tags.getTagGroup(id);
|
||||||
@@ -143,7 +158,12 @@ Get a list of tag groups
|
|||||||
import { SDK } from "@lukehagar/discoursejs";
|
import { SDK } from "@lukehagar/discoursejs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const res = await sdk.tags.listTagGroups();
|
const res = await sdk.tags.listTagGroups();
|
||||||
|
|
||||||
@@ -181,7 +201,12 @@ Get a list of tags
|
|||||||
import { SDK } from "@lukehagar/discoursejs";
|
import { SDK } from "@lukehagar/discoursejs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const res = await sdk.tags.listTags();
|
const res = await sdk.tags.listTags();
|
||||||
|
|
||||||
@@ -220,7 +245,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { UpdateTagGroupRequest, UpdateTagGroupRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { UpdateTagGroupRequest, UpdateTagGroupRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: string = "string";
|
const id: string = "string";
|
||||||
const requestBody: UpdateTagGroupRequestBody = {};
|
const requestBody: UpdateTagGroupRequestBody = {};
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { BookmarkTopicRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { BookmarkTopicRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const apiKey: string = "string";
|
const apiKey: string = "string";
|
||||||
const apiUsername: string = "string";
|
const apiUsername: string = "string";
|
||||||
const id: string = "string";
|
const id: string = "string";
|
||||||
@@ -72,7 +77,12 @@ Creates a new topic, a new post, or a private message
|
|||||||
import { SDK } from "@lukehagar/discoursejs";
|
import { SDK } from "@lukehagar/discoursejs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const res = await sdk.topics.createTopicPostPM({
|
const res = await sdk.topics.createTopicPostPM({
|
||||||
archetype: "private_message",
|
archetype: "private_message",
|
||||||
@@ -116,7 +126,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { CreateTopicTimerRequest, CreateTopicTimerRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { CreateTopicTimerRequest, CreateTopicTimerRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const apiKey: string = "string";
|
const apiKey: string = "string";
|
||||||
const apiUsername: string = "string";
|
const apiUsername: string = "string";
|
||||||
const id: string = "string";
|
const id: string = "string";
|
||||||
@@ -165,7 +180,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { GetTopicRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { GetTopicRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const apiKey: string = "string";
|
const apiKey: string = "string";
|
||||||
const apiUsername: string = "string";
|
const apiUsername: string = "string";
|
||||||
const id: string = "string";
|
const id: string = "string";
|
||||||
@@ -210,7 +230,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { GetTopicByExternalIdRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { GetTopicByExternalIdRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const externalId: string = "string";
|
const externalId: string = "string";
|
||||||
|
|
||||||
const res = await sdk.topics.getTopicByExternalId(externalId);
|
const res = await sdk.topics.getTopicByExternalId(externalId);
|
||||||
@@ -251,7 +276,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { InviteToTopicRequest, InviteToTopicRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { InviteToTopicRequest, InviteToTopicRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const apiKey: string = "string";
|
const apiKey: string = "string";
|
||||||
const apiUsername: string = "string";
|
const apiUsername: string = "string";
|
||||||
const id: string = "string";
|
const id: string = "string";
|
||||||
@@ -298,7 +328,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { ListLatestTopicsRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { ListLatestTopicsRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const apiKey: string = "string";
|
const apiKey: string = "string";
|
||||||
const apiUsername: string = "string";
|
const apiUsername: string = "string";
|
||||||
const ascending: string = "string";
|
const ascending: string = "string";
|
||||||
@@ -345,7 +380,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { ListTopTopicsRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { ListTopTopicsRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const apiKey: string = "string";
|
const apiKey: string = "string";
|
||||||
const apiUsername: string = "string";
|
const apiUsername: string = "string";
|
||||||
const period: string = "string";
|
const period: string = "string";
|
||||||
@@ -390,7 +430,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { RemoveTopicRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { RemoveTopicRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const apiKey: string = "string";
|
const apiKey: string = "string";
|
||||||
const apiUsername: string = "string";
|
const apiUsername: string = "string";
|
||||||
const id: string = "string";
|
const id: string = "string";
|
||||||
@@ -435,7 +480,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { NotificationLevel, SetNotificationLevelRequest, SetNotificationLevelRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { NotificationLevel, SetNotificationLevelRequest, SetNotificationLevelRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const apiKey: string = "string";
|
const apiKey: string = "string";
|
||||||
const apiUsername: string = "string";
|
const apiUsername: string = "string";
|
||||||
const id: string = "string";
|
const id: string = "string";
|
||||||
@@ -484,7 +534,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { Topic, UpdateTopicRequest, UpdateTopicRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { Topic, UpdateTopicRequest, UpdateTopicRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const apiKey: string = "string";
|
const apiKey: string = "string";
|
||||||
const apiUsername: string = "string";
|
const apiUsername: string = "string";
|
||||||
const id: string = "string";
|
const id: string = "string";
|
||||||
@@ -533,7 +588,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { Enabled, Status, UpdateTopicStatusRequest, UpdateTopicStatusRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { Enabled, Status, UpdateTopicStatusRequest, UpdateTopicStatusRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const apiKey: string = "string";
|
const apiKey: string = "string";
|
||||||
const apiUsername: string = "string";
|
const apiUsername: string = "string";
|
||||||
const id: string = "string";
|
const id: string = "string";
|
||||||
@@ -584,7 +644,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { UpdateTopicTimestampRequest, UpdateTopicTimestampRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { UpdateTopicTimestampRequest, UpdateTopicTimestampRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const apiKey: string = "string";
|
const apiKey: string = "string";
|
||||||
const apiUsername: string = "string";
|
const apiUsername: string = "string";
|
||||||
const id: string = "string";
|
const id: string = "string";
|
||||||
|
|||||||
@@ -33,7 +33,12 @@ be set to true for this endpoint to function.
|
|||||||
import { SDK } from "@lukehagar/discoursejs";
|
import { SDK } from "@lukehagar/discoursejs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const res = await sdk.uploads.abortMultipart({
|
const res = await sdk.uploads.abortMultipart({
|
||||||
externalUploadIdentifier: "84x83tmxy398t3y._Q_z8CoJYVr69bE6D7f8J6Oo0434QquLFoYdGVerWFx9X5HDEI_TP_95c34n853495x35345394.d.ghQ",
|
externalUploadIdentifier: "84x83tmxy398t3y._Q_z8CoJYVr69bE6D7f8J6Oo0434QquLFoYdGVerWFx9X5HDEI_TP_95c34n853495x35345394.d.ghQ",
|
||||||
@@ -95,7 +100,12 @@ be set to true for this endpoint to function.
|
|||||||
import { SDK } from "@lukehagar/discoursejs";
|
import { SDK } from "@lukehagar/discoursejs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const res = await sdk.uploads.batchPresignMultipartParts({
|
const res = await sdk.uploads.batchPresignMultipartParts({
|
||||||
partNumbers: [
|
partNumbers: [
|
||||||
@@ -158,7 +168,12 @@ be set to true for this endpoint to function.
|
|||||||
import { SDK } from "@lukehagar/discoursejs";
|
import { SDK } from "@lukehagar/discoursejs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const res = await sdk.uploads.completeExternalUpload({
|
const res = await sdk.uploads.completeExternalUpload({
|
||||||
forPrivateMessage: "true",
|
forPrivateMessage: "true",
|
||||||
@@ -216,7 +231,12 @@ be set to true for this endpoint to function.
|
|||||||
import { SDK } from "@lukehagar/discoursejs";
|
import { SDK } from "@lukehagar/discoursejs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const res = await sdk.uploads.completeMultipart({
|
const res = await sdk.uploads.completeMultipart({
|
||||||
parts: [
|
parts: [
|
||||||
@@ -273,7 +293,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { UploadType } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { UploadType } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const res = await sdk.uploads.createMultipartUpload({
|
const res = await sdk.uploads.createMultipartUpload({
|
||||||
fileName: "IMG_2021.jpeg",
|
fileName: "IMG_2021.jpeg",
|
||||||
@@ -318,7 +343,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { TypeT } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { TypeT } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const res = await sdk.uploads.createUpload({
|
const res = await sdk.uploads.createUpload({
|
||||||
file: {
|
file: {
|
||||||
@@ -384,7 +414,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { GeneratePresignedPutType } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { GeneratePresignedPutType } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const res = await sdk.uploads.generatePresignedPut({
|
const res = await sdk.uploads.generatePresignedPut({
|
||||||
fileName: "IMG_2021.jpeg",
|
fileName: "IMG_2021.jpeg",
|
||||||
|
|||||||
@@ -39,7 +39,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { ActivateUserRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { ActivateUserRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: number = 203554;
|
const id: number = 203554;
|
||||||
|
|
||||||
const res = await sdk.users.activateUser(id);
|
const res = await sdk.users.activateUser(id);
|
||||||
@@ -80,7 +85,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { AdminGetUserRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { AdminGetUserRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: number = 386776;
|
const id: number = 386776;
|
||||||
|
|
||||||
const res = await sdk.users.adminGetUser(id);
|
const res = await sdk.users.adminGetUser(id);
|
||||||
@@ -121,7 +131,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { Flag, QueryParamAsc, QueryParamOrder } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { Flag, QueryParamAsc, QueryParamOrder } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const res = await sdk.users.adminListUsers({
|
const res = await sdk.users.adminListUsers({
|
||||||
flag: Flag.New,
|
flag: Flag.New,
|
||||||
@@ -163,7 +178,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { AnonymizeUserRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { AnonymizeUserRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: number = 418778;
|
const id: number = 418778;
|
||||||
|
|
||||||
const res = await sdk.users.anonymizeUser(id);
|
const res = await sdk.users.anonymizeUser(id);
|
||||||
@@ -204,7 +224,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { ChangePasswordRequest, ChangePasswordRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { ChangePasswordRequest, ChangePasswordRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const token: string = "string";
|
const token: string = "string";
|
||||||
const requestBody: ChangePasswordRequestBody = {
|
const requestBody: ChangePasswordRequestBody = {
|
||||||
password: "Gm1zHM7WngzsMbv",
|
password: "Gm1zHM7WngzsMbv",
|
||||||
@@ -250,7 +275,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { CreateUserRequest, CreateUserRequestBody, ExternalIds } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { CreateUserRequest, CreateUserRequestBody, ExternalIds } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const apiKey: string = "string";
|
const apiKey: string = "string";
|
||||||
const apiUsername: string = "string";
|
const apiUsername: string = "string";
|
||||||
const requestBody: CreateUserRequestBody = {
|
const requestBody: CreateUserRequestBody = {
|
||||||
@@ -301,7 +331,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { DeactivateUserRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { DeactivateUserRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: number = 143950;
|
const id: number = 143950;
|
||||||
|
|
||||||
const res = await sdk.users.deactivateUser(id);
|
const res = await sdk.users.deactivateUser(id);
|
||||||
@@ -342,7 +377,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { DeleteUserRequest, DeleteUserRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { DeleteUserRequest, DeleteUserRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: number = 251343;
|
const id: number = 251343;
|
||||||
const requestBody: DeleteUserRequestBody = {};
|
const requestBody: DeleteUserRequestBody = {};
|
||||||
|
|
||||||
@@ -385,7 +425,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { GetUserRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { GetUserRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const apiKey: string = "string";
|
const apiKey: string = "string";
|
||||||
const apiUsername: string = "string";
|
const apiUsername: string = "string";
|
||||||
const username: string = "string";
|
const username: string = "string";
|
||||||
@@ -430,7 +475,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { GetUserEmailsRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { GetUserEmailsRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const username: string = "string";
|
const username: string = "string";
|
||||||
|
|
||||||
const res = await sdk.users.getUserEmails(username);
|
const res = await sdk.users.getUserEmails(username);
|
||||||
@@ -471,7 +521,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { GetUserExternalIdRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { GetUserExternalIdRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const apiKey: string = "string";
|
const apiKey: string = "string";
|
||||||
const apiUsername: string = "string";
|
const apiUsername: string = "string";
|
||||||
const externalId: string = "string";
|
const externalId: string = "string";
|
||||||
@@ -516,7 +571,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { GetUserIdentiyProviderExternalIdRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { GetUserIdentiyProviderExternalIdRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const apiKey: string = "string";
|
const apiKey: string = "string";
|
||||||
const apiUsername: string = "string";
|
const apiUsername: string = "string";
|
||||||
const externalId: string = "string";
|
const externalId: string = "string";
|
||||||
@@ -563,7 +623,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { ListUserActionsRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { ListUserActionsRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const filter: string = "string";
|
const filter: string = "string";
|
||||||
const offset: number = 620550;
|
const offset: number = 620550;
|
||||||
const username: string = "string";
|
const username: string = "string";
|
||||||
@@ -608,7 +673,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { ListUserBadgesRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { ListUserBadgesRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const username: string = "string";
|
const username: string = "string";
|
||||||
|
|
||||||
const res = await sdk.users.listUserBadges(username);
|
const res = await sdk.users.listUserBadges(username);
|
||||||
@@ -649,7 +719,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { Asc, ListUsersPublicRequest, Order, Period } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { Asc, ListUsersPublicRequest, Order, Period } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const order: Order = Order.TopicCount;
|
const order: Order = Order.TopicCount;
|
||||||
const period: Period = Period.Monthly;
|
const period: Period = Period.Monthly;
|
||||||
const asc: Asc = Asc.True;
|
const asc: Asc = Asc.True;
|
||||||
@@ -696,7 +771,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { LogOutUserRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { LogOutUserRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: number = 379568;
|
const id: number = 379568;
|
||||||
|
|
||||||
const res = await sdk.users.logOutUser(id);
|
const res = await sdk.users.logOutUser(id);
|
||||||
@@ -737,7 +817,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { RefreshGravatarRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { RefreshGravatarRequest } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const username: string = "string";
|
const username: string = "string";
|
||||||
|
|
||||||
const res = await sdk.users.refreshGravatar(username);
|
const res = await sdk.users.refreshGravatar(username);
|
||||||
@@ -777,7 +862,12 @@ Send password reset email
|
|||||||
import { SDK } from "@lukehagar/discoursejs";
|
import { SDK } from "@lukehagar/discoursejs";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const res = await sdk.users.sendPasswordResetEmail({
|
const res = await sdk.users.sendPasswordResetEmail({
|
||||||
login: "string",
|
login: "string",
|
||||||
@@ -819,7 +909,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { SilenceUserRequest, SilenceUserRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { SilenceUserRequest, SilenceUserRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: number = 606247;
|
const id: number = 606247;
|
||||||
const requestBody: SilenceUserRequestBody = {
|
const requestBody: SilenceUserRequestBody = {
|
||||||
postAction: "delete",
|
postAction: "delete",
|
||||||
@@ -865,7 +960,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { SuspendUserRequest, SuspendUserRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { SuspendUserRequest, SuspendUserRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const id: number = 970832;
|
const id: number = 970832;
|
||||||
const requestBody: SuspendUserRequestBody = {
|
const requestBody: SuspendUserRequestBody = {
|
||||||
postAction: "delete",
|
postAction: "delete",
|
||||||
@@ -912,7 +1012,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { UpdateAvatarRequest, UpdateAvatarRequestBody, UpdateAvatarType } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { UpdateAvatarRequest, UpdateAvatarRequestBody, UpdateAvatarType } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const username: string = "string";
|
const username: string = "string";
|
||||||
const requestBody: UpdateAvatarRequestBody = {
|
const requestBody: UpdateAvatarRequestBody = {
|
||||||
type: UpdateAvatarType.Gravatar,
|
type: UpdateAvatarType.Gravatar,
|
||||||
@@ -958,7 +1063,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { UpdateEmailRequest, UpdateEmailRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { UpdateEmailRequest, UpdateEmailRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const username: string = "string";
|
const username: string = "string";
|
||||||
const requestBody: UpdateEmailRequestBody = {
|
const requestBody: UpdateEmailRequestBody = {
|
||||||
email: "Jodie.Reichel79@yahoo.com",
|
email: "Jodie.Reichel79@yahoo.com",
|
||||||
@@ -1003,7 +1113,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { UpdateUserExternalIds, UpdateUserRequest, UpdateUserRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { UpdateUserExternalIds, UpdateUserRequest, UpdateUserRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const apiKey: string = "string";
|
const apiKey: string = "string";
|
||||||
const apiUsername: string = "string";
|
const apiUsername: string = "string";
|
||||||
const username: string = "string";
|
const username: string = "string";
|
||||||
@@ -1052,7 +1167,12 @@ import { SDK } from "@lukehagar/discoursejs";
|
|||||||
import { UpdateUsernameRequest, UpdateUsernameRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
import { UpdateUsernameRequest, UpdateUsernameRequestBody } from "@lukehagar/discoursejs/dist/sdk/models/operations";
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
const sdk = new SDK();
|
const sdk = new SDK({
|
||||||
|
security: {
|
||||||
|
key: "<YOUR_API_KEY_HERE>",
|
||||||
|
username: "<YOUR_API_KEY_HERE>",
|
||||||
|
},
|
||||||
|
});
|
||||||
const username: string = "string";
|
const username: string = "string";
|
||||||
const requestBody: UpdateUsernameRequestBody = {
|
const requestBody: UpdateUsernameRequestBody = {
|
||||||
newUsername: "string",
|
newUsername: "string",
|
||||||
|
|||||||
2
gen.yaml
2
gen.yaml
@@ -7,7 +7,7 @@ generation:
|
|||||||
fixes:
|
fixes:
|
||||||
nameResolutionDec2023: false
|
nameResolutionDec2023: false
|
||||||
typescript:
|
typescript:
|
||||||
version: 0.2.2
|
version: 0.3.0
|
||||||
author: LukeHagar
|
author: LukeHagar
|
||||||
clientServerStatusCodesAsErrors: false
|
clientServerStatusCodesAsErrors: false
|
||||||
flattenGlobalSecurity: true
|
flattenGlobalSecurity: true
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@lukehagar/discoursejs",
|
"name": "@lukehagar/discoursejs",
|
||||||
"version": "0.2.2",
|
"version": "0.3.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@lukehagar/discoursejs",
|
"name": "@lukehagar/discoursejs",
|
||||||
"version": "0.2.2",
|
"version": "0.3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^1.1.3",
|
"axios": "^1.1.3",
|
||||||
"class-transformer": "^0.5.1",
|
"class-transformer": "^0.5.1",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@lukehagar/discoursejs",
|
"name": "@lukehagar/discoursejs",
|
||||||
"version": "0.2.2",
|
"version": "0.3.0",
|
||||||
"author": "LukeHagar",
|
"author": "LukeHagar",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "tsc --build",
|
"prepare": "tsc --build",
|
||||||
|
|||||||
113
src/sdk/admin.ts
113
src/sdk/admin.ts
@@ -5,6 +5,7 @@
|
|||||||
import * as utils from "../internal/utils";
|
import * as utils from "../internal/utils";
|
||||||
import * as errors from "../sdk/models/errors";
|
import * as errors from "../sdk/models/errors";
|
||||||
import * as operations from "../sdk/models/operations";
|
import * as operations from "../sdk/models/operations";
|
||||||
|
import * as shared from "../sdk/models/shared";
|
||||||
import { SDKConfiguration } from "./sdk";
|
import { SDKConfiguration } from "./sdk";
|
||||||
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios";
|
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios";
|
||||||
|
|
||||||
@@ -35,7 +36,15 @@ export class Admin {
|
|||||||
req
|
req
|
||||||
);
|
);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -98,7 +107,15 @@ export class Admin {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = utils.generateURL(baseURL, "/admin/users/{id}.json", req);
|
const operationUrl: string = utils.generateURL(baseURL, "/admin/users/{id}.json", req);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -166,7 +183,15 @@ export class Admin {
|
|||||||
req
|
req
|
||||||
);
|
);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
const queryParams: string = utils.serializeQueryParams(req);
|
const queryParams: string = utils.serializeQueryParams(req);
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
@@ -237,7 +262,15 @@ export class Admin {
|
|||||||
req
|
req
|
||||||
);
|
);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -304,7 +337,15 @@ export class Admin {
|
|||||||
req
|
req
|
||||||
);
|
);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -379,7 +420,19 @@ export class Admin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -447,7 +500,15 @@ export class Admin {
|
|||||||
req
|
req
|
||||||
);
|
);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -514,7 +575,15 @@ export class Admin {
|
|||||||
req
|
req
|
||||||
);
|
);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -593,7 +662,19 @@ export class Admin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -673,7 +754,19 @@ export class Admin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import * as utils from "../internal/utils";
|
import * as utils from "../internal/utils";
|
||||||
import * as errors from "../sdk/models/errors";
|
import * as errors from "../sdk/models/errors";
|
||||||
import * as operations from "../sdk/models/operations";
|
import * as operations from "../sdk/models/operations";
|
||||||
|
import * as shared from "../sdk/models/shared";
|
||||||
import { SDKConfiguration } from "./sdk";
|
import { SDKConfiguration } from "./sdk";
|
||||||
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios";
|
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios";
|
||||||
|
|
||||||
@@ -42,7 +43,19 @@ export class Backups {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -108,7 +121,15 @@ export class Backups {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = utils.generateURL(baseURL, "/admin/backups/{filename}", req);
|
const operationUrl: string = utils.generateURL(baseURL, "/admin/backups/{filename}", req);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
const queryParams: string = utils.serializeQueryParams(req);
|
const queryParams: string = utils.serializeQueryParams(req);
|
||||||
headers["Accept"] = "*/*";
|
headers["Accept"] = "*/*";
|
||||||
|
|
||||||
@@ -152,7 +173,15 @@ export class Backups {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = baseURL.replace(/\/$/, "") + "/admin/backups.json";
|
const operationUrl: string = baseURL.replace(/\/$/, "") + "/admin/backups.json";
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -218,7 +247,15 @@ export class Backups {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = utils.generateURL(baseURL, "/admin/backups/{filename}", req);
|
const operationUrl: string = utils.generateURL(baseURL, "/admin/backups/{filename}", req);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "*/*";
|
headers["Accept"] = "*/*";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import * as utils from "../internal/utils";
|
import * as utils from "../internal/utils";
|
||||||
import * as errors from "../sdk/models/errors";
|
import * as errors from "../sdk/models/errors";
|
||||||
import * as operations from "../sdk/models/operations";
|
import * as operations from "../sdk/models/operations";
|
||||||
|
import * as shared from "../sdk/models/shared";
|
||||||
import { SDKConfiguration } from "./sdk";
|
import { SDKConfiguration } from "./sdk";
|
||||||
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios";
|
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios";
|
||||||
|
|
||||||
@@ -27,7 +28,15 @@ export class Badges {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = baseURL.replace(/\/$/, "") + "/admin/badges.json";
|
const operationUrl: string = baseURL.replace(/\/$/, "") + "/admin/badges.json";
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -101,7 +110,19 @@ export class Badges {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -165,7 +186,15 @@ export class Badges {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = utils.generateURL(baseURL, "/admin/badges/{id}.json", req);
|
const operationUrl: string = utils.generateURL(baseURL, "/admin/badges/{id}.json", req);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "*/*";
|
headers["Accept"] = "*/*";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -218,7 +247,15 @@ export class Badges {
|
|||||||
req
|
req
|
||||||
);
|
);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -293,7 +330,19 @@ export class Badges {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import * as utils from "../internal/utils";
|
import * as utils from "../internal/utils";
|
||||||
import * as errors from "../sdk/models/errors";
|
import * as errors from "../sdk/models/errors";
|
||||||
import * as operations from "../sdk/models/operations";
|
import * as operations from "../sdk/models/operations";
|
||||||
|
import * as shared from "../sdk/models/shared";
|
||||||
import { SDKConfiguration } from "./sdk";
|
import { SDKConfiguration } from "./sdk";
|
||||||
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios";
|
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios";
|
||||||
|
|
||||||
@@ -42,7 +43,19 @@ export class Categories {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -106,7 +119,15 @@ export class Categories {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = utils.generateURL(baseURL, "/c/{id}/show.json", req);
|
const operationUrl: string = utils.generateURL(baseURL, "/c/{id}/show.json", req);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -166,7 +187,15 @@ export class Categories {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = baseURL.replace(/\/$/, "") + "/site.json";
|
const operationUrl: string = baseURL.replace(/\/$/, "") + "/site.json";
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -229,7 +258,15 @@ export class Categories {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = baseURL.replace(/\/$/, "") + "/categories.json";
|
const operationUrl: string = baseURL.replace(/\/$/, "") + "/categories.json";
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
const queryParams: string = utils.serializeQueryParams(req);
|
const queryParams: string = utils.serializeQueryParams(req);
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
@@ -295,7 +332,15 @@ export class Categories {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = utils.generateURL(baseURL, "/c/{slug}/{id}.json", req);
|
const operationUrl: string = utils.generateURL(baseURL, "/c/{slug}/{id}.json", req);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -371,7 +416,19 @@ export class Categories {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import * as utils from "../internal/utils";
|
import * as utils from "../internal/utils";
|
||||||
import * as errors from "../sdk/models/errors";
|
import * as errors from "../sdk/models/errors";
|
||||||
import * as operations from "../sdk/models/operations";
|
import * as operations from "../sdk/models/operations";
|
||||||
|
import * as shared from "../sdk/models/shared";
|
||||||
import { SDKConfiguration } from "./sdk";
|
import { SDKConfiguration } from "./sdk";
|
||||||
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios";
|
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios";
|
||||||
|
|
||||||
@@ -43,7 +44,19 @@ export class Groups {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -118,7 +131,19 @@ export class Groups {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -182,7 +207,15 @@ export class Groups {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = utils.generateURL(baseURL, "/admin/groups/{id}.json", req);
|
const operationUrl: string = utils.generateURL(baseURL, "/admin/groups/{id}.json", req);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -242,7 +275,15 @@ export class Groups {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = utils.generateURL(baseURL, "/groups/{id}.json", req);
|
const operationUrl: string = utils.generateURL(baseURL, "/groups/{id}.json", req);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -305,7 +346,15 @@ export class Groups {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = utils.generateURL(baseURL, "/groups/{id}/members.json", req);
|
const operationUrl: string = utils.generateURL(baseURL, "/groups/{id}/members.json", req);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -362,7 +411,15 @@ export class Groups {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = baseURL.replace(/\/$/, "") + "/groups.json";
|
const operationUrl: string = baseURL.replace(/\/$/, "") + "/groups.json";
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -437,7 +494,19 @@ export class Groups {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -514,7 +583,19 @@ export class Groups {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import * as utils from "../internal/utils";
|
import * as utils from "../internal/utils";
|
||||||
import * as errors from "../sdk/models/errors";
|
import * as errors from "../sdk/models/errors";
|
||||||
import * as operations from "../sdk/models/operations";
|
import * as operations from "../sdk/models/operations";
|
||||||
|
import * as shared from "../sdk/models/shared";
|
||||||
import { SDKConfiguration } from "./sdk";
|
import { SDKConfiguration } from "./sdk";
|
||||||
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios";
|
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios";
|
||||||
|
|
||||||
@@ -45,10 +46,19 @@ export class Invites {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
const headers: RawAxiosRequestHeaders = {
|
const headers: RawAxiosRequestHeaders = {
|
||||||
...utils.getHeadersFromRequest(req),
|
...utils.getHeadersFromRequest(req),
|
||||||
...reqBodyHeaders,
|
...reqBodyHeaders,
|
||||||
...config?.headers,
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
};
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
@@ -129,10 +139,19 @@ export class Invites {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
const headers: RawAxiosRequestHeaders = {
|
const headers: RawAxiosRequestHeaders = {
|
||||||
...utils.getHeadersFromRequest(req),
|
...utils.getHeadersFromRequest(req),
|
||||||
...reqBodyHeaders,
|
...reqBodyHeaders,
|
||||||
...config?.headers,
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
};
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
|
|||||||
5
src/sdk/models/shared/index.ts
Normal file
5
src/sdk/models/shared/index.ts
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
/*
|
||||||
|
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
*/
|
||||||
|
|
||||||
|
export * from "./security";
|
||||||
15
src/sdk/models/shared/security.ts
Normal file
15
src/sdk/models/shared/security.ts
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
/*
|
||||||
|
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils";
|
||||||
|
|
||||||
|
export class Security extends SpeakeasyBase {
|
||||||
|
@SpeakeasyMetadata({ data: "security, scheme=true;type=apiKey;subtype=header;name=Api-Key" })
|
||||||
|
key: string;
|
||||||
|
|
||||||
|
@SpeakeasyMetadata({
|
||||||
|
data: "security, scheme=true;type=apiKey;subtype=header;name=Api-Username",
|
||||||
|
})
|
||||||
|
username: string;
|
||||||
|
}
|
||||||
@@ -5,6 +5,7 @@
|
|||||||
import * as utils from "../internal/utils";
|
import * as utils from "../internal/utils";
|
||||||
import * as errors from "../sdk/models/errors";
|
import * as errors from "../sdk/models/errors";
|
||||||
import * as operations from "../sdk/models/operations";
|
import * as operations from "../sdk/models/operations";
|
||||||
|
import * as shared from "../sdk/models/shared";
|
||||||
import { SDKConfiguration } from "./sdk";
|
import { SDKConfiguration } from "./sdk";
|
||||||
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios";
|
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios";
|
||||||
|
|
||||||
@@ -27,7 +28,15 @@ export class Notifications {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = baseURL.replace(/\/$/, "") + "/notifications.json";
|
const operationUrl: string = baseURL.replace(/\/$/, "") + "/notifications.json";
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -101,7 +110,19 @@ export class Notifications {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import * as utils from "../internal/utils";
|
import * as utils from "../internal/utils";
|
||||||
import * as errors from "../sdk/models/errors";
|
import * as errors from "../sdk/models/errors";
|
||||||
import * as operations from "../sdk/models/operations";
|
import * as operations from "../sdk/models/operations";
|
||||||
|
import * as shared from "../sdk/models/shared";
|
||||||
import { SDKConfiguration } from "./sdk";
|
import { SDKConfiguration } from "./sdk";
|
||||||
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios";
|
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios";
|
||||||
|
|
||||||
@@ -42,7 +43,19 @@ export class Posts {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -118,7 +131,19 @@ export class Posts {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "*/*";
|
headers["Accept"] = "*/*";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -173,7 +198,15 @@ export class Posts {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = utils.generateURL(baseURL, "/posts/{id}.json", req);
|
const operationUrl: string = utils.generateURL(baseURL, "/posts/{id}.json", req);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -237,9 +270,18 @@ export class Posts {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = baseURL.replace(/\/$/, "") + "/posts.json";
|
const operationUrl: string = baseURL.replace(/\/$/, "") + "/posts.json";
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
const headers: RawAxiosRequestHeaders = {
|
const headers: RawAxiosRequestHeaders = {
|
||||||
...utils.getHeadersFromRequest(req),
|
...utils.getHeadersFromRequest(req),
|
||||||
...config?.headers,
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
};
|
};
|
||||||
const queryParams: string = utils.serializeQueryParams(req);
|
const queryParams: string = utils.serializeQueryParams(req);
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
@@ -320,10 +362,19 @@ export class Posts {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
const headers: RawAxiosRequestHeaders = {
|
const headers: RawAxiosRequestHeaders = {
|
||||||
...utils.getHeadersFromRequest(req),
|
...utils.getHeadersFromRequest(req),
|
||||||
...reqBodyHeaders,
|
...reqBodyHeaders,
|
||||||
...config?.headers,
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
};
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
@@ -402,10 +453,19 @@ export class Posts {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
const headers: RawAxiosRequestHeaders = {
|
const headers: RawAxiosRequestHeaders = {
|
||||||
...utils.getHeadersFromRequest(req),
|
...utils.getHeadersFromRequest(req),
|
||||||
...reqBodyHeaders,
|
...reqBodyHeaders,
|
||||||
...config?.headers,
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
};
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
@@ -470,7 +530,15 @@ export class Posts {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = utils.generateURL(baseURL, "/posts/{id}/replies.json", req);
|
const operationUrl: string = utils.generateURL(baseURL, "/posts/{id}/replies.json", req);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -548,7 +616,19 @@ export class Posts {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import * as utils from "../internal/utils";
|
import * as utils from "../internal/utils";
|
||||||
import * as errors from "../sdk/models/errors";
|
import * as errors from "../sdk/models/errors";
|
||||||
import * as operations from "../sdk/models/operations";
|
import * as operations from "../sdk/models/operations";
|
||||||
|
import * as shared from "../sdk/models/shared";
|
||||||
import { SDKConfiguration } from "./sdk";
|
import { SDKConfiguration } from "./sdk";
|
||||||
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios";
|
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios";
|
||||||
|
|
||||||
@@ -42,7 +43,19 @@ export class PrivateMessages {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -110,7 +123,15 @@ export class PrivateMessages {
|
|||||||
req
|
req
|
||||||
);
|
);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -178,7 +199,15 @@ export class PrivateMessages {
|
|||||||
req
|
req
|
||||||
);
|
);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import * as utils from "../internal/utils";
|
import * as utils from "../internal/utils";
|
||||||
|
import * as shared from "../sdk/models/shared";
|
||||||
import { Admin } from "./admin";
|
import { Admin } from "./admin";
|
||||||
import { Backups } from "./backups";
|
import { Backups } from "./backups";
|
||||||
import { Badges } from "./badges";
|
import { Badges } from "./badges";
|
||||||
@@ -30,6 +31,11 @@ export const ServerList = ["https://{defaultHost}"] as const;
|
|||||||
* The available configuration options for the SDK
|
* The available configuration options for the SDK
|
||||||
*/
|
*/
|
||||||
export type SDKProps = {
|
export type SDKProps = {
|
||||||
|
/**
|
||||||
|
* The security details required to authenticate the SDK
|
||||||
|
*/
|
||||||
|
security?: shared.Security | (() => Promise<shared.Security>);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allows overriding the default axios client used by the SDK
|
* Allows overriding the default axios client used by the SDK
|
||||||
*/
|
*/
|
||||||
@@ -57,13 +63,14 @@ export type SDKProps = {
|
|||||||
|
|
||||||
export class SDKConfiguration {
|
export class SDKConfiguration {
|
||||||
defaultClient: AxiosInstance;
|
defaultClient: AxiosInstance;
|
||||||
|
security?: shared.Security | (() => Promise<shared.Security>);
|
||||||
serverURL: string;
|
serverURL: string;
|
||||||
serverDefaults: any;
|
serverDefaults: any;
|
||||||
language = "typescript";
|
language = "typescript";
|
||||||
openapiDocVersion = "latest";
|
openapiDocVersion = "latest";
|
||||||
sdkVersion = "0.2.2";
|
sdkVersion = "0.3.0";
|
||||||
genVersion = "2.237.2";
|
genVersion = "2.237.2";
|
||||||
userAgent = "speakeasy-sdk/typescript 0.2.2 2.237.2 latest @lukehagar/discoursejs";
|
userAgent = "speakeasy-sdk/typescript 0.3.0 2.237.2 latest @lukehagar/discoursejs";
|
||||||
retryConfig?: utils.RetryConfig;
|
retryConfig?: utils.RetryConfig;
|
||||||
public constructor(init?: Partial<SDKConfiguration>) {
|
public constructor(init?: Partial<SDKConfiguration>) {
|
||||||
Object.assign(this, init);
|
Object.assign(this, init);
|
||||||
@@ -169,6 +176,7 @@ export class SDK {
|
|||||||
const defaultClient = props?.defaultClient ?? axios.create();
|
const defaultClient = props?.defaultClient ?? axios.create();
|
||||||
this.sdkConfiguration = new SDKConfiguration({
|
this.sdkConfiguration = new SDKConfiguration({
|
||||||
defaultClient: defaultClient,
|
defaultClient: defaultClient,
|
||||||
|
security: props?.security,
|
||||||
serverURL: serverURL,
|
serverURL: serverURL,
|
||||||
serverDefaults: defaults,
|
serverDefaults: defaults,
|
||||||
retryConfig: props?.retryConfig,
|
retryConfig: props?.retryConfig,
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import * as utils from "../internal/utils";
|
import * as utils from "../internal/utils";
|
||||||
import * as errors from "../sdk/models/errors";
|
import * as errors from "../sdk/models/errors";
|
||||||
import * as operations from "../sdk/models/operations";
|
import * as operations from "../sdk/models/operations";
|
||||||
|
import * as shared from "../sdk/models/shared";
|
||||||
import { SDKConfiguration } from "./sdk";
|
import { SDKConfiguration } from "./sdk";
|
||||||
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios";
|
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios";
|
||||||
|
|
||||||
@@ -33,7 +34,15 @@ export class Search {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = baseURL.replace(/\/$/, "") + "/search.json";
|
const operationUrl: string = baseURL.replace(/\/$/, "") + "/search.json";
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
const queryParams: string = utils.serializeQueryParams(req);
|
const queryParams: string = utils.serializeQueryParams(req);
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import * as utils from "../internal/utils";
|
import * as utils from "../internal/utils";
|
||||||
import * as errors from "../sdk/models/errors";
|
import * as errors from "../sdk/models/errors";
|
||||||
import * as operations from "../sdk/models/operations";
|
import * as operations from "../sdk/models/operations";
|
||||||
|
import * as shared from "../sdk/models/shared";
|
||||||
import { SDKConfiguration } from "./sdk";
|
import { SDKConfiguration } from "./sdk";
|
||||||
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios";
|
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios";
|
||||||
|
|
||||||
@@ -28,7 +29,15 @@ export class Site {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = baseURL.replace(/\/$/, "") + "/site.json";
|
const operationUrl: string = baseURL.replace(/\/$/, "") + "/site.json";
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import * as utils from "../internal/utils";
|
import * as utils from "../internal/utils";
|
||||||
import * as errors from "../sdk/models/errors";
|
import * as errors from "../sdk/models/errors";
|
||||||
import * as operations from "../sdk/models/operations";
|
import * as operations from "../sdk/models/operations";
|
||||||
|
import * as shared from "../sdk/models/shared";
|
||||||
import { SDKConfiguration } from "./sdk";
|
import { SDKConfiguration } from "./sdk";
|
||||||
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios";
|
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios";
|
||||||
|
|
||||||
@@ -42,7 +43,19 @@ export class Tags {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -103,7 +116,15 @@ export class Tags {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = utils.generateURL(baseURL, "/tag/{name}.json", req);
|
const operationUrl: string = utils.generateURL(baseURL, "/tag/{name}.json", req);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -166,7 +187,15 @@ export class Tags {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = utils.generateURL(baseURL, "/tag_groups/{id}.json", req);
|
const operationUrl: string = utils.generateURL(baseURL, "/tag_groups/{id}.json", req);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -223,7 +252,15 @@ export class Tags {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = baseURL.replace(/\/$/, "") + "/tag_groups.json";
|
const operationUrl: string = baseURL.replace(/\/$/, "") + "/tag_groups.json";
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -280,7 +317,15 @@ export class Tags {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = baseURL.replace(/\/$/, "") + "/tags.json";
|
const operationUrl: string = baseURL.replace(/\/$/, "") + "/tags.json";
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -355,7 +400,19 @@ export class Tags {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import * as utils from "../internal/utils";
|
import * as utils from "../internal/utils";
|
||||||
import * as errors from "../sdk/models/errors";
|
import * as errors from "../sdk/models/errors";
|
||||||
import * as operations from "../sdk/models/operations";
|
import * as operations from "../sdk/models/operations";
|
||||||
|
import * as shared from "../sdk/models/shared";
|
||||||
import { SDKConfiguration } from "./sdk";
|
import { SDKConfiguration } from "./sdk";
|
||||||
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios";
|
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios";
|
||||||
|
|
||||||
@@ -35,9 +36,18 @@ export class Topics {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = utils.generateURL(baseURL, "/t/{id}/bookmark.json", req);
|
const operationUrl: string = utils.generateURL(baseURL, "/t/{id}/bookmark.json", req);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
const headers: RawAxiosRequestHeaders = {
|
const headers: RawAxiosRequestHeaders = {
|
||||||
...utils.getHeadersFromRequest(req),
|
...utils.getHeadersFromRequest(req),
|
||||||
...config?.headers,
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
};
|
};
|
||||||
headers["Accept"] = "*/*";
|
headers["Accept"] = "*/*";
|
||||||
|
|
||||||
@@ -98,7 +108,19 @@ export class Topics {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -178,10 +200,19 @@ export class Topics {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
const headers: RawAxiosRequestHeaders = {
|
const headers: RawAxiosRequestHeaders = {
|
||||||
...utils.getHeadersFromRequest(req),
|
...utils.getHeadersFromRequest(req),
|
||||||
...reqBodyHeaders,
|
...reqBodyHeaders,
|
||||||
...config?.headers,
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
};
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
@@ -250,9 +281,18 @@ export class Topics {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = utils.generateURL(baseURL, "/t/{id}.json", req);
|
const operationUrl: string = utils.generateURL(baseURL, "/t/{id}.json", req);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
const headers: RawAxiosRequestHeaders = {
|
const headers: RawAxiosRequestHeaders = {
|
||||||
...utils.getHeadersFromRequest(req),
|
...utils.getHeadersFromRequest(req),
|
||||||
...config?.headers,
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
};
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
@@ -320,7 +360,15 @@ export class Topics {
|
|||||||
req
|
req
|
||||||
);
|
);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "*/*";
|
headers["Accept"] = "*/*";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -386,10 +434,19 @@ export class Topics {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
const headers: RawAxiosRequestHeaders = {
|
const headers: RawAxiosRequestHeaders = {
|
||||||
...utils.getHeadersFromRequest(req),
|
...utils.getHeadersFromRequest(req),
|
||||||
...reqBodyHeaders,
|
...reqBodyHeaders,
|
||||||
...config?.headers,
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
};
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
@@ -460,9 +517,18 @@ export class Topics {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = baseURL.replace(/\/$/, "") + "/latest.json";
|
const operationUrl: string = baseURL.replace(/\/$/, "") + "/latest.json";
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
const headers: RawAxiosRequestHeaders = {
|
const headers: RawAxiosRequestHeaders = {
|
||||||
...utils.getHeadersFromRequest(req),
|
...utils.getHeadersFromRequest(req),
|
||||||
...config?.headers,
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
};
|
};
|
||||||
const queryParams: string = utils.serializeQueryParams(req);
|
const queryParams: string = utils.serializeQueryParams(req);
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
@@ -531,9 +597,18 @@ export class Topics {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = baseURL.replace(/\/$/, "") + "/top.json";
|
const operationUrl: string = baseURL.replace(/\/$/, "") + "/top.json";
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
const headers: RawAxiosRequestHeaders = {
|
const headers: RawAxiosRequestHeaders = {
|
||||||
...utils.getHeadersFromRequest(req),
|
...utils.getHeadersFromRequest(req),
|
||||||
...config?.headers,
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
};
|
};
|
||||||
const queryParams: string = utils.serializeQueryParams(req);
|
const queryParams: string = utils.serializeQueryParams(req);
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
@@ -602,9 +677,18 @@ export class Topics {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = utils.generateURL(baseURL, "/t/{id}.json", req);
|
const operationUrl: string = utils.generateURL(baseURL, "/t/{id}.json", req);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
const headers: RawAxiosRequestHeaders = {
|
const headers: RawAxiosRequestHeaders = {
|
||||||
...utils.getHeadersFromRequest(req),
|
...utils.getHeadersFromRequest(req),
|
||||||
...config?.headers,
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
};
|
};
|
||||||
headers["Accept"] = "*/*";
|
headers["Accept"] = "*/*";
|
||||||
|
|
||||||
@@ -670,10 +754,19 @@ export class Topics {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
const headers: RawAxiosRequestHeaders = {
|
const headers: RawAxiosRequestHeaders = {
|
||||||
...utils.getHeadersFromRequest(req),
|
...utils.getHeadersFromRequest(req),
|
||||||
...reqBodyHeaders,
|
...reqBodyHeaders,
|
||||||
...config?.headers,
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
};
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
@@ -755,10 +848,19 @@ export class Topics {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
const headers: RawAxiosRequestHeaders = {
|
const headers: RawAxiosRequestHeaders = {
|
||||||
...utils.getHeadersFromRequest(req),
|
...utils.getHeadersFromRequest(req),
|
||||||
...reqBodyHeaders,
|
...reqBodyHeaders,
|
||||||
...config?.headers,
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
};
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
@@ -839,10 +941,19 @@ export class Topics {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
const headers: RawAxiosRequestHeaders = {
|
const headers: RawAxiosRequestHeaders = {
|
||||||
...utils.getHeadersFromRequest(req),
|
...utils.getHeadersFromRequest(req),
|
||||||
...reqBodyHeaders,
|
...reqBodyHeaders,
|
||||||
...config?.headers,
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
};
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
@@ -927,10 +1038,19 @@ export class Topics {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
const headers: RawAxiosRequestHeaders = {
|
const headers: RawAxiosRequestHeaders = {
|
||||||
...utils.getHeadersFromRequest(req),
|
...utils.getHeadersFromRequest(req),
|
||||||
...reqBodyHeaders,
|
...reqBodyHeaders,
|
||||||
...config?.headers,
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
};
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import * as utils from "../internal/utils";
|
import * as utils from "../internal/utils";
|
||||||
import * as errors from "../sdk/models/errors";
|
import * as errors from "../sdk/models/errors";
|
||||||
import * as operations from "../sdk/models/operations";
|
import * as operations from "../sdk/models/operations";
|
||||||
|
import * as shared from "../sdk/models/shared";
|
||||||
import { SDKConfiguration } from "./sdk";
|
import { SDKConfiguration } from "./sdk";
|
||||||
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios";
|
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios";
|
||||||
|
|
||||||
@@ -57,7 +58,19 @@ export class Uploads {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -157,7 +170,19 @@ export class Uploads {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -254,7 +279,19 @@ export class Uploads {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -348,7 +385,19 @@ export class Uploads {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -437,7 +486,19 @@ export class Uploads {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -513,7 +574,19 @@ export class Uploads {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -612,7 +685,19 @@ export class Uploads {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
|
|||||||
268
src/sdk/users.ts
268
src/sdk/users.ts
@@ -5,6 +5,7 @@
|
|||||||
import * as utils from "../internal/utils";
|
import * as utils from "../internal/utils";
|
||||||
import * as errors from "../sdk/models/errors";
|
import * as errors from "../sdk/models/errors";
|
||||||
import * as operations from "../sdk/models/operations";
|
import * as operations from "../sdk/models/operations";
|
||||||
|
import * as shared from "../sdk/models/shared";
|
||||||
import { SDKConfiguration } from "./sdk";
|
import { SDKConfiguration } from "./sdk";
|
||||||
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios";
|
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios";
|
||||||
|
|
||||||
@@ -35,7 +36,15 @@ export class Users {
|
|||||||
req
|
req
|
||||||
);
|
);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -98,7 +107,15 @@ export class Users {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = utils.generateURL(baseURL, "/admin/users/{id}.json", req);
|
const operationUrl: string = utils.generateURL(baseURL, "/admin/users/{id}.json", req);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -166,7 +183,15 @@ export class Users {
|
|||||||
req
|
req
|
||||||
);
|
);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
const queryParams: string = utils.serializeQueryParams(req);
|
const queryParams: string = utils.serializeQueryParams(req);
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
@@ -237,7 +262,15 @@ export class Users {
|
|||||||
req
|
req
|
||||||
);
|
);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -316,7 +349,19 @@ export class Users {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "*/*";
|
headers["Accept"] = "*/*";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -380,10 +425,19 @@ export class Users {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
const headers: RawAxiosRequestHeaders = {
|
const headers: RawAxiosRequestHeaders = {
|
||||||
...utils.getHeadersFromRequest(req),
|
...utils.getHeadersFromRequest(req),
|
||||||
...reqBodyHeaders,
|
...reqBodyHeaders,
|
||||||
...config?.headers,
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
};
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
@@ -452,7 +506,15 @@ export class Users {
|
|||||||
req
|
req
|
||||||
);
|
);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -527,7 +589,19 @@ export class Users {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -595,9 +669,18 @@ export class Users {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = utils.generateURL(baseURL, "/u/{username}.json", req);
|
const operationUrl: string = utils.generateURL(baseURL, "/u/{username}.json", req);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
const headers: RawAxiosRequestHeaders = {
|
const headers: RawAxiosRequestHeaders = {
|
||||||
...utils.getHeadersFromRequest(req),
|
...utils.getHeadersFromRequest(req),
|
||||||
...config?.headers,
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
};
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
@@ -661,7 +744,15 @@ export class Users {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = utils.generateURL(baseURL, "/u/{username}/emails.json", req);
|
const operationUrl: string = utils.generateURL(baseURL, "/u/{username}/emails.json", req);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -732,9 +823,18 @@ export class Users {
|
|||||||
req
|
req
|
||||||
);
|
);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
const headers: RawAxiosRequestHeaders = {
|
const headers: RawAxiosRequestHeaders = {
|
||||||
...utils.getHeadersFromRequest(req),
|
...utils.getHeadersFromRequest(req),
|
||||||
...config?.headers,
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
};
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
@@ -808,9 +908,18 @@ export class Users {
|
|||||||
req
|
req
|
||||||
);
|
);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
const headers: RawAxiosRequestHeaders = {
|
const headers: RawAxiosRequestHeaders = {
|
||||||
...utils.getHeadersFromRequest(req),
|
...utils.getHeadersFromRequest(req),
|
||||||
...config?.headers,
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
};
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
@@ -879,7 +988,15 @@ export class Users {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = baseURL.replace(/\/$/, "") + "/user_actions.json";
|
const operationUrl: string = baseURL.replace(/\/$/, "") + "/user_actions.json";
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
const queryParams: string = utils.serializeQueryParams(req);
|
const queryParams: string = utils.serializeQueryParams(req);
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
@@ -947,7 +1064,15 @@ export class Users {
|
|||||||
req
|
req
|
||||||
);
|
);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -1016,7 +1141,15 @@ export class Users {
|
|||||||
);
|
);
|
||||||
const operationUrl: string = baseURL.replace(/\/$/, "") + "/directory_items.json";
|
const operationUrl: string = baseURL.replace(/\/$/, "") + "/directory_items.json";
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
const queryParams: string = utils.serializeQueryParams(req);
|
const queryParams: string = utils.serializeQueryParams(req);
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
@@ -1084,7 +1217,15 @@ export class Users {
|
|||||||
req
|
req
|
||||||
);
|
);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -1151,7 +1292,15 @@ export class Users {
|
|||||||
req
|
req
|
||||||
);
|
);
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers };
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -1225,7 +1374,19 @@ export class Users {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -1306,7 +1467,19 @@ export class Users {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -1386,7 +1559,19 @@ export class Users {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -1466,7 +1651,19 @@ export class Users {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -1546,7 +1743,19 @@ export class Users {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "*/*";
|
headers["Accept"] = "*/*";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
@@ -1612,10 +1821,19 @@ export class Users {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
const headers: RawAxiosRequestHeaders = {
|
const headers: RawAxiosRequestHeaders = {
|
||||||
...utils.getHeadersFromRequest(req),
|
...utils.getHeadersFromRequest(req),
|
||||||
...reqBodyHeaders,
|
...reqBodyHeaders,
|
||||||
...config?.headers,
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
};
|
};
|
||||||
headers["Accept"] = "application/json";
|
headers["Accept"] = "application/json";
|
||||||
|
|
||||||
@@ -1696,7 +1914,19 @@ export class Users {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
const client: AxiosInstance = this.sdkConfiguration.defaultClient;
|
||||||
const headers: RawAxiosRequestHeaders = { ...reqBodyHeaders, ...config?.headers };
|
let globalSecurity = this.sdkConfiguration.security;
|
||||||
|
if (typeof globalSecurity === "function") {
|
||||||
|
globalSecurity = await globalSecurity();
|
||||||
|
}
|
||||||
|
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
||||||
|
globalSecurity = new shared.Security(globalSecurity);
|
||||||
|
}
|
||||||
|
const properties = utils.parseSecurityProperties(globalSecurity);
|
||||||
|
const headers: RawAxiosRequestHeaders = {
|
||||||
|
...reqBodyHeaders,
|
||||||
|
...config?.headers,
|
||||||
|
...properties.headers,
|
||||||
|
};
|
||||||
headers["Accept"] = "*/*";
|
headers["Accept"] = "*/*";
|
||||||
|
|
||||||
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
||||||
|
|||||||
Reference in New Issue
Block a user