@addn/sdk 1.0.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 (156) hide show
  1. package/dist/auth/storage.d.ts +25 -0
  2. package/dist/auth/storage.d.ts.map +1 -0
  3. package/dist/auth/storage.js +72 -0
  4. package/dist/auth/storage.js.map +1 -0
  5. package/dist/auth/token-manager.d.ts +39 -0
  6. package/dist/auth/token-manager.d.ts.map +1 -0
  7. package/dist/auth/token-manager.js +98 -0
  8. package/dist/auth/token-manager.js.map +1 -0
  9. package/dist/client.d.ts +31 -0
  10. package/dist/client.d.ts.map +1 -0
  11. package/dist/client.js +39 -0
  12. package/dist/client.js.map +1 -0
  13. package/dist/http/errors.d.ts +51 -0
  14. package/dist/http/errors.d.ts.map +1 -0
  15. package/dist/http/errors.js +92 -0
  16. package/dist/http/errors.js.map +1 -0
  17. package/dist/http/http-client.d.ts +18 -0
  18. package/dist/http/http-client.d.ts.map +1 -0
  19. package/dist/http/http-client.js +221 -0
  20. package/dist/http/http-client.js.map +1 -0
  21. package/dist/http/types.d.ts +27 -0
  22. package/dist/http/types.d.ts.map +1 -0
  23. package/dist/http/types.js +3 -0
  24. package/dist/http/types.js.map +1 -0
  25. package/dist/index.d.ts +18 -0
  26. package/dist/index.d.ts.map +1 -0
  27. package/dist/index.js +36 -0
  28. package/dist/index.js.map +1 -0
  29. package/dist/modules/accounts.module.d.ts +15 -0
  30. package/dist/modules/accounts.module.d.ts.map +1 -0
  31. package/dist/modules/accounts.module.js +57 -0
  32. package/dist/modules/accounts.module.js.map +1 -0
  33. package/dist/modules/analytics.module.d.ts +14 -0
  34. package/dist/modules/analytics.module.d.ts.map +1 -0
  35. package/dist/modules/analytics.module.js +24 -0
  36. package/dist/modules/analytics.module.js.map +1 -0
  37. package/dist/modules/auth.module.d.ts +18 -0
  38. package/dist/modules/auth.module.d.ts.map +1 -0
  39. package/dist/modules/auth.module.js +113 -0
  40. package/dist/modules/auth.module.js.map +1 -0
  41. package/dist/modules/content-plans.module.d.ts +58 -0
  42. package/dist/modules/content-plans.module.d.ts.map +1 -0
  43. package/dist/modules/content-plans.module.js +125 -0
  44. package/dist/modules/content-plans.module.js.map +1 -0
  45. package/dist/modules/customers.module.d.ts +12 -0
  46. package/dist/modules/customers.module.d.ts.map +1 -0
  47. package/dist/modules/customers.module.js +43 -0
  48. package/dist/modules/customers.module.js.map +1 -0
  49. package/dist/modules/notifications.module.d.ts +20 -0
  50. package/dist/modules/notifications.module.d.ts.map +1 -0
  51. package/dist/modules/notifications.module.js +37 -0
  52. package/dist/modules/notifications.module.js.map +1 -0
  53. package/dist/modules/orgs.module.d.ts +23 -0
  54. package/dist/modules/orgs.module.d.ts.map +1 -0
  55. package/dist/modules/orgs.module.js +112 -0
  56. package/dist/modules/orgs.module.js.map +1 -0
  57. package/dist/modules/projects.module.d.ts +26 -0
  58. package/dist/modules/projects.module.d.ts.map +1 -0
  59. package/dist/modules/projects.module.js +88 -0
  60. package/dist/modules/projects.module.js.map +1 -0
  61. package/dist/modules/scheduling.module.d.ts +13 -0
  62. package/dist/modules/scheduling.module.d.ts.map +1 -0
  63. package/dist/modules/scheduling.module.js +32 -0
  64. package/dist/modules/scheduling.module.js.map +1 -0
  65. package/dist/modules/storage.module.d.ts +36 -0
  66. package/dist/modules/storage.module.d.ts.map +1 -0
  67. package/dist/modules/storage.module.js +100 -0
  68. package/dist/modules/storage.module.js.map +1 -0
  69. package/dist/modules/subscriptions.module.d.ts +25 -0
  70. package/dist/modules/subscriptions.module.d.ts.map +1 -0
  71. package/dist/modules/subscriptions.module.js +62 -0
  72. package/dist/modules/subscriptions.module.js.map +1 -0
  73. package/dist/types/account.types.d.ts +17 -0
  74. package/dist/types/account.types.d.ts.map +1 -0
  75. package/dist/types/account.types.js +3 -0
  76. package/dist/types/account.types.js.map +1 -0
  77. package/dist/types/analytics.types.d.ts +15 -0
  78. package/dist/types/analytics.types.d.ts.map +1 -0
  79. package/dist/types/analytics.types.js +3 -0
  80. package/dist/types/analytics.types.js.map +1 -0
  81. package/dist/types/api.types.d.ts +20 -0
  82. package/dist/types/api.types.d.ts.map +1 -0
  83. package/dist/types/api.types.js +3 -0
  84. package/dist/types/api.types.js.map +1 -0
  85. package/dist/types/auth.types.d.ts +40 -0
  86. package/dist/types/auth.types.d.ts.map +1 -0
  87. package/dist/types/auth.types.js +3 -0
  88. package/dist/types/auth.types.js.map +1 -0
  89. package/dist/types/content-plan.types.d.ts +27 -0
  90. package/dist/types/content-plan.types.d.ts.map +1 -0
  91. package/dist/types/content-plan.types.js +3 -0
  92. package/dist/types/content-plan.types.js.map +1 -0
  93. package/dist/types/customer.types.d.ts +25 -0
  94. package/dist/types/customer.types.d.ts.map +1 -0
  95. package/dist/types/customer.types.js +3 -0
  96. package/dist/types/customer.types.js.map +1 -0
  97. package/dist/types/index.d.ts +585 -0
  98. package/dist/types/index.d.ts.map +1 -0
  99. package/dist/types/index.js +6 -0
  100. package/dist/types/index.js.map +1 -0
  101. package/dist/types/notification.types.d.ts +11 -0
  102. package/dist/types/notification.types.d.ts.map +1 -0
  103. package/dist/types/notification.types.js +3 -0
  104. package/dist/types/notification.types.js.map +1 -0
  105. package/dist/types/org.types.d.ts +25 -0
  106. package/dist/types/org.types.d.ts.map +1 -0
  107. package/dist/types/org.types.js +3 -0
  108. package/dist/types/org.types.js.map +1 -0
  109. package/dist/types/project.types.d.ts +20 -0
  110. package/dist/types/project.types.d.ts.map +1 -0
  111. package/dist/types/project.types.js +3 -0
  112. package/dist/types/project.types.js.map +1 -0
  113. package/dist/types/scheduling.types.d.ts +31 -0
  114. package/dist/types/scheduling.types.d.ts.map +1 -0
  115. package/dist/types/scheduling.types.js +3 -0
  116. package/dist/types/scheduling.types.js.map +1 -0
  117. package/dist/types/storage.types.d.ts +8 -0
  118. package/dist/types/storage.types.d.ts.map +1 -0
  119. package/dist/types/storage.types.js +3 -0
  120. package/dist/types/storage.types.js.map +1 -0
  121. package/dist/types/subscription.types.d.ts +19 -0
  122. package/dist/types/subscription.types.d.ts.map +1 -0
  123. package/dist/types/subscription.types.js +3 -0
  124. package/dist/types/subscription.types.js.map +1 -0
  125. package/package.json +27 -0
  126. package/src/auth/storage.ts +75 -0
  127. package/src/auth/token-manager.ts +107 -0
  128. package/src/client.ts +51 -0
  129. package/src/http/errors.ts +97 -0
  130. package/src/http/http-client.ts +263 -0
  131. package/src/http/types.ts +32 -0
  132. package/src/index.ts +17 -0
  133. package/src/modules/accounts.module.ts +61 -0
  134. package/src/modules/analytics.module.ts +26 -0
  135. package/src/modules/auth.module.ts +129 -0
  136. package/src/modules/content-plans.module.ts +170 -0
  137. package/src/modules/customers.module.ts +48 -0
  138. package/src/modules/notifications.module.ts +41 -0
  139. package/src/modules/orgs.module.ts +122 -0
  140. package/src/modules/projects.module.ts +97 -0
  141. package/src/modules/scheduling.module.ts +35 -0
  142. package/src/modules/storage.module.ts +121 -0
  143. package/src/modules/subscriptions.module.ts +82 -0
  144. package/src/types/account.types.ts +17 -0
  145. package/src/types/analytics.types.ts +15 -0
  146. package/src/types/api.types.ts +21 -0
  147. package/src/types/auth.types.ts +45 -0
  148. package/src/types/content-plan.types.ts +28 -0
  149. package/src/types/customer.types.ts +25 -0
  150. package/src/types/index.ts +682 -0
  151. package/src/types/notification.types.ts +10 -0
  152. package/src/types/org.types.ts +27 -0
  153. package/src/types/project.types.ts +21 -0
  154. package/src/types/scheduling.types.ts +32 -0
  155. package/src/types/storage.types.ts +7 -0
  156. package/src/types/subscription.types.ts +19 -0
@@ -0,0 +1,27 @@
1
+ export interface Organization {
2
+ id: string;
3
+ name: string;
4
+ slug?: string;
5
+ logo_url?: string | null;
6
+ owner_id: string;
7
+ member_count?: number;
8
+ created_at: string;
9
+ updated_at: string;
10
+ }
11
+
12
+ export interface OrganizationMember {
13
+ user_id: string;
14
+ email: string;
15
+ full_name: string;
16
+ role: string;
17
+ joined_at: string;
18
+ }
19
+
20
+ export interface CreateOrgPayload {
21
+ name: string;
22
+ }
23
+
24
+ export interface InviteMemberPayload {
25
+ email: string;
26
+ role: "org_admin" | "member" | "viewer";
27
+ }
@@ -0,0 +1,21 @@
1
+ export interface Project {
2
+ id: string;
3
+ organization_id: string;
4
+ customer_id?: string | null;
5
+ name: string;
6
+ description?: string;
7
+ status: "active" | "archived" | "draft";
8
+ created_by: string;
9
+ created_at: string;
10
+ updated_at: string;
11
+ }
12
+
13
+ export interface CreateProjectPayload {
14
+ name: string;
15
+ customer_id?: string;
16
+ description?: string;
17
+ }
18
+
19
+ export interface UpdateProjectPayload extends Partial<CreateProjectPayload> {
20
+ status?: "active" | "archived" | "draft";
21
+ }
@@ -0,0 +1,32 @@
1
+ export interface ScheduledPost {
2
+ id: string;
3
+ post_id: string;
4
+ account_id: string;
5
+ platform: "instagram" | "facebook" | "linkedin";
6
+ caption: string;
7
+ media_urls: string[];
8
+ scheduled_time: string;
9
+ status: "scheduled" | "processing" | "published" | "failed";
10
+ error_message?: string;
11
+ approval_token?: string;
12
+ }
13
+
14
+ export interface PublicApprovalView {
15
+ token: string;
16
+ project_name: string;
17
+ posts: Array<{
18
+ id: string;
19
+ title: string;
20
+ caption: string;
21
+ media_urls: string[];
22
+ post_type: string;
23
+ status: string;
24
+ }>;
25
+ }
26
+
27
+ export interface SubmitApprovalPayload {
28
+ token: string;
29
+ post_id: string;
30
+ action: "approve" | "reject";
31
+ comment?: string;
32
+ }
@@ -0,0 +1,7 @@
1
+ export interface UploadFileResponse {
2
+ file_id: string;
3
+ url: string;
4
+ filename: string;
5
+ size_bytes: number;
6
+ mime_type: string;
7
+ }
@@ -0,0 +1,19 @@
1
+ export interface SubscriptionPlan {
2
+ id: string;
3
+ name: string;
4
+ price_monthly: number;
5
+ price_yearly: number;
6
+ features: string[];
7
+ max_projects: number;
8
+ max_members: number;
9
+ max_social_accounts: number;
10
+ is_active: boolean;
11
+ }
12
+
13
+ export interface UserSubscription {
14
+ id: string;
15
+ organization_id: string;
16
+ plan_id: string;
17
+ status: "active" | "canceled" | "past_due" | "trialing";
18
+ current_period_end: string;
19
+ }