@foru-ms/sdk 2.0.6 → 2.0.7

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.
Files changed (43) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/auth/types/GetAuthMeResponse.d.ts +7 -2
  3. package/dist/cjs/api/resources/auth/types/PostAuthForgotPasswordResponse.d.ts +7 -2
  4. package/dist/cjs/api/resources/auth/types/PostAuthLoginResponse.d.ts +20 -1
  5. package/dist/cjs/api/resources/auth/types/PostAuthRegisterResponse.d.ts +20 -1
  6. package/dist/cjs/api/resources/auth/types/PostAuthResetPasswordResponse.d.ts +6 -1
  7. package/dist/cjs/api/resources/integrations/types/GetIntegrationsResponse.d.ts +35 -32
  8. package/dist/cjs/api/resources/integrations/types/GetIntegrationsResponse.js +15 -12
  9. package/dist/cjs/api/resources/notifications/types/GetNotificationsResponse.d.ts +35 -32
  10. package/dist/cjs/api/resources/posts/types/GetPostsResponse.d.ts +28 -25
  11. package/dist/cjs/api/resources/privateMessages/types/GetPrivateMessagesResponse.d.ts +31 -28
  12. package/dist/cjs/api/resources/reports/types/GetReportsResponse.d.ts +33 -30
  13. package/dist/cjs/api/resources/roles/types/GetRolesResponse.d.ts +27 -24
  14. package/dist/cjs/api/resources/ssOs/types/GetSsoResponse.d.ts +32 -29
  15. package/dist/cjs/api/resources/ssOs/types/GetSsoResponse.js +12 -9
  16. package/dist/cjs/api/resources/tags/types/GetTagsResponse.d.ts +27 -24
  17. package/dist/cjs/api/resources/threads/types/GetThreadsResponse.d.ts +55 -52
  18. package/dist/cjs/api/resources/users/types/GetUsersResponse.d.ts +46 -43
  19. package/dist/cjs/api/resources/webhooks/types/GetWebhooksResponse.d.ts +29 -26
  20. package/dist/cjs/version.d.ts +1 -1
  21. package/dist/cjs/version.js +1 -1
  22. package/dist/esm/BaseClient.mjs +2 -2
  23. package/dist/esm/api/resources/auth/types/GetAuthMeResponse.d.mts +7 -2
  24. package/dist/esm/api/resources/auth/types/PostAuthForgotPasswordResponse.d.mts +7 -2
  25. package/dist/esm/api/resources/auth/types/PostAuthLoginResponse.d.mts +20 -1
  26. package/dist/esm/api/resources/auth/types/PostAuthRegisterResponse.d.mts +20 -1
  27. package/dist/esm/api/resources/auth/types/PostAuthResetPasswordResponse.d.mts +6 -1
  28. package/dist/esm/api/resources/integrations/types/GetIntegrationsResponse.d.mts +35 -32
  29. package/dist/esm/api/resources/integrations/types/GetIntegrationsResponse.mjs +15 -12
  30. package/dist/esm/api/resources/notifications/types/GetNotificationsResponse.d.mts +35 -32
  31. package/dist/esm/api/resources/posts/types/GetPostsResponse.d.mts +28 -25
  32. package/dist/esm/api/resources/privateMessages/types/GetPrivateMessagesResponse.d.mts +31 -28
  33. package/dist/esm/api/resources/reports/types/GetReportsResponse.d.mts +33 -30
  34. package/dist/esm/api/resources/roles/types/GetRolesResponse.d.mts +27 -24
  35. package/dist/esm/api/resources/ssOs/types/GetSsoResponse.d.mts +32 -29
  36. package/dist/esm/api/resources/ssOs/types/GetSsoResponse.mjs +12 -9
  37. package/dist/esm/api/resources/tags/types/GetTagsResponse.d.mts +27 -24
  38. package/dist/esm/api/resources/threads/types/GetThreadsResponse.d.mts +55 -52
  39. package/dist/esm/api/resources/users/types/GetUsersResponse.d.mts +46 -43
  40. package/dist/esm/api/resources/webhooks/types/GetWebhooksResponse.d.mts +29 -26
  41. package/dist/esm/version.d.mts +1 -1
  42. package/dist/esm/version.mjs +1 -1
  43. package/package.json +2 -4
@@ -1,31 +1,34 @@
1
1
  export interface GetTagsResponse {
2
- data: GetTagsResponse.Data.Item[];
3
- meta: GetTagsResponse.Meta;
2
+ data: GetTagsResponse.Data;
4
3
  }
5
4
  export declare namespace GetTagsResponse {
6
- type Data = Data.Item[];
5
+ interface Data {
6
+ items: Data.Items.Item[];
7
+ /** Cursor for next page */
8
+ nextCursor?: string;
9
+ /** Total count of items */
10
+ count: number;
11
+ }
7
12
  namespace Data {
8
- interface Item {
9
- /** Tag name */
10
- name: string;
11
- /** Tag slug (unique identifier) */
12
- slug?: string;
13
- /** Tag description */
14
- description?: string;
15
- /** Hex color code */
16
- color?: string;
17
- /** Extended data */
18
- extendedData?: Record<string, unknown>;
19
- id: string;
20
- /** Tag creation timestamp */
21
- createdAt: string;
22
- /** Tag last update timestamp */
23
- updatedAt: string;
13
+ type Items = Items.Item[];
14
+ namespace Items {
15
+ interface Item {
16
+ /** Tag name */
17
+ name: string;
18
+ /** Tag slug (unique identifier) */
19
+ slug?: string;
20
+ /** Tag description */
21
+ description?: string;
22
+ /** Hex color code */
23
+ color?: string;
24
+ /** Extended data */
25
+ extendedData?: Record<string, unknown>;
26
+ id: string;
27
+ /** Tag creation timestamp */
28
+ createdAt: string;
29
+ /** Tag last update timestamp */
30
+ updatedAt: string;
31
+ }
24
32
  }
25
33
  }
26
- interface Meta {
27
- total: number;
28
- page: number;
29
- limit: number;
30
- }
31
34
  }
@@ -1,64 +1,67 @@
1
1
  export interface GetThreadsResponse {
2
- data: GetThreadsResponse.Data.Item[];
3
- meta: GetThreadsResponse.Meta;
2
+ data: GetThreadsResponse.Data;
4
3
  }
5
4
  export declare namespace GetThreadsResponse {
6
- type Data = Data.Item[];
5
+ interface Data {
6
+ items: Data.Items.Item[];
7
+ /** Cursor for next page */
8
+ nextCursor?: string;
9
+ /** Total count of items */
10
+ count: number;
11
+ }
7
12
  namespace Data {
8
- interface Item {
9
- /** Thread title */
10
- title: string;
11
- /** Thread content (Markdown supported) */
12
- body: string;
13
- /** Author user ID (required for API key auth, ignored for JWT auth) */
14
- userId?: string;
15
- /** List of tag slugs, names, or IDs to attach */
16
- tags?: string[];
17
- /** Poll data */
18
- poll?: Item.Poll;
19
- id: string;
20
- /** URL-friendly identifier */
21
- slug: string | null;
22
- /** Whether thread is locked */
23
- locked: boolean | null;
24
- /** Whether thread is pinned */
25
- pinned: boolean | null;
26
- /** View count */
27
- views: number;
28
- /** Number of posts/replies */
29
- postsCount: number;
30
- /** Timestamp of the last post */
31
- lastPostAt: string | null;
32
- /** Custom metadata */
33
- extendedData: Record<string, unknown> | null;
34
- createdAt: string;
35
- updatedAt: string;
36
- }
37
- namespace Item {
38
- /**
39
- * Poll data
40
- */
41
- interface Poll {
42
- /** Poll title */
13
+ type Items = Items.Item[];
14
+ namespace Items {
15
+ interface Item {
16
+ /** Thread title */
43
17
  title: string;
44
- /** Poll options */
45
- options: Poll.Options.Item[];
18
+ /** Thread content (Markdown supported) */
19
+ body: string;
20
+ /** Author user ID (required for API key auth, ignored for JWT auth) */
21
+ userId?: string;
22
+ /** List of tag slugs, names, or IDs to attach */
23
+ tags?: string[];
24
+ /** Poll data */
25
+ poll?: Item.Poll;
26
+ id: string;
27
+ /** URL-friendly identifier */
28
+ slug: string | null;
29
+ /** Whether thread is locked */
30
+ locked: boolean | null;
31
+ /** Whether thread is pinned */
32
+ pinned: boolean | null;
33
+ /** View count */
34
+ views: number;
35
+ /** Number of posts/replies */
36
+ postsCount: number;
37
+ /** Timestamp of the last post */
38
+ lastPostAt: string | null;
39
+ /** Custom metadata */
40
+ extendedData: Record<string, unknown> | null;
41
+ createdAt: string;
42
+ updatedAt: string;
46
43
  }
47
- namespace Poll {
48
- type Options = Options.Item[];
49
- namespace Options {
50
- interface Item {
51
- title: string;
52
- color?: string;
53
- extendedData?: Record<string, unknown>;
44
+ namespace Item {
45
+ /**
46
+ * Poll data
47
+ */
48
+ interface Poll {
49
+ /** Poll title */
50
+ title: string;
51
+ /** Poll options */
52
+ options: Poll.Options.Item[];
53
+ }
54
+ namespace Poll {
55
+ type Options = Options.Item[];
56
+ namespace Options {
57
+ interface Item {
58
+ title: string;
59
+ color?: string;
60
+ extendedData?: Record<string, unknown>;
61
+ }
54
62
  }
55
63
  }
56
64
  }
57
65
  }
58
66
  }
59
- interface Meta {
60
- total: number;
61
- page: number;
62
- limit: number;
63
- }
64
67
  }
@@ -1,52 +1,55 @@
1
1
  export interface GetUsersResponse {
2
- data: GetUsersResponse.Data.Item[];
3
- meta: GetUsersResponse.Meta;
2
+ data: GetUsersResponse.Data;
4
3
  }
5
4
  export declare namespace GetUsersResponse {
6
- type Data = Data.Item[];
5
+ interface Data {
6
+ items: Data.Items.Item[];
7
+ /** Cursor for next page */
8
+ nextCursor?: string;
9
+ /** Total count of items */
10
+ count: number;
11
+ }
7
12
  namespace Data {
8
- interface Item {
9
- id: string;
10
- username: string;
11
- /** Display name */
12
- displayName: string | null;
13
- /** User bio */
14
- bio: string | null;
15
- /** Forum signature */
16
- signature: string | null;
17
- /** User website URL */
18
- url: string | null;
19
- /** Total posts by user */
20
- postsCount?: number;
21
- /** Total threads by user */
22
- threadsCount?: number;
23
- /** Online status */
24
- isOnline: boolean | null;
25
- /** Last activity timestamp */
26
- lastSeenAt: string | null;
27
- /** User roles */
28
- roles?: Item.Roles.Item[];
29
- /** Custom user data */
30
- extendedData: Record<string, unknown> | null;
31
- /** Account creation timestamp */
32
- createdAt: string;
33
- /** Profile last update timestamp */
34
- updatedAt: string;
35
- }
36
- namespace Item {
37
- type Roles = Roles.Item[];
38
- namespace Roles {
39
- interface Item {
40
- id: string;
41
- name: string;
42
- slug: string | null;
13
+ type Items = Items.Item[];
14
+ namespace Items {
15
+ interface Item {
16
+ id: string;
17
+ username: string;
18
+ /** Display name */
19
+ displayName: string | null;
20
+ /** User bio */
21
+ bio: string | null;
22
+ /** Forum signature */
23
+ signature: string | null;
24
+ /** User website URL */
25
+ url: string | null;
26
+ /** Total posts by user */
27
+ postsCount?: number;
28
+ /** Total threads by user */
29
+ threadsCount?: number;
30
+ /** Online status */
31
+ isOnline: boolean | null;
32
+ /** Last activity timestamp */
33
+ lastSeenAt: string | null;
34
+ /** User roles */
35
+ roles?: Item.Roles.Item[];
36
+ /** Custom user data */
37
+ extendedData: Record<string, unknown> | null;
38
+ /** Account creation timestamp */
39
+ createdAt: string;
40
+ /** Profile last update timestamp */
41
+ updatedAt: string;
42
+ }
43
+ namespace Item {
44
+ type Roles = Roles.Item[];
45
+ namespace Roles {
46
+ interface Item {
47
+ id: string;
48
+ name: string;
49
+ slug: string | null;
50
+ }
43
51
  }
44
52
  }
45
53
  }
46
54
  }
47
- interface Meta {
48
- total: number;
49
- page: number;
50
- limit: number;
51
- }
52
55
  }
@@ -1,33 +1,36 @@
1
1
  export interface GetWebhooksResponse {
2
- data: GetWebhooksResponse.Data.Item[];
3
- meta: GetWebhooksResponse.Meta;
2
+ data: GetWebhooksResponse.Data;
4
3
  }
5
4
  export declare namespace GetWebhooksResponse {
6
- type Data = Data.Item[];
5
+ interface Data {
6
+ items: Data.Items.Item[];
7
+ /** Cursor for next page */
8
+ nextCursor?: string;
9
+ /** Total count of items */
10
+ count: number;
11
+ }
7
12
  namespace Data {
8
- interface Item {
9
- id: string;
10
- /** Webhook name */
11
- name: string;
12
- /** Webhook endpoint URL */
13
- url: string;
14
- /** Event types to trigger on */
15
- events: string[];
16
- /** Whether webhook is active */
17
- active: boolean;
18
- /** Last trigger timestamp */
19
- lastTriggered: string | null;
20
- /** Consecutive failure count */
21
- failureCount: number;
22
- /** Webhook creation timestamp */
23
- createdAt: string;
24
- /** Webhook last update timestamp */
25
- updatedAt: string;
13
+ type Items = Items.Item[];
14
+ namespace Items {
15
+ interface Item {
16
+ id: string;
17
+ /** Webhook name */
18
+ name: string;
19
+ /** Webhook endpoint URL */
20
+ url: string;
21
+ /** Event types to trigger on */
22
+ events: string[];
23
+ /** Whether webhook is active */
24
+ active: boolean;
25
+ /** Last trigger timestamp */
26
+ lastTriggered: string | null;
27
+ /** Consecutive failure count */
28
+ failureCount: number;
29
+ /** Webhook creation timestamp */
30
+ createdAt: string;
31
+ /** Webhook last update timestamp */
32
+ updatedAt: string;
33
+ }
26
34
  }
27
35
  }
28
- interface Meta {
29
- total: number;
30
- page: number;
31
- limit: number;
32
- }
33
36
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "2.0.6";
1
+ export declare const SDK_VERSION = "2.0.7";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "2.0.6";
4
+ exports.SDK_VERSION = "2.0.7";
@@ -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.0.6",
10
- "User-Agent": "@foru-ms/sdk/2.0.6",
9
+ "X-Fern-SDK-Version": "2.0.7",
10
+ "User-Agent": "@foru-ms/sdk/2.0.7",
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);
@@ -1,4 +1,9 @@
1
1
  export interface GetAuthMeResponse {
2
- id: string;
3
- username: string;
2
+ data: GetAuthMeResponse.Data;
3
+ }
4
+ export declare namespace GetAuthMeResponse {
5
+ interface Data {
6
+ id: string;
7
+ username: string;
8
+ }
4
9
  }
@@ -1,4 +1,9 @@
1
1
  export interface PostAuthForgotPasswordResponse {
2
- message: string;
3
- resetToken?: string;
2
+ data: PostAuthForgotPasswordResponse.Data;
3
+ }
4
+ export declare namespace PostAuthForgotPasswordResponse {
5
+ interface Data {
6
+ message: string;
7
+ resetToken?: string;
8
+ }
4
9
  }
@@ -1,3 +1,22 @@
1
1
  export interface PostAuthLoginResponse {
2
- token: string;
2
+ data: PostAuthLoginResponse.Data;
3
+ }
4
+ export declare namespace PostAuthLoginResponse {
5
+ interface Data {
6
+ /** JWT token for authenticated requests */
7
+ token: string;
8
+ /** Authenticated user profile */
9
+ user: Data.User;
10
+ }
11
+ namespace Data {
12
+ /**
13
+ * Authenticated user profile
14
+ */
15
+ interface User {
16
+ id: string;
17
+ username: string;
18
+ email?: string;
19
+ displayName: string | null;
20
+ }
21
+ }
3
22
  }
@@ -1,3 +1,22 @@
1
1
  export interface PostAuthRegisterResponse {
2
- token: string;
2
+ data: PostAuthRegisterResponse.Data;
3
+ }
4
+ export declare namespace PostAuthRegisterResponse {
5
+ interface Data {
6
+ /** JWT token for authenticated requests */
7
+ token: string;
8
+ /** Registered user profile */
9
+ user: Data.User;
10
+ }
11
+ namespace Data {
12
+ /**
13
+ * Registered user profile
14
+ */
15
+ interface User {
16
+ id: string;
17
+ username: string;
18
+ email?: string;
19
+ displayName: string | null;
20
+ }
21
+ }
3
22
  }
@@ -1,3 +1,8 @@
1
1
  export interface PostAuthResetPasswordResponse {
2
- message: string;
2
+ data: PostAuthResetPasswordResponse.Data;
3
+ }
4
+ export declare namespace PostAuthResetPasswordResponse {
5
+ interface Data {
6
+ message: string;
7
+ }
3
8
  }
@@ -1,39 +1,42 @@
1
1
  export interface GetIntegrationsResponse {
2
- data: GetIntegrationsResponse.Data.Item[];
3
- meta: GetIntegrationsResponse.Meta;
2
+ data: GetIntegrationsResponse.Data;
4
3
  }
5
4
  export declare namespace GetIntegrationsResponse {
6
- type Data = Data.Item[];
5
+ interface Data {
6
+ items: Data.Items.Item[];
7
+ /** Cursor for next page */
8
+ nextCursor?: string;
9
+ /** Total count of items */
10
+ count: number;
11
+ }
7
12
  namespace Data {
8
- interface Item {
9
- id: string;
10
- /** Integration type */
11
- type: Item.Type;
12
- /** Integration name */
13
- name: string;
14
- /** Whether integration is active */
15
- active: boolean;
16
- /** Integration creation timestamp */
17
- createdAt: string;
18
- /** Integration last update timestamp */
19
- updatedAt: string;
20
- }
21
- namespace Item {
22
- /** Integration type */
23
- const Type: {
24
- readonly Slack: "SLACK";
25
- readonly Discord: "DISCORD";
26
- readonly Salesforce: "SALESFORCE";
27
- readonly Hubspot: "HUBSPOT";
28
- readonly Okta: "OKTA";
29
- readonly Auth0: "AUTH0";
30
- };
31
- type Type = (typeof Type)[keyof typeof Type];
13
+ type Items = Items.Item[];
14
+ namespace Items {
15
+ interface Item {
16
+ id: string;
17
+ /** Integration type */
18
+ type: Item.Type;
19
+ /** Integration name */
20
+ name: string;
21
+ /** Whether integration is active */
22
+ active: boolean;
23
+ /** Integration creation timestamp */
24
+ createdAt: string;
25
+ /** Integration last update timestamp */
26
+ updatedAt: string;
27
+ }
28
+ namespace Item {
29
+ /** Integration type */
30
+ const Type: {
31
+ readonly Slack: "SLACK";
32
+ readonly Discord: "DISCORD";
33
+ readonly Salesforce: "SALESFORCE";
34
+ readonly Hubspot: "HUBSPOT";
35
+ readonly Okta: "OKTA";
36
+ readonly Auth0: "AUTH0";
37
+ };
38
+ type Type = (typeof Type)[keyof typeof Type];
39
+ }
32
40
  }
33
41
  }
34
- interface Meta {
35
- total: number;
36
- page: number;
37
- limit: number;
38
- }
39
42
  }
@@ -3,17 +3,20 @@ export var GetIntegrationsResponse;
3
3
  (function (GetIntegrationsResponse) {
4
4
  let Data;
5
5
  (function (Data) {
6
- let Item;
7
- (function (Item) {
8
- /** Integration type */
9
- Item.Type = {
10
- Slack: "SLACK",
11
- Discord: "DISCORD",
12
- Salesforce: "SALESFORCE",
13
- Hubspot: "HUBSPOT",
14
- Okta: "OKTA",
15
- Auth0: "AUTH0",
16
- };
17
- })(Item = Data.Item || (Data.Item = {}));
6
+ let Items;
7
+ (function (Items) {
8
+ let Item;
9
+ (function (Item) {
10
+ /** Integration type */
11
+ Item.Type = {
12
+ Slack: "SLACK",
13
+ Discord: "DISCORD",
14
+ Salesforce: "SALESFORCE",
15
+ Hubspot: "HUBSPOT",
16
+ Okta: "OKTA",
17
+ Auth0: "AUTH0",
18
+ };
19
+ })(Item = Items.Item || (Items.Item = {}));
20
+ })(Items = Data.Items || (Data.Items = {}));
18
21
  })(Data = GetIntegrationsResponse.Data || (GetIntegrationsResponse.Data = {}));
19
22
  })(GetIntegrationsResponse || (GetIntegrationsResponse = {}));
@@ -1,39 +1,42 @@
1
1
  export interface GetNotificationsResponse {
2
- data: GetNotificationsResponse.Data.Item[];
3
- meta: GetNotificationsResponse.Meta;
2
+ data: GetNotificationsResponse.Data;
4
3
  }
5
4
  export declare namespace GetNotificationsResponse {
6
- type Data = Data.Item[];
5
+ interface Data {
6
+ items: Data.Items.Item[];
7
+ /** Cursor for next page */
8
+ nextCursor?: string;
9
+ /** Total count of items */
10
+ count: number;
11
+ }
7
12
  namespace Data {
8
- interface Item {
9
- id: string;
10
- /** Recipient user ID */
11
- userId: string;
12
- /** User ID who triggered the notification */
13
- notifierId: string;
14
- /** Notification type */
15
- type: string | null;
16
- /** Notification text content */
17
- description: string | null;
18
- /** Notification status (read, unread, dismissed, archived) */
19
- status: string | null;
20
- /** Related thread ID */
21
- threadId: string | null;
22
- /** Related post ID */
23
- postId: string | null;
24
- /** Related private message ID */
25
- privateMessageId: string | null;
26
- /** Additional notification data */
27
- extendedData: Record<string, unknown> | null;
28
- /** Notification creation timestamp */
29
- createdAt: string;
30
- /** Notification last update timestamp */
31
- updatedAt: string;
13
+ type Items = Items.Item[];
14
+ namespace Items {
15
+ interface Item {
16
+ id: string;
17
+ /** Recipient user ID */
18
+ userId: string;
19
+ /** User ID who triggered the notification */
20
+ notifierId: string;
21
+ /** Notification type */
22
+ type: string | null;
23
+ /** Notification text content */
24
+ description: string | null;
25
+ /** Notification status (read, unread, dismissed, archived) */
26
+ status: string | null;
27
+ /** Related thread ID */
28
+ threadId: string | null;
29
+ /** Related post ID */
30
+ postId: string | null;
31
+ /** Related private message ID */
32
+ privateMessageId: string | null;
33
+ /** Additional notification data */
34
+ extendedData: Record<string, unknown> | null;
35
+ /** Notification creation timestamp */
36
+ createdAt: string;
37
+ /** Notification last update timestamp */
38
+ updatedAt: string;
39
+ }
32
40
  }
33
41
  }
34
- interface Meta {
35
- total: number;
36
- page: number;
37
- limit: number;
38
- }
39
42
  }