@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
|
@@ -12,6 +12,8 @@ export declare namespace WebhookResponse {
|
|
|
12
12
|
events: string[];
|
|
13
13
|
/** Whether webhook is active */
|
|
14
14
|
active: boolean;
|
|
15
|
+
/** Custom extended data */
|
|
16
|
+
extendedData: Record<string, unknown> | null;
|
|
15
17
|
/** Last trigger timestamp */
|
|
16
18
|
lastTriggered: string | null;
|
|
17
19
|
/** Consecutive failure count */
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface WebhookUpdate {
|
|
2
|
+
/** Webhook name */
|
|
3
|
+
name?: string;
|
|
4
|
+
/** Target URL */
|
|
5
|
+
url?: string;
|
|
6
|
+
/** Event types to trigger on */
|
|
7
|
+
events?: string[];
|
|
8
|
+
/** New secret */
|
|
9
|
+
secret?: string;
|
|
10
|
+
/** Enable/disable webhook */
|
|
11
|
+
active?: boolean;
|
|
12
|
+
/** Custom extended data */
|
|
13
|
+
extendedData?: Record<string, unknown>;
|
|
14
|
+
}
|
|
@@ -5,6 +5,7 @@ export * from "./ErrorResponse.js";
|
|
|
5
5
|
export * from "./ForgotPasswordResponse.js";
|
|
6
6
|
export * from "./Integration.js";
|
|
7
7
|
export * from "./IntegrationCreate.js";
|
|
8
|
+
export * from "./IntegrationList.js";
|
|
8
9
|
export * from "./IntegrationListResponse.js";
|
|
9
10
|
export * from "./IntegrationResponse.js";
|
|
10
11
|
export * from "./IntegrationUpdate.js";
|
|
@@ -38,20 +39,27 @@ export * from "./PrivateMessageReplyCreate.js";
|
|
|
38
39
|
export * from "./PrivateMessageReplyListResponse.js";
|
|
39
40
|
export * from "./PrivateMessageReplyResponse.js";
|
|
40
41
|
export * from "./PrivateMessageResponse.js";
|
|
42
|
+
export * from "./PrivateMessageUpdate.js";
|
|
41
43
|
export * from "./RegisterResponse.js";
|
|
42
44
|
export * from "./Report.js";
|
|
43
45
|
export * from "./ReportCreate.js";
|
|
44
46
|
export * from "./ReportList.js";
|
|
45
47
|
export * from "./ReportListResponse.js";
|
|
46
48
|
export * from "./ReportResponse.js";
|
|
49
|
+
export * from "./ReportUpdate.js";
|
|
47
50
|
export * from "./ResetPasswordResponse.js";
|
|
48
51
|
export * from "./Role.js";
|
|
49
52
|
export * from "./RoleCreate.js";
|
|
53
|
+
export * from "./RoleList.js";
|
|
50
54
|
export * from "./RoleListResponse.js";
|
|
51
55
|
export * from "./RoleResponse.js";
|
|
52
56
|
export * from "./RoleUpdate.js";
|
|
57
|
+
export * from "./Search.js";
|
|
58
|
+
export * from "./SearchListResponse.js";
|
|
59
|
+
export * from "./SearchResponse.js";
|
|
53
60
|
export * from "./Sso.js";
|
|
54
61
|
export * from "./SsoCreate.js";
|
|
62
|
+
export * from "./SsoList.js";
|
|
55
63
|
export * from "./SsoListResponse.js";
|
|
56
64
|
export * from "./SsoResponse.js";
|
|
57
65
|
export * from "./SsoUpdate.js";
|
|
@@ -86,6 +94,7 @@ export * from "./ThreadSubscriberListResponse.js";
|
|
|
86
94
|
export * from "./ThreadSubscriberResponse.js";
|
|
87
95
|
export * from "./ThreadUpdate.js";
|
|
88
96
|
export * from "./User.js";
|
|
97
|
+
export * from "./UserCreate.js";
|
|
89
98
|
export * from "./UserFollower.js";
|
|
90
99
|
export * from "./UserFollowerListResponse.js";
|
|
91
100
|
export * from "./UserFollowerResponse.js";
|
|
@@ -104,3 +113,4 @@ export * from "./WebhookDeliveryResponse.js";
|
|
|
104
113
|
export * from "./WebhookList.js";
|
|
105
114
|
export * from "./WebhookListResponse.js";
|
|
106
115
|
export * from "./WebhookResponse.js";
|
|
116
|
+
export * from "./WebhookUpdate.js";
|
|
@@ -21,6 +21,7 @@ __exportStar(require("./ErrorResponse.js"), exports);
|
|
|
21
21
|
__exportStar(require("./ForgotPasswordResponse.js"), exports);
|
|
22
22
|
__exportStar(require("./Integration.js"), exports);
|
|
23
23
|
__exportStar(require("./IntegrationCreate.js"), exports);
|
|
24
|
+
__exportStar(require("./IntegrationList.js"), exports);
|
|
24
25
|
__exportStar(require("./IntegrationListResponse.js"), exports);
|
|
25
26
|
__exportStar(require("./IntegrationResponse.js"), exports);
|
|
26
27
|
__exportStar(require("./IntegrationUpdate.js"), exports);
|
|
@@ -54,20 +55,27 @@ __exportStar(require("./PrivateMessageReplyCreate.js"), exports);
|
|
|
54
55
|
__exportStar(require("./PrivateMessageReplyListResponse.js"), exports);
|
|
55
56
|
__exportStar(require("./PrivateMessageReplyResponse.js"), exports);
|
|
56
57
|
__exportStar(require("./PrivateMessageResponse.js"), exports);
|
|
58
|
+
__exportStar(require("./PrivateMessageUpdate.js"), exports);
|
|
57
59
|
__exportStar(require("./RegisterResponse.js"), exports);
|
|
58
60
|
__exportStar(require("./Report.js"), exports);
|
|
59
61
|
__exportStar(require("./ReportCreate.js"), exports);
|
|
60
62
|
__exportStar(require("./ReportList.js"), exports);
|
|
61
63
|
__exportStar(require("./ReportListResponse.js"), exports);
|
|
62
64
|
__exportStar(require("./ReportResponse.js"), exports);
|
|
65
|
+
__exportStar(require("./ReportUpdate.js"), exports);
|
|
63
66
|
__exportStar(require("./ResetPasswordResponse.js"), exports);
|
|
64
67
|
__exportStar(require("./Role.js"), exports);
|
|
65
68
|
__exportStar(require("./RoleCreate.js"), exports);
|
|
69
|
+
__exportStar(require("./RoleList.js"), exports);
|
|
66
70
|
__exportStar(require("./RoleListResponse.js"), exports);
|
|
67
71
|
__exportStar(require("./RoleResponse.js"), exports);
|
|
68
72
|
__exportStar(require("./RoleUpdate.js"), exports);
|
|
73
|
+
__exportStar(require("./Search.js"), exports);
|
|
74
|
+
__exportStar(require("./SearchListResponse.js"), exports);
|
|
75
|
+
__exportStar(require("./SearchResponse.js"), exports);
|
|
69
76
|
__exportStar(require("./Sso.js"), exports);
|
|
70
77
|
__exportStar(require("./SsoCreate.js"), exports);
|
|
78
|
+
__exportStar(require("./SsoList.js"), exports);
|
|
71
79
|
__exportStar(require("./SsoListResponse.js"), exports);
|
|
72
80
|
__exportStar(require("./SsoResponse.js"), exports);
|
|
73
81
|
__exportStar(require("./SsoUpdate.js"), exports);
|
|
@@ -102,6 +110,7 @@ __exportStar(require("./ThreadSubscriberListResponse.js"), exports);
|
|
|
102
110
|
__exportStar(require("./ThreadSubscriberResponse.js"), exports);
|
|
103
111
|
__exportStar(require("./ThreadUpdate.js"), exports);
|
|
104
112
|
__exportStar(require("./User.js"), exports);
|
|
113
|
+
__exportStar(require("./UserCreate.js"), exports);
|
|
105
114
|
__exportStar(require("./UserFollower.js"), exports);
|
|
106
115
|
__exportStar(require("./UserFollowerListResponse.js"), exports);
|
|
107
116
|
__exportStar(require("./UserFollowerResponse.js"), exports);
|
|
@@ -120,3 +129,4 @@ __exportStar(require("./WebhookDeliveryResponse.js"), exports);
|
|
|
120
129
|
__exportStar(require("./WebhookList.js"), exports);
|
|
121
130
|
__exportStar(require("./WebhookListResponse.js"), exports);
|
|
122
131
|
__exportStar(require("./WebhookResponse.js"), exports);
|
|
132
|
+
__exportStar(require("./WebhookUpdate.js"), exports);
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import * as core from "../core/index.js";
|
|
2
|
-
|
|
3
|
-
interface AuthOptions {
|
|
4
|
-
apiKey: core.Supplier<string>;
|
|
5
|
-
}
|
|
6
|
-
interface Options extends AuthOptions {
|
|
7
|
-
}
|
|
8
|
-
}
|
|
2
|
+
declare const PARAM_KEY: "apiKey";
|
|
9
3
|
export declare class HeaderAuthProvider implements core.AuthProvider {
|
|
10
|
-
private readonly
|
|
4
|
+
private readonly options;
|
|
11
5
|
constructor(options: HeaderAuthProvider.Options);
|
|
12
|
-
static canCreate(options: HeaderAuthProvider.Options): boolean;
|
|
13
|
-
getAuthRequest(
|
|
6
|
+
static canCreate(options: Partial<HeaderAuthProvider.Options>): boolean;
|
|
7
|
+
getAuthRequest({ endpointMetadata, }?: {
|
|
14
8
|
endpointMetadata?: core.EndpointMetadata;
|
|
15
9
|
}): Promise<core.AuthRequest>;
|
|
16
10
|
}
|
|
11
|
+
export declare namespace HeaderAuthProvider {
|
|
12
|
+
const AUTH_SCHEME: "ApiKeyAuth";
|
|
13
|
+
const AUTH_CONFIG_ERROR_MESSAGE: string;
|
|
14
|
+
type Options = AuthOptions;
|
|
15
|
+
type AuthOptions = {
|
|
16
|
+
[PARAM_KEY]?: core.Supplier<string>;
|
|
17
|
+
};
|
|
18
|
+
function createInstance(options: Options): core.AuthProvider;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -46,26 +46,35 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
46
46
|
exports.HeaderAuthProvider = void 0;
|
|
47
47
|
const core = __importStar(require("../core/index.js"));
|
|
48
48
|
const errors = __importStar(require("../errors/index.js"));
|
|
49
|
+
const PARAM_KEY = "apiKey";
|
|
50
|
+
const HEADER_NAME = "x-api-key";
|
|
49
51
|
class HeaderAuthProvider {
|
|
50
52
|
constructor(options) {
|
|
51
|
-
this.
|
|
53
|
+
this.options = options;
|
|
52
54
|
}
|
|
53
55
|
static canCreate(options) {
|
|
54
|
-
return options
|
|
56
|
+
return (options === null || options === void 0 ? void 0 : options[PARAM_KEY]) != null;
|
|
55
57
|
}
|
|
56
|
-
getAuthRequest(
|
|
57
|
-
return __awaiter(this,
|
|
58
|
-
const
|
|
59
|
-
if (
|
|
58
|
+
getAuthRequest() {
|
|
59
|
+
return __awaiter(this, arguments, void 0, function* ({ endpointMetadata, } = {}) {
|
|
60
|
+
const headerValue = yield core.Supplier.get(this.options[PARAM_KEY]);
|
|
61
|
+
if (headerValue == null) {
|
|
60
62
|
throw new errors.ForumError({
|
|
61
|
-
message:
|
|
63
|
+
message: HeaderAuthProvider.AUTH_CONFIG_ERROR_MESSAGE,
|
|
62
64
|
});
|
|
63
65
|
}
|
|
64
|
-
const headerValue = apiKey;
|
|
65
66
|
return {
|
|
66
|
-
headers: {
|
|
67
|
+
headers: { [HEADER_NAME]: headerValue },
|
|
67
68
|
};
|
|
68
69
|
});
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
72
|
exports.HeaderAuthProvider = HeaderAuthProvider;
|
|
73
|
+
(function (HeaderAuthProvider) {
|
|
74
|
+
HeaderAuthProvider.AUTH_SCHEME = "ApiKeyAuth";
|
|
75
|
+
HeaderAuthProvider.AUTH_CONFIG_ERROR_MESSAGE = `Please provide '${PARAM_KEY}' when initializing the client`;
|
|
76
|
+
function createInstance(options) {
|
|
77
|
+
return new HeaderAuthProvider(options);
|
|
78
|
+
}
|
|
79
|
+
HeaderAuthProvider.createInstance = createInstance;
|
|
80
|
+
})(HeaderAuthProvider || (exports.HeaderAuthProvider = HeaderAuthProvider = {}));
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { EndpointMetadata } from "./EndpointMetadata.js";
|
|
2
2
|
import type { Supplier } from "./Supplier.js";
|
|
3
3
|
type EndpointSupplierFn<T> = (arg: {
|
|
4
|
-
endpointMetadata
|
|
4
|
+
endpointMetadata?: EndpointMetadata;
|
|
5
5
|
}) => T | Promise<T>;
|
|
6
6
|
export type EndpointSupplier<T> = Supplier<T> | EndpointSupplierFn<T>;
|
|
7
7
|
export declare const EndpointSupplier: {
|
|
8
8
|
get: <T>(supplier: EndpointSupplier<T>, arg: {
|
|
9
|
-
endpointMetadata
|
|
9
|
+
endpointMetadata?: EndpointMetadata;
|
|
10
10
|
}) => Promise<T>;
|
|
11
11
|
};
|
|
12
12
|
export {};
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { type LogConfig, type Logger } from "../logging/logger.js";
|
|
2
2
|
import type { APIResponse } from "./APIResponse.js";
|
|
3
3
|
import type { EndpointMetadata } from "./EndpointMetadata.js";
|
|
4
|
-
import { EndpointSupplier } from "./EndpointSupplier.js";
|
|
5
4
|
export type FetchFunction = <R = unknown>(args: Fetcher.Args) => Promise<APIResponse<R, Fetcher.Error>>;
|
|
6
5
|
export declare namespace Fetcher {
|
|
7
6
|
interface Args {
|
|
8
7
|
url: string;
|
|
9
8
|
method: string;
|
|
10
9
|
contentType?: string;
|
|
11
|
-
headers?: Record<string,
|
|
10
|
+
headers?: Record<string, unknown>;
|
|
12
11
|
queryParameters?: Record<string, unknown>;
|
|
13
12
|
body?: unknown;
|
|
14
13
|
timeoutMs?: number;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function mergeHeaders
|
|
2
|
-
export declare function mergeOnlyDefinedHeaders
|
|
1
|
+
export declare function mergeHeaders(...headersArray: (Record<string, unknown> | null | undefined)[]): Record<string, unknown>;
|
|
2
|
+
export declare function mergeOnlyDefinedHeaders(...headersArray: (Record<string, unknown> | null | undefined)[]): Record<string, unknown>;
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.
|
|
1
|
+
export declare const SDK_VERSION = "2.1.1";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "@foru-ms/sdk",
|
|
9
|
-
"X-Fern-SDK-Version": "2.
|
|
10
|
-
"User-Agent": "@foru-ms/sdk/2.
|
|
9
|
+
"X-Fern-SDK-Version": "2.1.1",
|
|
10
|
+
"User-Agent": "@foru-ms/sdk/2.1.1",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
package/dist/esm/Client.d.mts
CHANGED
|
@@ -5,6 +5,7 @@ import { PostsClient } from "./api/resources/posts/client/Client.mjs";
|
|
|
5
5
|
import { PrivateMessagesClient } from "./api/resources/privateMessages/client/Client.mjs";
|
|
6
6
|
import { ReportsClient } from "./api/resources/reports/client/Client.mjs";
|
|
7
7
|
import { RolesClient } from "./api/resources/roles/client/Client.mjs";
|
|
8
|
+
import { SearchClient } from "./api/resources/search/client/Client.mjs";
|
|
8
9
|
import { SsOsClient } from "./api/resources/ssOs/client/Client.mjs";
|
|
9
10
|
import { TagsClient } from "./api/resources/tags/client/Client.mjs";
|
|
10
11
|
import { ThreadsClient } from "./api/resources/threads/client/Client.mjs";
|
|
@@ -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/esm/Client.mjs
CHANGED
|
@@ -6,6 +6,7 @@ import { PostsClient } from "./api/resources/posts/client/Client.mjs";
|
|
|
6
6
|
import { PrivateMessagesClient } from "./api/resources/privateMessages/client/Client.mjs";
|
|
7
7
|
import { ReportsClient } from "./api/resources/reports/client/Client.mjs";
|
|
8
8
|
import { RolesClient } from "./api/resources/roles/client/Client.mjs";
|
|
9
|
+
import { SearchClient } from "./api/resources/search/client/Client.mjs";
|
|
9
10
|
import { SsOsClient } from "./api/resources/ssOs/client/Client.mjs";
|
|
10
11
|
import { TagsClient } from "./api/resources/tags/client/Client.mjs";
|
|
11
12
|
import { ThreadsClient } from "./api/resources/threads/client/Client.mjs";
|
|
@@ -13,13 +14,17 @@ import { UsersClient } from "./api/resources/users/client/Client.mjs";
|
|
|
13
14
|
import { WebhooksClient } from "./api/resources/webhooks/client/Client.mjs";
|
|
14
15
|
import { normalizeClientOptionsWithAuth } from "./BaseClient.mjs";
|
|
15
16
|
export class ForumClient {
|
|
16
|
-
constructor(options) {
|
|
17
|
+
constructor(options = {}) {
|
|
17
18
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
18
19
|
}
|
|
19
20
|
get auth() {
|
|
20
21
|
var _a;
|
|
21
22
|
return ((_a = this._auth) !== null && _a !== void 0 ? _a : (this._auth = new AuthClient(this._options)));
|
|
22
23
|
}
|
|
24
|
+
get search() {
|
|
25
|
+
var _a;
|
|
26
|
+
return ((_a = this._search) !== null && _a !== void 0 ? _a : (this._search = new SearchClient(this._options)));
|
|
27
|
+
}
|
|
23
28
|
get tags() {
|
|
24
29
|
var _a;
|
|
25
30
|
return ((_a = this._tags) !== null && _a !== void 0 ? _a : (this._tags = new TagsClient(this._options)));
|
|
@@ -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
|
*
|
|
@@ -14,9 +14,12 @@ export * as privateMessages from "./privateMessages/index.mjs";
|
|
|
14
14
|
export * from "./privateMessages/types/index.mjs";
|
|
15
15
|
export * from "./reports/client/requests/index.mjs";
|
|
16
16
|
export * as reports from "./reports/index.mjs";
|
|
17
|
+
export * from "./reports/types/index.mjs";
|
|
17
18
|
export * from "./roles/client/requests/index.mjs";
|
|
18
19
|
export * as roles from "./roles/index.mjs";
|
|
19
20
|
export * from "./roles/types/index.mjs";
|
|
21
|
+
export * as search from "./search/index.mjs";
|
|
22
|
+
export * from "./search/types/index.mjs";
|
|
20
23
|
export * from "./ssOs/client/requests/index.mjs";
|
|
21
24
|
export * as ssOs from "./ssOs/index.mjs";
|
|
22
25
|
export * from "./ssOs/types/index.mjs";
|
|
@@ -14,9 +14,12 @@ export * as privateMessages from "./privateMessages/index.mjs";
|
|
|
14
14
|
export * from "./privateMessages/types/index.mjs";
|
|
15
15
|
export * from "./reports/client/requests/index.mjs";
|
|
16
16
|
export * as reports from "./reports/index.mjs";
|
|
17
|
+
export * from "./reports/types/index.mjs";
|
|
17
18
|
export * from "./roles/client/requests/index.mjs";
|
|
18
19
|
export * as roles from "./roles/index.mjs";
|
|
19
20
|
export * from "./roles/types/index.mjs";
|
|
21
|
+
export * as search from "./search/index.mjs";
|
|
22
|
+
export * from "./search/types/index.mjs";
|
|
20
23
|
export * from "./ssOs/client/requests/index.mjs";
|
|
21
24
|
export * as ssOs from "./ssOs/index.mjs";
|
|
22
25
|
export * from "./ssOs/types/index.mjs";
|
|
@@ -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
|
*
|
|
@@ -30,7 +30,7 @@ import * as Forum from "../../../index.mjs";
|
|
|
30
30
|
* Operations for integrations
|
|
31
31
|
*/
|
|
32
32
|
export class IntegrationsClient {
|
|
33
|
-
constructor(options) {
|
|
33
|
+
constructor(options = {}) {
|
|
34
34
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
@@ -55,14 +55,11 @@ export class IntegrationsClient {
|
|
|
55
55
|
__list() {
|
|
56
56
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
57
57
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
58
|
-
const {
|
|
59
|
-
const _queryParams = {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
if (limit != null) {
|
|
64
|
-
_queryParams.limit = limit.toString();
|
|
65
|
-
}
|
|
58
|
+
const { limit, cursor } = request;
|
|
59
|
+
const _queryParams = {
|
|
60
|
+
limit,
|
|
61
|
+
cursor,
|
|
62
|
+
};
|
|
66
63
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
67
64
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
68
65
|
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
|
*
|
|
@@ -30,7 +30,7 @@ import * as Forum from "../../../index.mjs";
|
|
|
30
30
|
* Operations for notifications
|
|
31
31
|
*/
|
|
32
32
|
export class NotificationsClient {
|
|
33
|
-
constructor(options) {
|
|
33
|
+
constructor(options = {}) {
|
|
34
34
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
@@ -54,19 +54,12 @@ export class NotificationsClient {
|
|
|
54
54
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
55
55
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
56
56
|
const { limit, cursor, status, userId } = request;
|
|
57
|
-
const _queryParams = {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
if (status != null) {
|
|
65
|
-
_queryParams.status = status;
|
|
66
|
-
}
|
|
67
|
-
if (userId != null) {
|
|
68
|
-
_queryParams.userId = userId;
|
|
69
|
-
}
|
|
57
|
+
const _queryParams = {
|
|
58
|
+
limit,
|
|
59
|
+
cursor,
|
|
60
|
+
status: status != null ? status : undefined,
|
|
61
|
+
userId,
|
|
62
|
+
};
|
|
70
63
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
71
64
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
72
65
|
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.mjs";
|
|
2
2
|
export type { DeleteNotificationsRequest } from "./DeleteNotificationsRequest.mjs";
|
|
3
3
|
export type { ListNotificationsRequest } from "./ListNotificationsRequest.mjs";
|
|
4
4
|
export type { RetrieveNotificationsRequest } from "./RetrieveNotificationsRequest.mjs";
|
|
5
|
-
export
|
|
5
|
+
export { UpdateNotificationsRequest } from "./UpdateNotificationsRequest.mjs";
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export { CreateNotificationsRequest } from "./CreateNotificationsRequest.mjs";
|
|
2
|
+
export { UpdateNotificationsRequest } from "./UpdateNotificationsRequest.mjs";
|
|
@@ -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
|
*
|
|
@@ -30,7 +30,7 @@ import * as Forum from "../../../index.mjs";
|
|
|
30
30
|
* Operations for posts
|
|
31
31
|
*/
|
|
32
32
|
export class PostsClient {
|
|
33
|
-
constructor(options) {
|
|
33
|
+
constructor(options = {}) {
|
|
34
34
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
@@ -54,25 +54,14 @@ export class PostsClient {
|
|
|
54
54
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
55
55
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
56
56
|
const { limit, cursor, userId, sort, search, type: type_ } = request;
|
|
57
|
-
const _queryParams = {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
_queryParams.userId = userId;
|
|
66
|
-
}
|
|
67
|
-
if (sort != null) {
|
|
68
|
-
_queryParams.sort = sort;
|
|
69
|
-
}
|
|
70
|
-
if (search != null) {
|
|
71
|
-
_queryParams.search = search;
|
|
72
|
-
}
|
|
73
|
-
if (type_ != null) {
|
|
74
|
-
_queryParams.type = type_;
|
|
75
|
-
}
|
|
57
|
+
const _queryParams = {
|
|
58
|
+
limit,
|
|
59
|
+
cursor,
|
|
60
|
+
userId,
|
|
61
|
+
sort: sort != null ? sort : undefined,
|
|
62
|
+
search,
|
|
63
|
+
type: type_ != null ? type_ : undefined,
|
|
64
|
+
};
|
|
76
65
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
77
66
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
78
67
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
@@ -394,16 +383,11 @@ export class PostsClient {
|
|
|
394
383
|
return __awaiter(this, void 0, void 0, function* () {
|
|
395
384
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
396
385
|
const { id, limit, cursor, type: type_ } = request;
|
|
397
|
-
const _queryParams = {
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
_queryParams.cursor = cursor;
|
|
403
|
-
}
|
|
404
|
-
if (type_ != null) {
|
|
405
|
-
_queryParams.type = type_;
|
|
406
|
-
}
|
|
386
|
+
const _queryParams = {
|
|
387
|
+
limit,
|
|
388
|
+
cursor,
|
|
389
|
+
type: type_ != null ? type_ : undefined,
|
|
390
|
+
};
|
|
407
391
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
408
392
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
409
393
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
@@ -649,25 +633,14 @@ export class PostsClient {
|
|
|
649
633
|
return __awaiter(this, void 0, void 0, function* () {
|
|
650
634
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
651
635
|
const { id, limit, cursor, userId, sort, search, type: type_ } = request;
|
|
652
|
-
const _queryParams = {
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
_queryParams.userId = userId;
|
|
661
|
-
}
|
|
662
|
-
if (sort != null) {
|
|
663
|
-
_queryParams.sort = sort;
|
|
664
|
-
}
|
|
665
|
-
if (search != null) {
|
|
666
|
-
_queryParams.search = search;
|
|
667
|
-
}
|
|
668
|
-
if (type_ != null) {
|
|
669
|
-
_queryParams.type = type_;
|
|
670
|
-
}
|
|
636
|
+
const _queryParams = {
|
|
637
|
+
limit,
|
|
638
|
+
cursor,
|
|
639
|
+
userId,
|
|
640
|
+
sort: sort != null ? sort : undefined,
|
|
641
|
+
search,
|
|
642
|
+
type: type_ != null ? type_ : undefined,
|
|
643
|
+
};
|
|
671
644
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
672
645
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
673
646
|
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.mjs";
|
|
2
|
-
export
|
|
2
|
+
export { CreateReactionPostsRequest } from "./CreateReactionPostsRequest.mjs";
|
|
3
3
|
export type { DeletePostPostsRequest } from "./DeletePostPostsRequest.mjs";
|
|
4
4
|
export type { DeletePostsRequest } from "./DeletePostsRequest.mjs";
|
|
5
5
|
export type { DeleteReactionPostsRequest } from "./DeleteReactionPostsRequest.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export { CreateReactionPostsRequest } from "./CreateReactionPostsRequest.mjs";
|