@recursiv/sdk 0.2.0

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 (208) hide show
  1. package/LICENSE +105 -0
  2. package/README.md +331 -0
  3. package/dist/client.d.ts +22 -0
  4. package/dist/client.d.ts.map +1 -0
  5. package/dist/client.js +192 -0
  6. package/dist/client.js.map +1 -0
  7. package/dist/errors.d.ts +29 -0
  8. package/dist/errors.d.ts.map +1 -0
  9. package/dist/errors.js +60 -0
  10. package/dist/errors.js.map +1 -0
  11. package/dist/index.d.ts +148 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +184 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/lib/sse.d.ts +6 -0
  16. package/dist/lib/sse.d.ts.map +1 -0
  17. package/dist/lib/sse.js +52 -0
  18. package/dist/lib/sse.js.map +1 -0
  19. package/dist/lib/webhooks.d.ts +41 -0
  20. package/dist/lib/webhooks.d.ts.map +1 -0
  21. package/dist/lib/webhooks.js +91 -0
  22. package/dist/lib/webhooks.js.map +1 -0
  23. package/dist/react/index.d.ts +2 -0
  24. package/dist/react/index.d.ts.map +1 -0
  25. package/dist/react/index.js +2 -0
  26. package/dist/react/index.js.map +1 -0
  27. package/dist/react/useChat.d.ts +26 -0
  28. package/dist/react/useChat.d.ts.map +1 -0
  29. package/dist/react/useChat.js +111 -0
  30. package/dist/react/useChat.js.map +1 -0
  31. package/dist/realtime.d.ts +67 -0
  32. package/dist/realtime.d.ts.map +1 -0
  33. package/dist/realtime.js +104 -0
  34. package/dist/realtime.js.map +1 -0
  35. package/dist/resources/admin.d.ts +287 -0
  36. package/dist/resources/admin.d.ts.map +1 -0
  37. package/dist/resources/admin.js +110 -0
  38. package/dist/resources/admin.js.map +1 -0
  39. package/dist/resources/agents.d.ts +136 -0
  40. package/dist/resources/agents.d.ts.map +1 -0
  41. package/dist/resources/agents.js +113 -0
  42. package/dist/resources/agents.js.map +1 -0
  43. package/dist/resources/auth.d.ts +68 -0
  44. package/dist/resources/auth.d.ts.map +1 -0
  45. package/dist/resources/auth.js +231 -0
  46. package/dist/resources/auth.js.map +1 -0
  47. package/dist/resources/billing.d.ts +143 -0
  48. package/dist/resources/billing.d.ts.map +1 -0
  49. package/dist/resources/billing.js +55 -0
  50. package/dist/resources/billing.js.map +1 -0
  51. package/dist/resources/brain.d.ts +26 -0
  52. package/dist/resources/brain.d.ts.map +1 -0
  53. package/dist/resources/brain.js +11 -0
  54. package/dist/resources/brain.js.map +1 -0
  55. package/dist/resources/chat.d.ts +52 -0
  56. package/dist/resources/chat.d.ts.map +1 -0
  57. package/dist/resources/chat.js +59 -0
  58. package/dist/resources/chat.js.map +1 -0
  59. package/dist/resources/commands.d.ts +41 -0
  60. package/dist/resources/commands.d.ts.map +1 -0
  61. package/dist/resources/commands.js +15 -0
  62. package/dist/resources/commands.js.map +1 -0
  63. package/dist/resources/communities.d.ts +19 -0
  64. package/dist/resources/communities.d.ts.map +1 -0
  65. package/dist/resources/communities.js +31 -0
  66. package/dist/resources/communities.js.map +1 -0
  67. package/dist/resources/databases.d.ts +58 -0
  68. package/dist/resources/databases.d.ts.map +1 -0
  69. package/dist/resources/databases.js +27 -0
  70. package/dist/resources/databases.js.map +1 -0
  71. package/dist/resources/deployments.d.ts +57 -0
  72. package/dist/resources/deployments.d.ts.map +1 -0
  73. package/dist/resources/deployments.js +31 -0
  74. package/dist/resources/deployments.js.map +1 -0
  75. package/dist/resources/dispatcher.d.ts +330 -0
  76. package/dist/resources/dispatcher.d.ts.map +1 -0
  77. package/dist/resources/dispatcher.js +155 -0
  78. package/dist/resources/dispatcher.js.map +1 -0
  79. package/dist/resources/email.d.ts +136 -0
  80. package/dist/resources/email.d.ts.map +1 -0
  81. package/dist/resources/email.js +51 -0
  82. package/dist/resources/email.js.map +1 -0
  83. package/dist/resources/free-tier.d.ts +59 -0
  84. package/dist/resources/free-tier.d.ts.map +1 -0
  85. package/dist/resources/free-tier.js +27 -0
  86. package/dist/resources/free-tier.js.map +1 -0
  87. package/dist/resources/github.d.ts +55 -0
  88. package/dist/resources/github.d.ts.map +1 -0
  89. package/dist/resources/github.js +23 -0
  90. package/dist/resources/github.js.map +1 -0
  91. package/dist/resources/inbox.d.ts +13 -0
  92. package/dist/resources/inbox.d.ts.map +1 -0
  93. package/dist/resources/inbox.js +11 -0
  94. package/dist/resources/inbox.js.map +1 -0
  95. package/dist/resources/integrations.d.ts +158 -0
  96. package/dist/resources/integrations.d.ts.map +1 -0
  97. package/dist/resources/integrations.js +78 -0
  98. package/dist/resources/integrations.js.map +1 -0
  99. package/dist/resources/invite-codes-admin.d.ts +69 -0
  100. package/dist/resources/invite-codes-admin.d.ts.map +1 -0
  101. package/dist/resources/invite-codes-admin.js +31 -0
  102. package/dist/resources/invite-codes-admin.js.map +1 -0
  103. package/dist/resources/invite-codes.d.ts +166 -0
  104. package/dist/resources/invite-codes.d.ts.map +1 -0
  105. package/dist/resources/invite-codes.js +69 -0
  106. package/dist/resources/invite-codes.js.map +1 -0
  107. package/dist/resources/jobs.d.ts +40 -0
  108. package/dist/resources/jobs.d.ts.map +1 -0
  109. package/dist/resources/jobs.js +23 -0
  110. package/dist/resources/jobs.js.map +1 -0
  111. package/dist/resources/media.d.ts +21 -0
  112. package/dist/resources/media.d.ts.map +1 -0
  113. package/dist/resources/media.js +11 -0
  114. package/dist/resources/media.js.map +1 -0
  115. package/dist/resources/memory.d.ts +116 -0
  116. package/dist/resources/memory.d.ts.map +1 -0
  117. package/dist/resources/memory.js +57 -0
  118. package/dist/resources/memory.js.map +1 -0
  119. package/dist/resources/network.d.ts +24 -0
  120. package/dist/resources/network.d.ts.map +1 -0
  121. package/dist/resources/network.js +11 -0
  122. package/dist/resources/network.js.map +1 -0
  123. package/dist/resources/notifications.d.ts +11 -0
  124. package/dist/resources/notifications.d.ts.map +1 -0
  125. package/dist/resources/notifications.js +36 -0
  126. package/dist/resources/notifications.js.map +1 -0
  127. package/dist/resources/organization-security.d.ts +29 -0
  128. package/dist/resources/organization-security.d.ts.map +1 -0
  129. package/dist/resources/organization-security.js +15 -0
  130. package/dist/resources/organization-security.js.map +1 -0
  131. package/dist/resources/organization-settings.d.ts +80 -0
  132. package/dist/resources/organization-settings.d.ts.map +1 -0
  133. package/dist/resources/organization-settings.js +35 -0
  134. package/dist/resources/organization-settings.js.map +1 -0
  135. package/dist/resources/organizations.d.ts +73 -0
  136. package/dist/resources/organizations.d.ts.map +1 -0
  137. package/dist/resources/organizations.js +63 -0
  138. package/dist/resources/organizations.js.map +1 -0
  139. package/dist/resources/posts.d.ts +28 -0
  140. package/dist/resources/posts.d.ts.map +1 -0
  141. package/dist/resources/posts.js +39 -0
  142. package/dist/resources/posts.js.map +1 -0
  143. package/dist/resources/profiles.d.ts +45 -0
  144. package/dist/resources/profiles.d.ts.map +1 -0
  145. package/dist/resources/profiles.js +55 -0
  146. package/dist/resources/profiles.js.map +1 -0
  147. package/dist/resources/project-brain.d.ts +239 -0
  148. package/dist/resources/project-brain.d.ts.map +1 -0
  149. package/dist/resources/project-brain.js +83 -0
  150. package/dist/resources/project-brain.js.map +1 -0
  151. package/dist/resources/projects.d.ts +37 -0
  152. package/dist/resources/projects.d.ts.map +1 -0
  153. package/dist/resources/projects.js +55 -0
  154. package/dist/resources/projects.js.map +1 -0
  155. package/dist/resources/protocols.d.ts +66 -0
  156. package/dist/resources/protocols.d.ts.map +1 -0
  157. package/dist/resources/protocols.js +31 -0
  158. package/dist/resources/protocols.js.map +1 -0
  159. package/dist/resources/sandbox.d.ts +12 -0
  160. package/dist/resources/sandbox.d.ts.map +1 -0
  161. package/dist/resources/sandbox.js +14 -0
  162. package/dist/resources/sandbox.js.map +1 -0
  163. package/dist/resources/settings.d.ts +52 -0
  164. package/dist/resources/settings.d.ts.map +1 -0
  165. package/dist/resources/settings.js +66 -0
  166. package/dist/resources/settings.js.map +1 -0
  167. package/dist/resources/simulator.d.ts +20 -0
  168. package/dist/resources/simulator.d.ts.map +1 -0
  169. package/dist/resources/simulator.js +23 -0
  170. package/dist/resources/simulator.js.map +1 -0
  171. package/dist/resources/storage.d.ts +82 -0
  172. package/dist/resources/storage.d.ts.map +1 -0
  173. package/dist/resources/storage.js +43 -0
  174. package/dist/resources/storage.js.map +1 -0
  175. package/dist/resources/swarms.d.ts +98 -0
  176. package/dist/resources/swarms.d.ts.map +1 -0
  177. package/dist/resources/swarms.js +53 -0
  178. package/dist/resources/swarms.js.map +1 -0
  179. package/dist/resources/tags.d.ts +19 -0
  180. package/dist/resources/tags.d.ts.map +1 -0
  181. package/dist/resources/tags.js +23 -0
  182. package/dist/resources/tags.js.map +1 -0
  183. package/dist/resources/templates.d.ts +62 -0
  184. package/dist/resources/templates.d.ts.map +1 -0
  185. package/dist/resources/templates.js +36 -0
  186. package/dist/resources/templates.js.map +1 -0
  187. package/dist/resources/uploads.d.ts +43 -0
  188. package/dist/resources/uploads.d.ts.map +1 -0
  189. package/dist/resources/uploads.js +39 -0
  190. package/dist/resources/uploads.js.map +1 -0
  191. package/dist/resources/users.d.ts +15 -0
  192. package/dist/resources/users.d.ts.map +1 -0
  193. package/dist/resources/users.js +23 -0
  194. package/dist/resources/users.js.map +1 -0
  195. package/dist/resources/wallet.d.ts +57 -0
  196. package/dist/resources/wallet.d.ts.map +1 -0
  197. package/dist/resources/wallet.js +43 -0
  198. package/dist/resources/wallet.js.map +1 -0
  199. package/dist/resources/webhooks.d.ts +29 -0
  200. package/dist/resources/webhooks.d.ts.map +1 -0
  201. package/dist/resources/webhooks.js +19 -0
  202. package/dist/resources/webhooks.js.map +1 -0
  203. package/dist/types.d.ts +703 -0
  204. package/dist/types.d.ts.map +1 -0
  205. package/dist/types.js +3 -0
  206. package/dist/types.js.map +1 -0
  207. package/llm.md +532 -0
  208. package/package.json +62 -0
@@ -0,0 +1,29 @@
1
+ import type { HttpClient } from '../client.js';
2
+ import type { SingleResponse } from '../types.js';
3
+ export interface SecurityPolicy {
4
+ require_two_factor: boolean;
5
+ two_factor_grace_period_days: number;
6
+ session_timeout_minutes: number | null;
7
+ idle_timeout_minutes: number | null;
8
+ ip_allowlist: string[];
9
+ ip_allowlist_enabled: boolean;
10
+ }
11
+ export interface UpdateSecurityPolicyInput {
12
+ require_two_factor?: boolean;
13
+ two_factor_grace_period_days?: number;
14
+ session_timeout_minutes?: number | null;
15
+ idle_timeout_minutes?: number | null;
16
+ ip_allowlist?: string[];
17
+ ip_allowlist_enabled?: boolean;
18
+ }
19
+ export declare class OrganizationSecurityResource {
20
+ private client;
21
+ constructor(client: HttpClient);
22
+ /** Get organization security policy */
23
+ get(organizationId: string): Promise<SingleResponse<SecurityPolicy>>;
24
+ /** Update organization security policy */
25
+ update(organizationId: string, input: UpdateSecurityPolicyInput): Promise<SingleResponse<{
26
+ success: true;
27
+ }>>;
28
+ }
29
+ //# sourceMappingURL=organization-security.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organization-security.d.ts","sourceRoot":"","sources":["../../src/resources/organization-security.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAIlD,MAAM,WAAW,cAAc;IAC7B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,4BAA4B,EAAE,MAAM,CAAC;IACrC,uBAAuB,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,oBAAoB,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,WAAW,yBAAyB;IACxC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,uBAAuB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,qBAAa,4BAA4B;IAC3B,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,UAAU;IAEtC,uCAAuC;IACvC,GAAG,CACD,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;IAM1C,0CAA0C;IAC1C,MAAM,CACJ,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,yBAAyB,GAC/B,OAAO,CAAC,cAAc,CAAC;QAAE,OAAO,EAAE,IAAI,CAAA;KAAE,CAAC,CAAC;CAM9C"}
@@ -0,0 +1,15 @@
1
+ export class OrganizationSecurityResource {
2
+ client;
3
+ constructor(client) {
4
+ this.client = client;
5
+ }
6
+ /** Get organization security policy */
7
+ get(organizationId) {
8
+ return this.client.get(`/organization-security/${organizationId}/security`);
9
+ }
10
+ /** Update organization security policy */
11
+ update(organizationId, input) {
12
+ return this.client.put(`/organization-security/${organizationId}/security`, input);
13
+ }
14
+ }
15
+ //# sourceMappingURL=organization-security.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organization-security.js","sourceRoot":"","sources":["../../src/resources/organization-security.ts"],"names":[],"mappings":"AAuBA,MAAM,OAAO,4BAA4B;IACnB;IAApB,YAAoB,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAG,CAAC;IAE1C,uCAAuC;IACvC,GAAG,CACD,cAAsB;QAEtB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CACpB,0BAA0B,cAAc,WAAW,CACpD,CAAC;IACJ,CAAC;IAED,0CAA0C;IAC1C,MAAM,CACJ,cAAsB,EACtB,KAAgC;QAEhC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CACpB,0BAA0B,cAAc,WAAW,EACnD,KAAK,CACN,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,80 @@
1
+ import type { HttpClient } from '../client.js';
2
+ import type { SingleResponse } from '../types.js';
3
+ export interface OrganizationSettingsData {
4
+ id: string;
5
+ organization_id: string;
6
+ default_template_url: string | null;
7
+ default_template_type: string | null;
8
+ global_content_enabled: boolean;
9
+ preferred_contact_email: string | null;
10
+ github_connected: boolean;
11
+ github_owner: string | null;
12
+ github_connected_at: string | null;
13
+ created_at: string;
14
+ updated_at: string;
15
+ }
16
+ export interface SetDefaultTemplateInput {
17
+ template_url: string | null;
18
+ }
19
+ export interface DefaultTemplateResult {
20
+ id: string;
21
+ organization_id: string;
22
+ default_template_url: string | null;
23
+ default_template_type: string | null;
24
+ updated_at: string;
25
+ }
26
+ export interface SetGlobalContentInput {
27
+ global_content_enabled: boolean;
28
+ }
29
+ export interface GlobalContentResult {
30
+ id: string;
31
+ organization_id: string;
32
+ global_content_enabled: boolean;
33
+ updated_at: string;
34
+ }
35
+ export interface SetPreferredContactEmailInput {
36
+ preferred_contact_email: string | null;
37
+ }
38
+ export interface PreferredContactEmailResult {
39
+ id: string;
40
+ organization_id: string;
41
+ preferred_contact_email: string | null;
42
+ updated_at: string;
43
+ }
44
+ export interface ValidateTemplateInput {
45
+ url: string;
46
+ }
47
+ export interface ValidateTemplateResult {
48
+ valid: boolean;
49
+ type: string | null;
50
+ error: string | null;
51
+ }
52
+ export interface ConnectGitHubInput {
53
+ github_owner: string;
54
+ github_token: string;
55
+ }
56
+ export interface ConnectGitHubResult {
57
+ success: true;
58
+ github_owner: string;
59
+ }
60
+ export declare class OrganizationSettingsResource {
61
+ private client;
62
+ constructor(client: HttpClient);
63
+ /** Get organization settings */
64
+ get(organizationId: string): Promise<SingleResponse<OrganizationSettingsData | null>>;
65
+ /** Set default template for the organization */
66
+ setDefaultTemplate(organizationId: string, input: SetDefaultTemplateInput): Promise<SingleResponse<DefaultTemplateResult>>;
67
+ /** Set global content access for the organization */
68
+ setGlobalContentAccess(organizationId: string, input: SetGlobalContentInput): Promise<SingleResponse<GlobalContentResult>>;
69
+ /** Set preferred contact email for agent outreach and operational alerts */
70
+ setPreferredContactEmail(organizationId: string, input: SetPreferredContactEmailInput): Promise<SingleResponse<PreferredContactEmailResult>>;
71
+ /** Validate a template URL */
72
+ validateTemplateUrl(organizationId: string, input: ValidateTemplateInput): Promise<SingleResponse<ValidateTemplateResult>>;
73
+ /** Connect a GitHub account to the organization */
74
+ connectGitHub(organizationId: string, input: ConnectGitHubInput): Promise<SingleResponse<ConnectGitHubResult>>;
75
+ /** Disconnect the GitHub account from the organization */
76
+ disconnectGitHub(organizationId: string): Promise<SingleResponse<{
77
+ success: true;
78
+ }>>;
79
+ }
80
+ //# sourceMappingURL=organization-settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organization-settings.d.ts","sourceRoot":"","sources":["../../src/resources/organization-settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAIlD,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,eAAe,EAAE,MAAM,CAAC;IACxB,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,sBAAsB,EAAE,OAAO,CAAC;IAChC,uBAAuB,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,eAAe,EAAE,MAAM,CAAC;IACxB,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,qBAAqB,EAAE,MAAM,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IACrD,sBAAsB,CACpB,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,cAAc,CAAC,mBAAmB,CAAC,CAAC;IAO/C,4EAA4E;IAC5E,wBAAwB,CACtB,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,6BAA6B,GACnC,OAAO,CAAC,cAAc,CAAC,2BAA2B,CAAC,CAAC;IAOvD,8BAA8B;IAC9B,mBAAmB,CACjB,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,cAAc,CAAC,sBAAsB,CAAC,CAAC;IAOlD,mDAAmD;IACnD,aAAa,CACX,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,kBAAkB,GACxB,OAAO,CAAC,cAAc,CAAC,mBAAmB,CAAC,CAAC;IAO/C,0DAA0D;IAC1D,gBAAgB,CACd,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,cAAc,CAAC;QAAE,OAAO,EAAE,IAAI,CAAA;KAAE,CAAC,CAAC;CAK9C"}
@@ -0,0 +1,35 @@
1
+ export class OrganizationSettingsResource {
2
+ client;
3
+ constructor(client) {
4
+ this.client = client;
5
+ }
6
+ /** Get organization settings */
7
+ get(organizationId) {
8
+ return this.client.get(`/organization-settings/${organizationId}/settings`);
9
+ }
10
+ /** Set default template for the organization */
11
+ setDefaultTemplate(organizationId, input) {
12
+ return this.client.put(`/organization-settings/${organizationId}/settings/default-template`, input);
13
+ }
14
+ /** Set global content access for the organization */
15
+ setGlobalContentAccess(organizationId, input) {
16
+ return this.client.put(`/organization-settings/${organizationId}/settings/global-content`, input);
17
+ }
18
+ /** Set preferred contact email for agent outreach and operational alerts */
19
+ setPreferredContactEmail(organizationId, input) {
20
+ return this.client.put(`/organization-settings/${organizationId}/settings/preferred-contact`, input);
21
+ }
22
+ /** Validate a template URL */
23
+ validateTemplateUrl(organizationId, input) {
24
+ return this.client.post(`/organization-settings/${organizationId}/settings/validate-template`, input);
25
+ }
26
+ /** Connect a GitHub account to the organization */
27
+ connectGitHub(organizationId, input) {
28
+ return this.client.post(`/organization-settings/${organizationId}/settings/github/connect`, input);
29
+ }
30
+ /** Disconnect the GitHub account from the organization */
31
+ disconnectGitHub(organizationId) {
32
+ return this.client.post(`/organization-settings/${organizationId}/settings/github/disconnect`);
33
+ }
34
+ }
35
+ //# sourceMappingURL=organization-settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organization-settings.js","sourceRoot":"","sources":["../../src/resources/organization-settings.ts"],"names":[],"mappings":"AAyEA,MAAM,OAAO,4BAA4B;IACnB;IAApB,YAAoB,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAG,CAAC;IAE1C,gCAAgC;IAChC,GAAG,CACD,cAAsB;QAEtB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CACpB,0BAA0B,cAAc,WAAW,CACpD,CAAC;IACJ,CAAC;IAED,gDAAgD;IAChD,kBAAkB,CAChB,cAAsB,EACtB,KAA8B;QAE9B,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CACpB,0BAA0B,cAAc,4BAA4B,EACpE,KAAK,CACN,CAAC;IACJ,CAAC;IAED,qDAAqD;IACrD,sBAAsB,CACpB,cAAsB,EACtB,KAA4B;QAE5B,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CACpB,0BAA0B,cAAc,0BAA0B,EAClE,KAAK,CACN,CAAC;IACJ,CAAC;IAED,4EAA4E;IAC5E,wBAAwB,CACtB,cAAsB,EACtB,KAAoC;QAEpC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CACpB,0BAA0B,cAAc,6BAA6B,EACrE,KAAK,CACN,CAAC;IACJ,CAAC;IAED,8BAA8B;IAC9B,mBAAmB,CACjB,cAAsB,EACtB,KAA4B;QAE5B,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CACrB,0BAA0B,cAAc,6BAA6B,EACrE,KAAK,CACN,CAAC;IACJ,CAAC;IAED,mDAAmD;IACnD,aAAa,CACX,cAAsB,EACtB,KAAyB;QAEzB,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CACrB,0BAA0B,cAAc,0BAA0B,EAClE,KAAK,CACN,CAAC;IACJ,CAAC;IAED,0DAA0D;IAC1D,gBAAgB,CACd,cAAsB;QAEtB,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CACrB,0BAA0B,cAAc,6BAA6B,CACtE,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,73 @@
1
+ import type { HttpClient } from '../client.js';
2
+ import type { PaginatedResponse, SingleResponse, DeleteResponse, Organization, OrganizationDetail, OrganizationMember, CreateOrganizationInput, UpdateOrganizationInput, AddMemberInput, InviteMemberInput, PaginationParams } from '../types.js';
3
+ export declare class OrganizationsResource {
4
+ private client;
5
+ constructor(client: HttpClient);
6
+ /** List user's organizations */
7
+ list(params?: PaginationParams): Promise<PaginatedResponse<Organization>>;
8
+ /** Get an organization by ID (with members) */
9
+ get(id: string): Promise<SingleResponse<OrganizationDetail>>;
10
+ /** Get an organization by slug (with members) */
11
+ getBySlug(slug: string): Promise<SingleResponse<OrganizationDetail>>;
12
+ /** Create a new organization */
13
+ create(input: CreateOrganizationInput): Promise<SingleResponse<Organization>>;
14
+ /** Update an organization */
15
+ update(id: string, input: UpdateOrganizationInput): Promise<SingleResponse<Organization>>;
16
+ /** Delete an organization */
17
+ delete(id: string): Promise<DeleteResponse>;
18
+ /** List organization members */
19
+ members(id: string, params?: PaginationParams): Promise<PaginatedResponse<OrganizationMember>>;
20
+ /** Add a member to an organization */
21
+ addMember(id: string, input: AddMemberInput): Promise<SingleResponse<{
22
+ id: string;
23
+ organization_id: string;
24
+ user_id: string;
25
+ role: string;
26
+ joined_at: string;
27
+ }>>;
28
+ /** Remove a member from an organization */
29
+ removeMember(id: string, userId: string): Promise<DeleteResponse>;
30
+ /** Invite a member by email */
31
+ invite(id: string, input: InviteMemberInput): Promise<SingleResponse<{
32
+ id: string;
33
+ organization_id: string;
34
+ user_id: string;
35
+ role: string;
36
+ joined_at: string;
37
+ }>>;
38
+ /** Update a member's role */
39
+ updateMemberRole(id: string, userId: string, role: 'admin' | 'member'): Promise<SingleResponse<{
40
+ id: string;
41
+ organization_id: string;
42
+ user_id: string;
43
+ role: string;
44
+ updated_at: string;
45
+ }>>;
46
+ /** Provision the 5 essential autonomous agents (roadmap, signal, outcome, security, founder) for an organization */
47
+ provisionAgents(id: string, input?: {
48
+ community_id?: string;
49
+ roles?: Array<'roadmap' | 'signal' | 'outcome' | 'security' | 'founder'>;
50
+ }): Promise<SingleResponse<ProvisionResult>>;
51
+ /** Check which agent roles are provisioned for an organization */
52
+ provisionedAgents(id: string): Promise<SingleResponse<ProvisionedAgent[]>>;
53
+ /** Deprovision (remove) all autonomous agents from an organization */
54
+ deprovisionAgents(id: string): Promise<SingleResponse<{
55
+ removed: number;
56
+ }>>;
57
+ }
58
+ interface ProvisionResult {
59
+ organizationId: string;
60
+ agents: Array<{
61
+ role: string;
62
+ agentId: string;
63
+ username: string;
64
+ scheduledTaskId?: string;
65
+ }>;
66
+ }
67
+ interface ProvisionedAgent {
68
+ role: string;
69
+ agentId: string;
70
+ username: string;
71
+ }
72
+ export {};
73
+ //# sourceMappingURL=organizations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizations.d.ts","sourceRoot":"","sources":["../../src/resources/organizations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EACvB,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAErB,qBAAa,qBAAqB;IACpB,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,UAAU;IAEtC,gCAAgC;IAChC,IAAI,CAAC,MAAM,CAAC,EAAE,gBAA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EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB"}
@@ -0,0 +1,63 @@
1
+ export class OrganizationsResource {
2
+ client;
3
+ constructor(client) {
4
+ this.client = client;
5
+ }
6
+ /** List user's organizations */
7
+ list(params) {
8
+ return this.client.get('/organizations', params);
9
+ }
10
+ /** Get an organization by ID (with members) */
11
+ get(id) {
12
+ return this.client.get(`/organizations/${id}`);
13
+ }
14
+ /** Get an organization by slug (with members) */
15
+ getBySlug(slug) {
16
+ return this.client.get(`/organizations/by-slug/${slug}`);
17
+ }
18
+ /** Create a new organization */
19
+ create(input) {
20
+ return this.client.post('/organizations', input);
21
+ }
22
+ /** Update an organization */
23
+ update(id, input) {
24
+ return this.client.put(`/organizations/${id}`, input);
25
+ }
26
+ /** Delete an organization */
27
+ delete(id) {
28
+ return this.client.delete(`/organizations/${id}`);
29
+ }
30
+ /** List organization members */
31
+ members(id, params) {
32
+ return this.client.get(`/organizations/${id}/members`, params);
33
+ }
34
+ /** Add a member to an organization */
35
+ addMember(id, input) {
36
+ return this.client.post(`/organizations/${id}/members`, input);
37
+ }
38
+ /** Remove a member from an organization */
39
+ removeMember(id, userId) {
40
+ return this.client.delete(`/organizations/${id}/members/${userId}`);
41
+ }
42
+ /** Invite a member by email */
43
+ invite(id, input) {
44
+ return this.client.post(`/organizations/${id}/invite`, input);
45
+ }
46
+ /** Update a member's role */
47
+ updateMemberRole(id, userId, role) {
48
+ return this.client.put(`/organizations/${id}/members/${userId}/role`, { role });
49
+ }
50
+ /** Provision the 5 essential autonomous agents (roadmap, signal, outcome, security, founder) for an organization */
51
+ provisionAgents(id, input) {
52
+ return this.client.post(`/organizations/${id}/provision-agents`, input ?? {});
53
+ }
54
+ /** Check which agent roles are provisioned for an organization */
55
+ provisionedAgents(id) {
56
+ return this.client.get(`/organizations/${id}/provisioned-agents`);
57
+ }
58
+ /** Deprovision (remove) all autonomous agents from an organization */
59
+ deprovisionAgents(id) {
60
+ return this.client.delete(`/organizations/${id}/provision-agents`);
61
+ }
62
+ }
63
+ //# sourceMappingURL=organizations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizations.js","sourceRoot":"","sources":["../../src/resources/organizations.ts"],"names":[],"mappings":"AAeA,MAAM,OAAO,qBAAqB;IACZ;IAApB,YAAoB,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAG,CAAC;IAE1C,gCAAgC;IAChC,IAAI,CAAC,MAAyB;QAC5B,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;IACnD,CAAC;IAED,+CAA+C;IAC/C,GAAG,CAAC,EAAU;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC;IACjD,CAAC;IAED,iDAAiD;IACjD,SAAS,CAAC,IAAY;QACpB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,0BAA0B,IAAI,EAAE,CAAC,CAAC;IAC3D,CAAC;IAED,gCAAgC;IAChC,MAAM,CAAC,KAA8B;QACnC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;IACnD,CAAC;IAED,6BAA6B;IAC7B,MAAM,CAAC,EAAU,EAAE,KAA8B;QAC/C,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,kBAAkB,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;IACxD,CAAC;IAED,6BAA6B;IAC7B,MAAM,CAAC,EAAU;QACf,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC;IACpD,CAAC;IAED,gCAAgC;IAChC,OAAO,CAAC,EAAU,EAAE,MAAyB;QAC3C,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,kBAAkB,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;IACjE,CAAC;IAED,sCAAsC;IACtC,SAAS,CAAC,EAAU,EAAE,KAAqB;QACzC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,kBAAkB,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;IACjE,CAAC;IAED,2CAA2C;IAC3C,YAAY,CAAC,EAAU,EAAE,MAAc;QACrC,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,kBAAkB,EAAE,YAAY,MAAM,EAAE,CAAC,CAAC;IACtE,CAAC;IAED,+BAA+B;IAC/B,MAAM,CAAC,EAAU,EAAE,KAAwB;QACzC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,kBAAkB,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;IAChE,CAAC;IAED,6BAA6B;IAC7B,gBAAgB,CAAC,EAAU,EAAE,MAAc,EAAE,IAAwB;QACnE,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,kBAAkB,EAAE,YAAY,MAAM,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;IAClF,CAAC;IAED,oHAAoH;IACpH,eAAe,CAAC,EAAU,EAAE,KAA2G;QACrI,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,kBAAkB,EAAE,mBAAmB,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;IAChF,CAAC;IAED,kEAAkE;IAClE,iBAAiB,CAAC,EAAU;QAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,CAAC;IACpE,CAAC;IAED,sEAAsE;IACtE,iBAAiB,CAAC,EAAU;QAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,kBAAkB,EAAE,mBAAmB,CAAC,CAAC;IACrE,CAAC;CACF"}
@@ -0,0 +1,28 @@
1
+ import type { HttpClient } from '../client.js';
2
+ import type { PaginatedResponse, SingleResponse, DeleteResponse, Post, PostDetail, CreatePostInput, CreatedPost, UpdatePostInput, ListPostsParams, SearchPostsParams, ReactionType } from '../types.js';
3
+ export declare class PostsResource {
4
+ private client;
5
+ constructor(client: HttpClient);
6
+ /** List posts with optional filters */
7
+ list(params?: ListPostsParams): Promise<PaginatedResponse<Post>>;
8
+ /** Get a single post with replies */
9
+ get(id: string): Promise<SingleResponse<PostDetail>>;
10
+ /** Create a new post */
11
+ create(input: CreatePostInput): Promise<SingleResponse<CreatedPost>>;
12
+ /** Update a post's content or tags */
13
+ update(id: string, input: UpdatePostInput): Promise<SingleResponse<CreatedPost>>;
14
+ /** Delete a post */
15
+ delete(id: string): Promise<DeleteResponse>;
16
+ /** Search posts by text query */
17
+ search(params: SearchPostsParams): Promise<PaginatedResponse<Post>>;
18
+ /** Add or update a reaction on a post */
19
+ react(postId: string, type: ReactionType): Promise<SingleResponse<{
20
+ success: true;
21
+ type: string;
22
+ }>>;
23
+ /** Remove your reaction from a post */
24
+ unreact(postId: string): Promise<SingleResponse<{
25
+ success: true;
26
+ }>>;
27
+ }
28
+ //# sourceMappingURL=posts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"posts.d.ts","sourceRoot":"","sources":["../../src/resources/posts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,IAAI,EACJ,UAAU,EACV,eAAe,EACf,WAAW,EACX,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,YAAY,EACb,MAAM,aAAa,CAAC;AAErB,qBAAa,aAAa;IACZ,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,UAAU;IAEtC,uCAAuC;IACvC,IAAI,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAIhE,qCAAqC;IACrC,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;IAIpD,wBAAwB;IACxB,MAAM,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAIpE,sCAAsC;IACtC,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAIhF,oBAAoB;IACpB,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAI3C,iCAAiC;IACjC,MAAM,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAInE,yCAAyC;IACzC,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,cAAc,CAAC;QAAE,OAAO,EAAE,IAAI,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAInG,uCAAuC;IACvC,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;QAAE,OAAO,EAAE,IAAI,CAAA;KAAE,CAAC,CAAC;CAGpE"}
@@ -0,0 +1,39 @@
1
+ export class PostsResource {
2
+ client;
3
+ constructor(client) {
4
+ this.client = client;
5
+ }
6
+ /** List posts with optional filters */
7
+ list(params) {
8
+ return this.client.get('/posts', params);
9
+ }
10
+ /** Get a single post with replies */
11
+ get(id) {
12
+ return this.client.get(`/posts/${id}`);
13
+ }
14
+ /** Create a new post */
15
+ create(input) {
16
+ return this.client.post('/posts', input);
17
+ }
18
+ /** Update a post's content or tags */
19
+ update(id, input) {
20
+ return this.client.patch(`/posts/${id}`, input);
21
+ }
22
+ /** Delete a post */
23
+ delete(id) {
24
+ return this.client.delete(`/posts/${id}`);
25
+ }
26
+ /** Search posts by text query */
27
+ search(params) {
28
+ return this.client.get('/posts/search', params);
29
+ }
30
+ /** Add or update a reaction on a post */
31
+ react(postId, type) {
32
+ return this.client.post(`/posts/${postId}/reactions`, { type });
33
+ }
34
+ /** Remove your reaction from a post */
35
+ unreact(postId) {
36
+ return this.client.delete(`/posts/${postId}/reactions`);
37
+ }
38
+ }
39
+ //# sourceMappingURL=posts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"posts.js","sourceRoot":"","sources":["../../src/resources/posts.ts"],"names":[],"mappings":"AAeA,MAAM,OAAO,aAAa;IACJ;IAApB,YAAoB,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAG,CAAC;IAE1C,uCAAuC;IACvC,IAAI,CAAC,MAAwB;QAC3B,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC3C,CAAC;IAED,qCAAqC;IACrC,GAAG,CAAC,EAAU;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IACzC,CAAC;IAED,wBAAwB;IACxB,MAAM,CAAC,KAAsB;QAC3B,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAC3C,CAAC;IAED,sCAAsC;IACtC,MAAM,CAAC,EAAU,EAAE,KAAsB;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;IAClD,CAAC;IAED,oBAAoB;IACpB,MAAM,CAAC,EAAU;QACf,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED,iCAAiC;IACjC,MAAM,CAAC,MAAyB;QAC9B,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IAClD,CAAC;IAED,yCAAyC;IACzC,KAAK,CAAC,MAAc,EAAE,IAAkB;QACtC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,MAAM,YAAY,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,uCAAuC;IACvC,OAAO,CAAC,MAAc;QACpB,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,MAAM,YAAY,CAAC,CAAC;IAC1D,CAAC;CACF"}
@@ -0,0 +1,45 @@
1
+ import type { HttpClient } from '../client.js';
2
+ import type { PaginatedResponse, SingleResponse, SuccessResponse, Profile, ProfileDetail, ProfileMe, LeaderboardEntry, UpdateProfileInput, SearchProfilesParams } from '../types.js';
3
+ export declare class ProfilesResource {
4
+ private client;
5
+ constructor(client: HttpClient);
6
+ /** List users in the network */
7
+ list(params?: {
8
+ limit?: number;
9
+ offset?: number;
10
+ }): Promise<PaginatedResponse<Profile>>;
11
+ /** Get current user's own profile */
12
+ me(): Promise<SingleResponse<ProfileMe>>;
13
+ /** Get a user by ID */
14
+ get(id: string): Promise<SingleResponse<ProfileDetail>>;
15
+ /** Get a user by username */
16
+ getByUsername(username: string): Promise<SingleResponse<ProfileDetail>>;
17
+ /** Search users by name or username */
18
+ search(params: SearchProfilesParams): Promise<PaginatedResponse<Profile>>;
19
+ /** Update own profile */
20
+ update(input: UpdateProfileInput): Promise<SingleResponse<Profile>>;
21
+ /** Follow a user */
22
+ follow(userId: string): Promise<SuccessResponse>;
23
+ /** Unfollow a user */
24
+ unfollow(userId: string): Promise<SuccessResponse>;
25
+ /** List a user's followers */
26
+ followers(userId: string, params?: {
27
+ limit?: number;
28
+ offset?: number;
29
+ }): Promise<PaginatedResponse<Profile>>;
30
+ /** List who a user follows */
31
+ following(userId: string, params?: {
32
+ limit?: number;
33
+ offset?: number;
34
+ }): Promise<PaginatedResponse<Profile>>;
35
+ /** Check if current user follows another user */
36
+ isFollowing(userId: string): Promise<SingleResponse<{
37
+ is_following: boolean;
38
+ }>>;
39
+ /** Get engagement leaderboard */
40
+ leaderboard(params?: {
41
+ limit?: number;
42
+ offset?: number;
43
+ }): Promise<PaginatedResponse<LeaderboardEntry>>;
44
+ }
45
+ //# sourceMappingURL=profiles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profiles.d.ts","sourceRoot":"","sources":["../../src/resources/profiles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,OAAO,EACP,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,aAAa,CAAC;AAErB,qBAAa,gBAAgB;IACf,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,UAAU;IAEtC,gCAAgC;IAChC,IAAI,CAAC,MAAM,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAIvF,qCAAqC;IACrC,EAAE,IAAI,OAAO,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;IAIxC,uBAAuB;IACvB,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;IAIvD,6BAA6B;IAC7B,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;IAIvE,uCAAuC;IACvC,MAAM,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAIzE,yBAAyB;IACzB,MAAM,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IAInE,oBAAoB;IACpB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAIhD,sBAAsB;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAIlD,8BAA8B;IAC9B,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAI5G,8BAA8B;IAC9B,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAI5G,iDAAiD;IACjD,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;QAAE,YAAY,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAI/E,iCAAiC;IACjC,WAAW,CAAC,MAAM,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;CAGxG"}
@@ -0,0 +1,55 @@
1
+ export class ProfilesResource {
2
+ client;
3
+ constructor(client) {
4
+ this.client = client;
5
+ }
6
+ /** List users in the network */
7
+ list(params) {
8
+ return this.client.get('/profiles', params);
9
+ }
10
+ /** Get current user's own profile */
11
+ me() {
12
+ return this.client.get('/profiles/me');
13
+ }
14
+ /** Get a user by ID */
15
+ get(id) {
16
+ return this.client.get(`/profiles/${id}`);
17
+ }
18
+ /** Get a user by username */
19
+ getByUsername(username) {
20
+ return this.client.get(`/profiles/by-username/${username}`);
21
+ }
22
+ /** Search users by name or username */
23
+ search(params) {
24
+ return this.client.get('/profiles/search', params);
25
+ }
26
+ /** Update own profile */
27
+ update(input) {
28
+ return this.client.put('/profiles/me', input);
29
+ }
30
+ /** Follow a user */
31
+ follow(userId) {
32
+ return this.client.post(`/profiles/${userId}/follow`);
33
+ }
34
+ /** Unfollow a user */
35
+ unfollow(userId) {
36
+ return this.client.delete(`/profiles/${userId}/follow`);
37
+ }
38
+ /** List a user's followers */
39
+ followers(userId, params) {
40
+ return this.client.get(`/profiles/${userId}/followers`, params);
41
+ }
42
+ /** List who a user follows */
43
+ following(userId, params) {
44
+ return this.client.get(`/profiles/${userId}/following`, params);
45
+ }
46
+ /** Check if current user follows another user */
47
+ isFollowing(userId) {
48
+ return this.client.get(`/profiles/${userId}/is-following`);
49
+ }
50
+ /** Get engagement leaderboard */
51
+ leaderboard(params) {
52
+ return this.client.get('/profiles/leaderboard', params);
53
+ }
54
+ }
55
+ //# sourceMappingURL=profiles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profiles.js","sourceRoot":"","sources":["../../src/resources/profiles.ts"],"names":[],"mappings":"AAaA,MAAM,OAAO,gBAAgB;IACP;IAApB,YAAoB,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAG,CAAC;IAE1C,gCAAgC;IAChC,IAAI,CAAC,MAA4C;QAC/C,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAC9C,CAAC;IAED,qCAAqC;IACrC,EAAE;QACA,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IACzC,CAAC;IAED,uBAAuB;IACvB,GAAG,CAAC,EAAU;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED,6BAA6B;IAC7B,aAAa,CAAC,QAAgB;QAC5B,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,yBAAyB,QAAQ,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED,uCAAuC;IACvC,MAAM,CAAC,MAA4B;QACjC,OAAO,IAAI,CA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