@foru-ms/sdk 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +4 -1
- package/dist/cjs/Client.js +16 -11
- package/dist/cjs/api/resources/auth/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/auth/client/Client.js +1 -1
- package/dist/cjs/api/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/index.js +4 -1
- package/dist/cjs/api/resources/integrations/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/integrations/client/Client.js +6 -9
- package/dist/cjs/api/resources/integrations/client/requests/CreateIntegrationsRequest.d.ts +2 -0
- package/dist/cjs/api/resources/integrations/client/requests/ListIntegrationsRequest.d.ts +2 -2
- package/dist/cjs/api/resources/integrations/client/requests/UpdateIntegrationsRequest.d.ts +2 -0
- package/dist/cjs/api/resources/integrations/types/UpdateIntegrationsResponse.d.ts +2 -0
- package/dist/cjs/api/resources/notifications/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/notifications/client/Client.js +7 -14
- package/dist/cjs/api/resources/notifications/client/requests/index.d.ts +2 -2
- package/dist/cjs/api/resources/notifications/client/requests/index.js +5 -0
- package/dist/cjs/api/resources/posts/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/posts/client/Client.js +22 -49
- package/dist/cjs/api/resources/posts/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/posts/client/requests/index.js +3 -0
- package/dist/cjs/api/resources/privateMessages/client/Client.d.ts +21 -1
- package/dist/cjs/api/resources/privateMessages/client/Client.js +79 -18
- package/dist/cjs/api/resources/privateMessages/client/requests/UpdatePrivateMessagesRequest.d.ts +16 -0
- package/dist/cjs/api/resources/privateMessages/client/requests/UpdatePrivateMessagesRequest.js +3 -0
- package/dist/cjs/api/resources/privateMessages/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/privateMessages/types/UpdatePrivateMessagesResponse.d.ts +26 -0
- package/dist/cjs/api/resources/privateMessages/types/UpdatePrivateMessagesResponse.js +3 -0
- package/dist/cjs/api/resources/privateMessages/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/privateMessages/types/index.js +1 -0
- package/dist/cjs/api/resources/reports/client/Client.d.ts +21 -1
- package/dist/cjs/api/resources/reports/client/Client.js +88 -17
- package/dist/cjs/api/resources/reports/client/requests/UpdateReportsRequest.d.ts +16 -0
- package/dist/cjs/api/resources/reports/client/requests/UpdateReportsRequest.js +3 -0
- package/dist/cjs/api/resources/reports/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/reports/index.d.ts +1 -0
- package/dist/cjs/api/resources/reports/index.js +1 -0
- package/dist/cjs/api/resources/reports/types/UpdateReportsResponse.d.ts +28 -0
- package/dist/cjs/api/resources/reports/types/UpdateReportsResponse.js +3 -0
- package/dist/cjs/api/resources/reports/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/reports/types/index.js +17 -0
- package/dist/cjs/api/resources/roles/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/roles/client/Client.js +8 -9
- package/dist/cjs/api/resources/roles/client/requests/ListRolesRequest.d.ts +7 -2
- package/dist/cjs/api/resources/roles/types/ListRolesRequestSort.d.ts +6 -0
- package/dist/cjs/api/resources/roles/types/ListRolesRequestSort.js +9 -0
- package/dist/cjs/api/resources/roles/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/roles/types/index.js +1 -0
- package/dist/cjs/api/resources/search/client/Client.d.ts +29 -0
- package/dist/cjs/api/resources/search/client/Client.js +115 -0
- package/dist/cjs/api/resources/search/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/search/client/index.js +2 -0
- package/dist/cjs/api/resources/search/index.d.ts +2 -0
- package/dist/cjs/api/resources/search/index.js +18 -0
- package/dist/cjs/api/resources/search/types/SearchSearchResponse.d.ts +33 -0
- package/dist/cjs/api/resources/search/types/SearchSearchResponse.js +22 -0
- package/dist/cjs/api/resources/search/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/search/types/index.js +17 -0
- package/dist/cjs/api/resources/ssOs/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/ssOs/client/Client.js +6 -9
- package/dist/cjs/api/resources/ssOs/client/requests/CreateSsOsRequest.d.ts +2 -0
- package/dist/cjs/api/resources/ssOs/client/requests/ListSsOsRequest.d.ts +2 -2
- package/dist/cjs/api/resources/ssOs/client/requests/UpdateSsOsRequest.d.ts +2 -0
- package/dist/cjs/api/resources/ssOs/types/UpdateSsOsResponse.d.ts +2 -0
- package/dist/cjs/api/resources/tags/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/tags/client/Client.js +10 -18
- package/dist/cjs/api/resources/threads/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/threads/client/Client.js +26 -56
- package/dist/cjs/api/resources/threads/client/requests/CreateThreadsRequest.d.ts +6 -0
- package/dist/cjs/api/resources/threads/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/threads/client/requests/index.js +3 -0
- package/dist/cjs/api/resources/threads/types/UpdateThreadsResponse.d.ts +5 -5
- package/dist/cjs/api/resources/users/client/Client.d.ts +20 -1
- package/dist/cjs/api/resources/users/client/Client.js +80 -28
- package/dist/cjs/api/resources/users/client/requests/CreateUsersRequest.d.ts +26 -0
- package/dist/cjs/api/resources/users/client/requests/CreateUsersRequest.js +3 -0
- package/dist/cjs/api/resources/users/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/webhooks/client/Client.d.ts +23 -1
- package/dist/cjs/api/resources/webhooks/client/Client.js +91 -15
- package/dist/cjs/api/resources/webhooks/client/requests/CreateWebhooksRequest.d.ts +4 -0
- package/dist/cjs/api/resources/webhooks/client/requests/UpdateWebhooksRequest.d.ts +22 -0
- package/dist/cjs/api/resources/webhooks/client/requests/UpdateWebhooksRequest.js +3 -0
- package/dist/cjs/api/resources/webhooks/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/webhooks/types/UpdateWebhooksResponse.d.ts +26 -0
- package/dist/cjs/api/resources/webhooks/types/UpdateWebhooksResponse.js +3 -0
- package/dist/cjs/api/resources/webhooks/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/webhooks/types/index.js +1 -0
- package/dist/cjs/api/types/Integration.d.ts +2 -0
- package/dist/cjs/api/types/IntegrationCreate.d.ts +2 -0
- package/dist/cjs/api/types/IntegrationList.d.ts +6 -0
- package/dist/cjs/api/types/IntegrationList.js +3 -0
- package/dist/cjs/api/types/IntegrationListResponse.d.ts +2 -0
- package/dist/cjs/api/types/IntegrationResponse.d.ts +2 -0
- package/dist/cjs/api/types/IntegrationUpdate.d.ts +2 -0
- package/dist/cjs/api/types/MeResponse.d.ts +22 -0
- package/dist/cjs/api/types/PrivateMessageUpdate.d.ts +8 -0
- package/dist/cjs/api/types/PrivateMessageUpdate.js +3 -0
- package/dist/cjs/api/types/ReportUpdate.d.ts +8 -0
- package/dist/cjs/api/types/ReportUpdate.js +3 -0
- package/dist/cjs/api/types/RoleList.d.ts +19 -0
- package/dist/cjs/api/types/RoleList.js +13 -0
- package/dist/cjs/api/types/Search.d.ts +1 -0
- package/dist/cjs/api/types/Search.js +3 -0
- package/dist/cjs/api/types/SearchListResponse.d.ts +18 -0
- package/dist/cjs/api/types/SearchListResponse.js +3 -0
- package/dist/cjs/api/types/SearchResponse.d.ts +6 -0
- package/dist/cjs/api/types/SearchResponse.js +3 -0
- package/dist/cjs/api/types/Sso.d.ts +2 -0
- package/dist/cjs/api/types/SsoCreate.d.ts +2 -0
- package/dist/cjs/api/types/SsoList.d.ts +6 -0
- package/dist/cjs/api/types/SsoList.js +3 -0
- package/dist/cjs/api/types/SsoListResponse.d.ts +2 -0
- package/dist/cjs/api/types/SsoResponse.d.ts +2 -0
- package/dist/cjs/api/types/SsoUpdate.d.ts +2 -0
- package/dist/cjs/api/types/Thread.d.ts +5 -5
- package/dist/cjs/api/types/ThreadCreate.d.ts +6 -0
- package/dist/cjs/api/types/ThreadListResponse.d.ts +5 -5
- package/dist/cjs/api/types/ThreadResponse.d.ts +5 -5
- package/dist/cjs/api/types/UserCreate.d.ts +20 -0
- package/dist/cjs/api/types/UserCreate.js +3 -0
- package/dist/cjs/api/types/Webhook.d.ts +2 -0
- package/dist/cjs/api/types/WebhookCreate.d.ts +4 -0
- package/dist/cjs/api/types/WebhookListResponse.d.ts +2 -0
- package/dist/cjs/api/types/WebhookResponse.d.ts +2 -0
- package/dist/cjs/api/types/WebhookUpdate.d.ts +14 -0
- package/dist/cjs/api/types/WebhookUpdate.js +3 -0
- package/dist/cjs/api/types/index.d.ts +10 -0
- package/dist/cjs/api/types/index.js +10 -0
- package/dist/cjs/auth/HeaderAuthProvider.d.ts +14 -10
- package/dist/cjs/auth/HeaderAuthProvider.js +18 -9
- package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +2 -2
- package/dist/cjs/core/fetcher/Fetcher.d.ts +1 -2
- package/dist/cjs/core/headers.d.ts +2 -2
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +4 -1
- package/dist/esm/Client.mjs +6 -1
- package/dist/esm/api/resources/auth/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/auth/client/Client.mjs +1 -1
- package/dist/esm/api/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/index.mjs +3 -0
- package/dist/esm/api/resources/integrations/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/integrations/client/Client.mjs +6 -9
- package/dist/esm/api/resources/integrations/client/requests/CreateIntegrationsRequest.d.mts +2 -0
- package/dist/esm/api/resources/integrations/client/requests/ListIntegrationsRequest.d.mts +2 -2
- package/dist/esm/api/resources/integrations/client/requests/UpdateIntegrationsRequest.d.mts +2 -0
- package/dist/esm/api/resources/integrations/types/UpdateIntegrationsResponse.d.mts +2 -0
- package/dist/esm/api/resources/notifications/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/notifications/client/Client.mjs +7 -14
- package/dist/esm/api/resources/notifications/client/requests/index.d.mts +2 -2
- package/dist/esm/api/resources/notifications/client/requests/index.mjs +2 -1
- package/dist/esm/api/resources/posts/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/posts/client/Client.mjs +22 -49
- package/dist/esm/api/resources/posts/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/posts/client/requests/index.mjs +1 -1
- package/dist/esm/api/resources/privateMessages/client/Client.d.mts +21 -1
- package/dist/esm/api/resources/privateMessages/client/Client.mjs +79 -18
- package/dist/esm/api/resources/privateMessages/client/requests/UpdatePrivateMessagesRequest.d.mts +16 -0
- package/dist/esm/api/resources/privateMessages/client/requests/UpdatePrivateMessagesRequest.mjs +2 -0
- package/dist/esm/api/resources/privateMessages/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/privateMessages/types/UpdatePrivateMessagesResponse.d.mts +26 -0
- package/dist/esm/api/resources/privateMessages/types/UpdatePrivateMessagesResponse.mjs +2 -0
- package/dist/esm/api/resources/privateMessages/types/index.d.mts +1 -0
- package/dist/esm/api/resources/privateMessages/types/index.mjs +1 -0
- package/dist/esm/api/resources/reports/client/Client.d.mts +21 -1
- package/dist/esm/api/resources/reports/client/Client.mjs +88 -17
- package/dist/esm/api/resources/reports/client/requests/UpdateReportsRequest.d.mts +16 -0
- package/dist/esm/api/resources/reports/client/requests/UpdateReportsRequest.mjs +2 -0
- package/dist/esm/api/resources/reports/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/reports/index.d.mts +1 -0
- package/dist/esm/api/resources/reports/index.mjs +1 -0
- package/dist/esm/api/resources/reports/types/UpdateReportsResponse.d.mts +28 -0
- package/dist/esm/api/resources/reports/types/UpdateReportsResponse.mjs +2 -0
- package/dist/esm/api/resources/reports/types/index.d.mts +1 -0
- package/dist/esm/api/resources/reports/types/index.mjs +1 -0
- package/dist/esm/api/resources/roles/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/roles/client/Client.mjs +8 -9
- package/dist/esm/api/resources/roles/client/requests/ListRolesRequest.d.mts +7 -2
- package/dist/esm/api/resources/roles/types/ListRolesRequestSort.d.mts +6 -0
- package/dist/esm/api/resources/roles/types/ListRolesRequestSort.mjs +6 -0
- package/dist/esm/api/resources/roles/types/index.d.mts +1 -0
- package/dist/esm/api/resources/roles/types/index.mjs +1 -0
- package/dist/esm/api/resources/search/client/Client.d.mts +29 -0
- package/dist/esm/api/resources/search/client/Client.mjs +78 -0
- package/dist/esm/api/resources/search/client/index.d.mts +1 -0
- package/dist/esm/api/resources/search/client/index.mjs +1 -0
- package/dist/esm/api/resources/search/index.d.mts +2 -0
- package/dist/esm/api/resources/search/index.mjs +2 -0
- package/dist/esm/api/resources/search/types/SearchSearchResponse.d.mts +33 -0
- package/dist/esm/api/resources/search/types/SearchSearchResponse.mjs +19 -0
- package/dist/esm/api/resources/search/types/index.d.mts +1 -0
- package/dist/esm/api/resources/search/types/index.mjs +1 -0
- package/dist/esm/api/resources/ssOs/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/ssOs/client/Client.mjs +6 -9
- package/dist/esm/api/resources/ssOs/client/requests/CreateSsOsRequest.d.mts +2 -0
- package/dist/esm/api/resources/ssOs/client/requests/ListSsOsRequest.d.mts +2 -2
- package/dist/esm/api/resources/ssOs/client/requests/UpdateSsOsRequest.d.mts +2 -0
- package/dist/esm/api/resources/ssOs/types/UpdateSsOsResponse.d.mts +2 -0
- package/dist/esm/api/resources/tags/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/tags/client/Client.mjs +10 -18
- package/dist/esm/api/resources/threads/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/threads/client/Client.mjs +26 -56
- package/dist/esm/api/resources/threads/client/requests/CreateThreadsRequest.d.mts +6 -0
- package/dist/esm/api/resources/threads/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/threads/client/requests/index.mjs +1 -1
- package/dist/esm/api/resources/threads/types/UpdateThreadsResponse.d.mts +5 -5
- package/dist/esm/api/resources/users/client/Client.d.mts +20 -1
- package/dist/esm/api/resources/users/client/Client.mjs +80 -28
- package/dist/esm/api/resources/users/client/requests/CreateUsersRequest.d.mts +26 -0
- package/dist/esm/api/resources/users/client/requests/CreateUsersRequest.mjs +2 -0
- package/dist/esm/api/resources/users/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/webhooks/client/Client.d.mts +23 -1
- package/dist/esm/api/resources/webhooks/client/Client.mjs +91 -15
- package/dist/esm/api/resources/webhooks/client/requests/CreateWebhooksRequest.d.mts +4 -0
- package/dist/esm/api/resources/webhooks/client/requests/UpdateWebhooksRequest.d.mts +22 -0
- package/dist/esm/api/resources/webhooks/client/requests/UpdateWebhooksRequest.mjs +2 -0
- package/dist/esm/api/resources/webhooks/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/webhooks/types/UpdateWebhooksResponse.d.mts +26 -0
- package/dist/esm/api/resources/webhooks/types/UpdateWebhooksResponse.mjs +2 -0
- package/dist/esm/api/resources/webhooks/types/index.d.mts +1 -0
- package/dist/esm/api/resources/webhooks/types/index.mjs +1 -0
- package/dist/esm/api/types/Integration.d.mts +2 -0
- package/dist/esm/api/types/IntegrationCreate.d.mts +2 -0
- package/dist/esm/api/types/IntegrationList.d.mts +6 -0
- package/dist/esm/api/types/IntegrationList.mjs +2 -0
- package/dist/esm/api/types/IntegrationListResponse.d.mts +2 -0
- package/dist/esm/api/types/IntegrationResponse.d.mts +2 -0
- package/dist/esm/api/types/IntegrationUpdate.d.mts +2 -0
- package/dist/esm/api/types/MeResponse.d.mts +22 -0
- package/dist/esm/api/types/PrivateMessageUpdate.d.mts +8 -0
- package/dist/esm/api/types/PrivateMessageUpdate.mjs +2 -0
- package/dist/esm/api/types/ReportUpdate.d.mts +8 -0
- package/dist/esm/api/types/ReportUpdate.mjs +2 -0
- package/dist/esm/api/types/RoleList.d.mts +19 -0
- package/dist/esm/api/types/RoleList.mjs +10 -0
- package/dist/esm/api/types/Search.d.mts +1 -0
- package/dist/esm/api/types/Search.mjs +2 -0
- package/dist/esm/api/types/SearchListResponse.d.mts +18 -0
- package/dist/esm/api/types/SearchListResponse.mjs +2 -0
- package/dist/esm/api/types/SearchResponse.d.mts +6 -0
- package/dist/esm/api/types/SearchResponse.mjs +2 -0
- package/dist/esm/api/types/Sso.d.mts +2 -0
- package/dist/esm/api/types/SsoCreate.d.mts +2 -0
- package/dist/esm/api/types/SsoList.d.mts +6 -0
- package/dist/esm/api/types/SsoList.mjs +2 -0
- package/dist/esm/api/types/SsoListResponse.d.mts +2 -0
- package/dist/esm/api/types/SsoResponse.d.mts +2 -0
- package/dist/esm/api/types/SsoUpdate.d.mts +2 -0
- package/dist/esm/api/types/Thread.d.mts +5 -5
- package/dist/esm/api/types/ThreadCreate.d.mts +6 -0
- package/dist/esm/api/types/ThreadListResponse.d.mts +5 -5
- package/dist/esm/api/types/ThreadResponse.d.mts +5 -5
- package/dist/esm/api/types/UserCreate.d.mts +20 -0
- package/dist/esm/api/types/UserCreate.mjs +2 -0
- package/dist/esm/api/types/Webhook.d.mts +2 -0
- package/dist/esm/api/types/WebhookCreate.d.mts +4 -0
- package/dist/esm/api/types/WebhookListResponse.d.mts +2 -0
- package/dist/esm/api/types/WebhookResponse.d.mts +2 -0
- package/dist/esm/api/types/WebhookUpdate.d.mts +14 -0
- package/dist/esm/api/types/WebhookUpdate.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +10 -0
- package/dist/esm/api/types/index.mjs +10 -0
- package/dist/esm/auth/HeaderAuthProvider.d.mts +14 -10
- package/dist/esm/auth/HeaderAuthProvider.mjs +18 -9
- package/dist/esm/core/fetcher/EndpointSupplier.d.mts +2 -2
- package/dist/esm/core/fetcher/Fetcher.d.mts +1 -2
- package/dist/esm/core/headers.d.mts +2 -2
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
- package/reference.md +304 -0
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "@foru-ms/sdk",
|
|
46
|
-
"X-Fern-SDK-Version": "2.
|
|
47
|
-
"User-Agent": "@foru-ms/sdk/2.
|
|
46
|
+
"X-Fern-SDK-Version": "2.1.1",
|
|
47
|
+
"User-Agent": "@foru-ms/sdk/2.1.1",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
package/dist/cjs/Client.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { PostsClient } from "./api/resources/posts/client/Client.js";
|
|
|
5
5
|
import { PrivateMessagesClient } from "./api/resources/privateMessages/client/Client.js";
|
|
6
6
|
import { ReportsClient } from "./api/resources/reports/client/Client.js";
|
|
7
7
|
import { RolesClient } from "./api/resources/roles/client/Client.js";
|
|
8
|
+
import { SearchClient } from "./api/resources/search/client/Client.js";
|
|
8
9
|
import { SsOsClient } from "./api/resources/ssOs/client/Client.js";
|
|
9
10
|
import { TagsClient } from "./api/resources/tags/client/Client.js";
|
|
10
11
|
import { ThreadsClient } from "./api/resources/threads/client/Client.js";
|
|
@@ -20,6 +21,7 @@ export declare namespace ForumClient {
|
|
|
20
21
|
export declare class ForumClient {
|
|
21
22
|
protected readonly _options: NormalizedClientOptionsWithAuth<ForumClient.Options>;
|
|
22
23
|
protected _auth: AuthClient | undefined;
|
|
24
|
+
protected _search: SearchClient | undefined;
|
|
23
25
|
protected _tags: TagsClient | undefined;
|
|
24
26
|
protected _threads: ThreadsClient | undefined;
|
|
25
27
|
protected _posts: PostsClient | undefined;
|
|
@@ -31,8 +33,9 @@ export declare class ForumClient {
|
|
|
31
33
|
protected _webhooks: WebhooksClient | undefined;
|
|
32
34
|
protected _integrations: IntegrationsClient | undefined;
|
|
33
35
|
protected _ssOs: SsOsClient | undefined;
|
|
34
|
-
constructor(options
|
|
36
|
+
constructor(options?: ForumClient.Options);
|
|
35
37
|
get auth(): AuthClient;
|
|
38
|
+
get search(): SearchClient;
|
|
36
39
|
get tags(): TagsClient;
|
|
37
40
|
get threads(): ThreadsClient;
|
|
38
41
|
get posts(): PostsClient;
|
package/dist/cjs/Client.js
CHANGED
|
@@ -9,27 +9,32 @@ const Client_js_4 = require("./api/resources/posts/client/Client.js");
|
|
|
9
9
|
const Client_js_5 = require("./api/resources/privateMessages/client/Client.js");
|
|
10
10
|
const Client_js_6 = require("./api/resources/reports/client/Client.js");
|
|
11
11
|
const Client_js_7 = require("./api/resources/roles/client/Client.js");
|
|
12
|
-
const Client_js_8 = require("./api/resources/
|
|
13
|
-
const Client_js_9 = require("./api/resources/
|
|
14
|
-
const Client_js_10 = require("./api/resources/
|
|
15
|
-
const Client_js_11 = require("./api/resources/
|
|
16
|
-
const Client_js_12 = require("./api/resources/
|
|
12
|
+
const Client_js_8 = require("./api/resources/search/client/Client.js");
|
|
13
|
+
const Client_js_9 = require("./api/resources/ssOs/client/Client.js");
|
|
14
|
+
const Client_js_10 = require("./api/resources/tags/client/Client.js");
|
|
15
|
+
const Client_js_11 = require("./api/resources/threads/client/Client.js");
|
|
16
|
+
const Client_js_12 = require("./api/resources/users/client/Client.js");
|
|
17
|
+
const Client_js_13 = require("./api/resources/webhooks/client/Client.js");
|
|
17
18
|
const BaseClient_js_1 = require("./BaseClient.js");
|
|
18
19
|
class ForumClient {
|
|
19
|
-
constructor(options) {
|
|
20
|
+
constructor(options = {}) {
|
|
20
21
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
21
22
|
}
|
|
22
23
|
get auth() {
|
|
23
24
|
var _a;
|
|
24
25
|
return ((_a = this._auth) !== null && _a !== void 0 ? _a : (this._auth = new Client_js_1.AuthClient(this._options)));
|
|
25
26
|
}
|
|
27
|
+
get search() {
|
|
28
|
+
var _a;
|
|
29
|
+
return ((_a = this._search) !== null && _a !== void 0 ? _a : (this._search = new Client_js_8.SearchClient(this._options)));
|
|
30
|
+
}
|
|
26
31
|
get tags() {
|
|
27
32
|
var _a;
|
|
28
|
-
return ((_a = this._tags) !== null && _a !== void 0 ? _a : (this._tags = new
|
|
33
|
+
return ((_a = this._tags) !== null && _a !== void 0 ? _a : (this._tags = new Client_js_10.TagsClient(this._options)));
|
|
29
34
|
}
|
|
30
35
|
get threads() {
|
|
31
36
|
var _a;
|
|
32
|
-
return ((_a = this._threads) !== null && _a !== void 0 ? _a : (this._threads = new
|
|
37
|
+
return ((_a = this._threads) !== null && _a !== void 0 ? _a : (this._threads = new Client_js_11.ThreadsClient(this._options)));
|
|
33
38
|
}
|
|
34
39
|
get posts() {
|
|
35
40
|
var _a;
|
|
@@ -41,7 +46,7 @@ class ForumClient {
|
|
|
41
46
|
}
|
|
42
47
|
get users() {
|
|
43
48
|
var _a;
|
|
44
|
-
return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new
|
|
49
|
+
return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_js_12.UsersClient(this._options)));
|
|
45
50
|
}
|
|
46
51
|
get roles() {
|
|
47
52
|
var _a;
|
|
@@ -57,7 +62,7 @@ class ForumClient {
|
|
|
57
62
|
}
|
|
58
63
|
get webhooks() {
|
|
59
64
|
var _a;
|
|
60
|
-
return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new
|
|
65
|
+
return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Client_js_13.WebhooksClient(this._options)));
|
|
61
66
|
}
|
|
62
67
|
get integrations() {
|
|
63
68
|
var _a;
|
|
@@ -65,7 +70,7 @@ class ForumClient {
|
|
|
65
70
|
}
|
|
66
71
|
get ssOs() {
|
|
67
72
|
var _a;
|
|
68
|
-
return ((_a = this._ssOs) !== null && _a !== void 0 ? _a : (this._ssOs = new
|
|
73
|
+
return ((_a = this._ssOs) !== null && _a !== void 0 ? _a : (this._ssOs = new Client_js_9.SsOsClient(this._options)));
|
|
69
74
|
}
|
|
70
75
|
}
|
|
71
76
|
exports.ForumClient = ForumClient;
|
|
@@ -12,7 +12,7 @@ export declare namespace AuthClient {
|
|
|
12
12
|
*/
|
|
13
13
|
export declare class AuthClient {
|
|
14
14
|
protected readonly _options: NormalizedClientOptionsWithAuth<AuthClient.Options>;
|
|
15
|
-
constructor(options
|
|
15
|
+
constructor(options?: AuthClient.Options);
|
|
16
16
|
/**
|
|
17
17
|
* Register a new user in your forum instance. Requires API key for instance identification. Returns a JWT token for subsequent authenticated requests.
|
|
18
18
|
*
|
|
@@ -55,7 +55,7 @@ const Forum = __importStar(require("../../../index.js"));
|
|
|
55
55
|
* Operations for auth
|
|
56
56
|
*/
|
|
57
57
|
class AuthClient {
|
|
58
|
-
constructor(options) {
|
|
58
|
+
constructor(options = {}) {
|
|
59
59
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
@@ -14,9 +14,12 @@ export * as privateMessages from "./privateMessages/index.js";
|
|
|
14
14
|
export * from "./privateMessages/types/index.js";
|
|
15
15
|
export * from "./reports/client/requests/index.js";
|
|
16
16
|
export * as reports from "./reports/index.js";
|
|
17
|
+
export * from "./reports/types/index.js";
|
|
17
18
|
export * from "./roles/client/requests/index.js";
|
|
18
19
|
export * as roles from "./roles/index.js";
|
|
19
20
|
export * from "./roles/types/index.js";
|
|
21
|
+
export * as search from "./search/index.js";
|
|
22
|
+
export * from "./search/types/index.js";
|
|
20
23
|
export * from "./ssOs/client/requests/index.js";
|
|
21
24
|
export * as ssOs from "./ssOs/index.js";
|
|
22
25
|
export * from "./ssOs/types/index.js";
|
|
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.webhooks = exports.users = exports.threads = exports.tags = exports.ssOs = exports.roles = exports.reports = exports.privateMessages = exports.posts = exports.notifications = exports.integrations = exports.auth = void 0;
|
|
39
|
+
exports.webhooks = exports.users = exports.threads = exports.tags = exports.ssOs = exports.search = exports.roles = exports.reports = exports.privateMessages = exports.posts = exports.notifications = exports.integrations = exports.auth = void 0;
|
|
40
40
|
__exportStar(require("./auth/client/requests/index.js"), exports);
|
|
41
41
|
exports.auth = __importStar(require("./auth/index.js"));
|
|
42
42
|
__exportStar(require("./integrations/client/requests/index.js"), exports);
|
|
@@ -53,9 +53,12 @@ exports.privateMessages = __importStar(require("./privateMessages/index.js"));
|
|
|
53
53
|
__exportStar(require("./privateMessages/types/index.js"), exports);
|
|
54
54
|
__exportStar(require("./reports/client/requests/index.js"), exports);
|
|
55
55
|
exports.reports = __importStar(require("./reports/index.js"));
|
|
56
|
+
__exportStar(require("./reports/types/index.js"), exports);
|
|
56
57
|
__exportStar(require("./roles/client/requests/index.js"), exports);
|
|
57
58
|
exports.roles = __importStar(require("./roles/index.js"));
|
|
58
59
|
__exportStar(require("./roles/types/index.js"), exports);
|
|
60
|
+
exports.search = __importStar(require("./search/index.js"));
|
|
61
|
+
__exportStar(require("./search/types/index.js"), exports);
|
|
59
62
|
__exportStar(require("./ssOs/client/requests/index.js"), exports);
|
|
60
63
|
exports.ssOs = __importStar(require("./ssOs/index.js"));
|
|
61
64
|
__exportStar(require("./ssOs/types/index.js"), exports);
|
|
@@ -12,7 +12,7 @@ export declare namespace IntegrationsClient {
|
|
|
12
12
|
*/
|
|
13
13
|
export declare class IntegrationsClient {
|
|
14
14
|
protected readonly _options: NormalizedClientOptionsWithAuth<IntegrationsClient.Options>;
|
|
15
|
-
constructor(options
|
|
15
|
+
constructor(options?: IntegrationsClient.Options);
|
|
16
16
|
/**
|
|
17
17
|
* Retrieve a paginated list of integrations. Use cursor for pagination.
|
|
18
18
|
*
|
|
@@ -66,7 +66,7 @@ const Forum = __importStar(require("../../../index.js"));
|
|
|
66
66
|
* Operations for integrations
|
|
67
67
|
*/
|
|
68
68
|
class IntegrationsClient {
|
|
69
|
-
constructor(options) {
|
|
69
|
+
constructor(options = {}) {
|
|
70
70
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
@@ -91,14 +91,11 @@ class IntegrationsClient {
|
|
|
91
91
|
__list() {
|
|
92
92
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
93
93
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
94
|
-
const {
|
|
95
|
-
const _queryParams = {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
99
|
-
if (limit != null) {
|
|
100
|
-
_queryParams.limit = limit.toString();
|
|
101
|
-
}
|
|
94
|
+
const { limit, cursor } = request;
|
|
95
|
+
const _queryParams = {
|
|
96
|
+
limit,
|
|
97
|
+
cursor,
|
|
98
|
+
};
|
|
102
99
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
103
100
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
104
101
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
@@ -10,6 +10,8 @@ export declare namespace UpdateIntegrationsResponse {
|
|
|
10
10
|
name: string;
|
|
11
11
|
/** Whether integration is active */
|
|
12
12
|
active: boolean;
|
|
13
|
+
/** Custom extended data */
|
|
14
|
+
extendedData: Record<string, unknown> | null;
|
|
13
15
|
/** Integration creation timestamp */
|
|
14
16
|
createdAt: string;
|
|
15
17
|
/** Integration last update timestamp */
|
|
@@ -12,7 +12,7 @@ export declare namespace NotificationsClient {
|
|
|
12
12
|
*/
|
|
13
13
|
export declare class NotificationsClient {
|
|
14
14
|
protected readonly _options: NormalizedClientOptionsWithAuth<NotificationsClient.Options>;
|
|
15
|
-
constructor(options
|
|
15
|
+
constructor(options?: NotificationsClient.Options);
|
|
16
16
|
/**
|
|
17
17
|
* Retrieve a paginated list of notifications. Use cursor for pagination.
|
|
18
18
|
*
|
|
@@ -66,7 +66,7 @@ const Forum = __importStar(require("../../../index.js"));
|
|
|
66
66
|
* Operations for notifications
|
|
67
67
|
*/
|
|
68
68
|
class NotificationsClient {
|
|
69
|
-
constructor(options) {
|
|
69
|
+
constructor(options = {}) {
|
|
70
70
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
@@ -90,19 +90,12 @@ class NotificationsClient {
|
|
|
90
90
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
91
91
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
92
92
|
const { limit, cursor, status, userId } = request;
|
|
93
|
-
const _queryParams = {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
100
|
-
if (status != null) {
|
|
101
|
-
_queryParams.status = status;
|
|
102
|
-
}
|
|
103
|
-
if (userId != null) {
|
|
104
|
-
_queryParams.userId = userId;
|
|
105
|
-
}
|
|
93
|
+
const _queryParams = {
|
|
94
|
+
limit,
|
|
95
|
+
cursor,
|
|
96
|
+
status: status != null ? status : undefined,
|
|
97
|
+
userId,
|
|
98
|
+
};
|
|
106
99
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
107
100
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
108
101
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { CreateNotificationsRequest } from "./CreateNotificationsRequest.js";
|
|
2
2
|
export type { DeleteNotificationsRequest } from "./DeleteNotificationsRequest.js";
|
|
3
3
|
export type { ListNotificationsRequest } from "./ListNotificationsRequest.js";
|
|
4
4
|
export type { RetrieveNotificationsRequest } from "./RetrieveNotificationsRequest.js";
|
|
5
|
-
export
|
|
5
|
+
export { UpdateNotificationsRequest } from "./UpdateNotificationsRequest.js";
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateNotificationsRequest = exports.CreateNotificationsRequest = void 0;
|
|
4
|
+
var CreateNotificationsRequest_js_1 = require("./CreateNotificationsRequest.js");
|
|
5
|
+
Object.defineProperty(exports, "CreateNotificationsRequest", { enumerable: true, get: function () { return CreateNotificationsRequest_js_1.CreateNotificationsRequest; } });
|
|
6
|
+
var UpdateNotificationsRequest_js_1 = require("./UpdateNotificationsRequest.js");
|
|
7
|
+
Object.defineProperty(exports, "UpdateNotificationsRequest", { enumerable: true, get: function () { return UpdateNotificationsRequest_js_1.UpdateNotificationsRequest; } });
|
|
@@ -12,7 +12,7 @@ export declare namespace PostsClient {
|
|
|
12
12
|
*/
|
|
13
13
|
export declare class PostsClient {
|
|
14
14
|
protected readonly _options: NormalizedClientOptionsWithAuth<PostsClient.Options>;
|
|
15
|
-
constructor(options
|
|
15
|
+
constructor(options?: PostsClient.Options);
|
|
16
16
|
/**
|
|
17
17
|
* Retrieve a paginated list of posts. Use cursor for pagination.
|
|
18
18
|
*
|
|
@@ -66,7 +66,7 @@ const Forum = __importStar(require("../../../index.js"));
|
|
|
66
66
|
* Operations for posts
|
|
67
67
|
*/
|
|
68
68
|
class PostsClient {
|
|
69
|
-
constructor(options) {
|
|
69
|
+
constructor(options = {}) {
|
|
70
70
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
@@ -90,25 +90,14 @@ class PostsClient {
|
|
|
90
90
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
91
91
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
92
92
|
const { limit, cursor, userId, sort, search, type: type_ } = request;
|
|
93
|
-
const _queryParams = {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
_queryParams.userId = userId;
|
|
102
|
-
}
|
|
103
|
-
if (sort != null) {
|
|
104
|
-
_queryParams.sort = sort;
|
|
105
|
-
}
|
|
106
|
-
if (search != null) {
|
|
107
|
-
_queryParams.search = search;
|
|
108
|
-
}
|
|
109
|
-
if (type_ != null) {
|
|
110
|
-
_queryParams.type = type_;
|
|
111
|
-
}
|
|
93
|
+
const _queryParams = {
|
|
94
|
+
limit,
|
|
95
|
+
cursor,
|
|
96
|
+
userId,
|
|
97
|
+
sort: sort != null ? sort : undefined,
|
|
98
|
+
search,
|
|
99
|
+
type: type_ != null ? type_ : undefined,
|
|
100
|
+
};
|
|
112
101
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
113
102
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
114
103
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
@@ -430,16 +419,11 @@ class PostsClient {
|
|
|
430
419
|
return __awaiter(this, void 0, void 0, function* () {
|
|
431
420
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
432
421
|
const { id, limit, cursor, type: type_ } = request;
|
|
433
|
-
const _queryParams = {
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
_queryParams.cursor = cursor;
|
|
439
|
-
}
|
|
440
|
-
if (type_ != null) {
|
|
441
|
-
_queryParams.type = type_;
|
|
442
|
-
}
|
|
422
|
+
const _queryParams = {
|
|
423
|
+
limit,
|
|
424
|
+
cursor,
|
|
425
|
+
type: type_ != null ? type_ : undefined,
|
|
426
|
+
};
|
|
443
427
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
444
428
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
445
429
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
@@ -685,25 +669,14 @@ class PostsClient {
|
|
|
685
669
|
return __awaiter(this, void 0, void 0, function* () {
|
|
686
670
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
687
671
|
const { id, limit, cursor, userId, sort, search, type: type_ } = request;
|
|
688
|
-
const _queryParams = {
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
_queryParams.userId = userId;
|
|
697
|
-
}
|
|
698
|
-
if (sort != null) {
|
|
699
|
-
_queryParams.sort = sort;
|
|
700
|
-
}
|
|
701
|
-
if (search != null) {
|
|
702
|
-
_queryParams.search = search;
|
|
703
|
-
}
|
|
704
|
-
if (type_ != null) {
|
|
705
|
-
_queryParams.type = type_;
|
|
706
|
-
}
|
|
672
|
+
const _queryParams = {
|
|
673
|
+
limit,
|
|
674
|
+
cursor,
|
|
675
|
+
userId,
|
|
676
|
+
sort: sort != null ? sort : undefined,
|
|
677
|
+
search,
|
|
678
|
+
type: type_ != null ? type_ : undefined,
|
|
679
|
+
};
|
|
707
680
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
708
681
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
709
682
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type { CreatePostsRequest } from "./CreatePostsRequest.js";
|
|
2
|
-
export
|
|
2
|
+
export { CreateReactionPostsRequest } from "./CreateReactionPostsRequest.js";
|
|
3
3
|
export type { DeletePostPostsRequest } from "./DeletePostPostsRequest.js";
|
|
4
4
|
export type { DeletePostsRequest } from "./DeletePostsRequest.js";
|
|
5
5
|
export type { DeleteReactionPostsRequest } from "./DeleteReactionPostsRequest.js";
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateReactionPostsRequest = void 0;
|
|
4
|
+
var CreateReactionPostsRequest_js_1 = require("./CreateReactionPostsRequest.js");
|
|
5
|
+
Object.defineProperty(exports, "CreateReactionPostsRequest", { enumerable: true, get: function () { return CreateReactionPostsRequest_js_1.CreateReactionPostsRequest; } });
|
|
@@ -12,7 +12,7 @@ export declare namespace PrivateMessagesClient {
|
|
|
12
12
|
*/
|
|
13
13
|
export declare class PrivateMessagesClient {
|
|
14
14
|
protected readonly _options: NormalizedClientOptionsWithAuth<PrivateMessagesClient.Options>;
|
|
15
|
-
constructor(options
|
|
15
|
+
constructor(options?: PrivateMessagesClient.Options);
|
|
16
16
|
/**
|
|
17
17
|
* Retrieve a paginated list of private messages. Use cursor for pagination.
|
|
18
18
|
*
|
|
@@ -87,6 +87,26 @@ export declare class PrivateMessagesClient {
|
|
|
87
87
|
*/
|
|
88
88
|
delete(request: Forum.DeletePrivateMessagesRequest, requestOptions?: PrivateMessagesClient.RequestOptions): core.HttpResponsePromise<Forum.SuccessResponse>;
|
|
89
89
|
private __delete;
|
|
90
|
+
/**
|
|
91
|
+
* Update an existing private message. Only provided fields will be modified.
|
|
92
|
+
*
|
|
93
|
+
* @param {Forum.UpdatePrivateMessagesRequest} request
|
|
94
|
+
* @param {PrivateMessagesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
95
|
+
*
|
|
96
|
+
* @throws {@link Forum.BadRequestError}
|
|
97
|
+
* @throws {@link Forum.UnauthorizedError}
|
|
98
|
+
* @throws {@link Forum.PaymentRequiredError}
|
|
99
|
+
* @throws {@link Forum.NotFoundError}
|
|
100
|
+
* @throws {@link Forum.TooManyRequestsError}
|
|
101
|
+
* @throws {@link Forum.InternalServerError}
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* await client.privateMessages.update({
|
|
105
|
+
* id: "id"
|
|
106
|
+
* })
|
|
107
|
+
*/
|
|
108
|
+
update(request: Forum.UpdatePrivateMessagesRequest, requestOptions?: PrivateMessagesClient.RequestOptions): core.HttpResponsePromise<Forum.UpdatePrivateMessagesResponse>;
|
|
109
|
+
private __update;
|
|
90
110
|
/**
|
|
91
111
|
* Retrieve a paginated list of replies for Private Message.
|
|
92
112
|
*
|
|
@@ -66,7 +66,7 @@ const Forum = __importStar(require("../../../index.js"));
|
|
|
66
66
|
* Operations for private messages
|
|
67
67
|
*/
|
|
68
68
|
class PrivateMessagesClient {
|
|
69
|
-
constructor(options) {
|
|
69
|
+
constructor(options = {}) {
|
|
70
70
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
@@ -90,16 +90,11 @@ class PrivateMessagesClient {
|
|
|
90
90
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
91
91
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
92
92
|
const { limit, cursor, query } = request;
|
|
93
|
-
const _queryParams = {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
_queryParams.cursor = cursor;
|
|
99
|
-
}
|
|
100
|
-
if (query != null) {
|
|
101
|
-
_queryParams.query = query;
|
|
102
|
-
}
|
|
93
|
+
const _queryParams = {
|
|
94
|
+
limit,
|
|
95
|
+
cursor,
|
|
96
|
+
query,
|
|
97
|
+
};
|
|
103
98
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
104
99
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
105
100
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
@@ -329,6 +324,75 @@ class PrivateMessagesClient {
|
|
|
329
324
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/private-messages/{id}");
|
|
330
325
|
});
|
|
331
326
|
}
|
|
327
|
+
/**
|
|
328
|
+
* Update an existing private message. Only provided fields will be modified.
|
|
329
|
+
*
|
|
330
|
+
* @param {Forum.UpdatePrivateMessagesRequest} request
|
|
331
|
+
* @param {PrivateMessagesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
332
|
+
*
|
|
333
|
+
* @throws {@link Forum.BadRequestError}
|
|
334
|
+
* @throws {@link Forum.UnauthorizedError}
|
|
335
|
+
* @throws {@link Forum.PaymentRequiredError}
|
|
336
|
+
* @throws {@link Forum.NotFoundError}
|
|
337
|
+
* @throws {@link Forum.TooManyRequestsError}
|
|
338
|
+
* @throws {@link Forum.InternalServerError}
|
|
339
|
+
*
|
|
340
|
+
* @example
|
|
341
|
+
* await client.privateMessages.update({
|
|
342
|
+
* id: "id"
|
|
343
|
+
* })
|
|
344
|
+
*/
|
|
345
|
+
update(request, requestOptions) {
|
|
346
|
+
return core.HttpResponsePromise.fromPromise(this.__update(request, requestOptions));
|
|
347
|
+
}
|
|
348
|
+
__update(request, requestOptions) {
|
|
349
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
350
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
351
|
+
const { id } = request, _body = __rest(request, ["id"]);
|
|
352
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
353
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
354
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
355
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, `private-messages/${core.url.encodePathParam(id)}`),
|
|
356
|
+
method: "PATCH",
|
|
357
|
+
headers: _headers,
|
|
358
|
+
contentType: "application/json",
|
|
359
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
360
|
+
requestType: "json",
|
|
361
|
+
body: _body,
|
|
362
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
363
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
364
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
365
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
366
|
+
logging: this._options.logging,
|
|
367
|
+
});
|
|
368
|
+
if (_response.ok) {
|
|
369
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
370
|
+
}
|
|
371
|
+
if (_response.error.reason === "status-code") {
|
|
372
|
+
switch (_response.error.statusCode) {
|
|
373
|
+
case 400:
|
|
374
|
+
throw new Forum.BadRequestError(_response.error.body, _response.rawResponse);
|
|
375
|
+
case 401:
|
|
376
|
+
throw new Forum.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
377
|
+
case 402:
|
|
378
|
+
throw new Forum.PaymentRequiredError(_response.error.body, _response.rawResponse);
|
|
379
|
+
case 404:
|
|
380
|
+
throw new Forum.NotFoundError(_response.error.body, _response.rawResponse);
|
|
381
|
+
case 429:
|
|
382
|
+
throw new Forum.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
383
|
+
case 500:
|
|
384
|
+
throw new Forum.InternalServerError(_response.error.body, _response.rawResponse);
|
|
385
|
+
default:
|
|
386
|
+
throw new errors.ForumError({
|
|
387
|
+
statusCode: _response.error.statusCode,
|
|
388
|
+
body: _response.error.body,
|
|
389
|
+
rawResponse: _response.rawResponse,
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/private-messages/{id}");
|
|
394
|
+
});
|
|
395
|
+
}
|
|
332
396
|
/**
|
|
333
397
|
* Retrieve a paginated list of replies for Private Message.
|
|
334
398
|
*
|
|
@@ -352,13 +416,10 @@ class PrivateMessagesClient {
|
|
|
352
416
|
return __awaiter(this, void 0, void 0, function* () {
|
|
353
417
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
354
418
|
const { id, cursor, limit } = request;
|
|
355
|
-
const _queryParams = {
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
}
|
|
359
|
-
if (limit != null) {
|
|
360
|
-
_queryParams.limit = limit.toString();
|
|
361
|
-
}
|
|
419
|
+
const _queryParams = {
|
|
420
|
+
cursor,
|
|
421
|
+
limit,
|
|
422
|
+
};
|
|
362
423
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
363
424
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
364
425
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
package/dist/cjs/api/resources/privateMessages/client/requests/UpdatePrivateMessagesRequest.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* id: "id"
|
|
5
|
+
* }
|
|
6
|
+
*/
|
|
7
|
+
export interface UpdatePrivateMessagesRequest {
|
|
8
|
+
/** Private Message ID */
|
|
9
|
+
id: string;
|
|
10
|
+
/** Message content */
|
|
11
|
+
body?: string;
|
|
12
|
+
/** Message status (read, unread, archived) */
|
|
13
|
+
status?: string;
|
|
14
|
+
/** Extended data */
|
|
15
|
+
extendedData?: Record<string, unknown>;
|
|
16
|
+
}
|
|
@@ -6,3 +6,4 @@ export type { ListPrivateMessagesRequest } from "./ListPrivateMessagesRequest.js
|
|
|
6
6
|
export type { ListRepliesPrivateMessagesRequest } from "./ListRepliesPrivateMessagesRequest.js";
|
|
7
7
|
export type { RetrievePrivateMessagesRequest } from "./RetrievePrivateMessagesRequest.js";
|
|
8
8
|
export type { RetrieveReplyPrivateMessagesRequest } from "./RetrieveReplyPrivateMessagesRequest.js";
|
|
9
|
+
export type { UpdatePrivateMessagesRequest } from "./UpdatePrivateMessagesRequest.js";
|