@beabee/beabee-common 0.20.5 → 0.21.0-alpha.2

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 (258) hide show
  1. package/dist/browser/beabee-common.js +29 -15
  2. package/dist/browser/beabee-common.js.map +3 -3
  3. package/dist/browser/beabee-common.min.js +1 -1
  4. package/dist/browser/index.js +29 -15
  5. package/dist/cjs/data/content-ids.cjs +38 -0
  6. package/dist/cjs/data/index.cjs +2 -0
  7. package/dist/cjs/types/address.cjs +16 -0
  8. package/dist/cjs/types/allow-null.cjs +16 -0
  9. package/dist/cjs/types/callout-data.cjs +16 -0
  10. package/dist/cjs/types/callout-map-schema.cjs +16 -0
  11. package/dist/cjs/types/callout-response-comment-data.cjs +16 -0
  12. package/dist/cjs/types/callout-response-view-schema.cjs +16 -0
  13. package/dist/cjs/types/client-api-error-data.cjs +16 -0
  14. package/dist/cjs/types/contact-data.cjs +16 -0
  15. package/dist/cjs/types/contact-profile-data.cjs +16 -0
  16. package/dist/cjs/types/contact-role-data.cjs +16 -0
  17. package/dist/cjs/types/content-contacts-data.cjs +16 -0
  18. package/dist/cjs/types/content-data.cjs +16 -0
  19. package/dist/cjs/types/content-email-data.cjs +16 -0
  20. package/dist/cjs/types/content-general-data.cjs +16 -0
  21. package/dist/cjs/types/content-id.cjs +16 -0
  22. package/dist/cjs/types/content-join-data.cjs +16 -0
  23. package/dist/cjs/types/content-join-period-data.cjs +16 -0
  24. package/dist/cjs/types/content-join-setup-data.cjs +16 -0
  25. package/dist/cjs/types/content-payment-data.cjs +16 -0
  26. package/dist/cjs/types/content-profile-data.cjs +16 -0
  27. package/dist/cjs/types/content-share-data.cjs +16 -0
  28. package/dist/cjs/types/content-telegram-data.cjs +16 -0
  29. package/dist/cjs/types/contribution-info.cjs +16 -0
  30. package/dist/cjs/types/create-api-key-data.cjs +16 -0
  31. package/dist/cjs/types/create-callout-data.cjs +16 -0
  32. package/dist/cjs/types/create-callout-response-comment-data.cjs +16 -0
  33. package/dist/cjs/types/create-callout-response-data.cjs +16 -0
  34. package/dist/cjs/types/create-callout-tag-data.cjs +16 -0
  35. package/dist/cjs/types/create-contact-data.cjs +16 -0
  36. package/dist/cjs/types/create-notice-data.cjs +16 -0
  37. package/dist/cjs/types/create-segment-data.cjs +16 -0
  38. package/dist/cjs/types/footer-link.cjs +16 -0
  39. package/dist/cjs/types/force-update-contribution-data.cjs +16 -0
  40. package/dist/cjs/types/get-api-key-data.cjs +16 -0
  41. package/dist/cjs/types/get-api-keys-query.cjs +16 -0
  42. package/dist/cjs/types/get-callout-data-with.cjs +16 -0
  43. package/dist/cjs/types/get-callout-data.cjs +16 -0
  44. package/dist/cjs/types/get-callout-form-data.cjs +16 -0
  45. package/dist/cjs/types/get-callout-response-comment-data.cjs +16 -0
  46. package/dist/cjs/types/get-callout-response-comments-query.cjs +16 -0
  47. package/dist/cjs/types/get-callout-response-data-with.cjs +16 -0
  48. package/dist/cjs/types/get-callout-response-data.cjs +16 -0
  49. package/dist/cjs/types/get-callout-response-map-data.cjs +16 -0
  50. package/dist/cjs/types/get-callout-response-with.cjs +16 -0
  51. package/dist/cjs/types/get-callout-responses-query.cjs +16 -0
  52. package/dist/cjs/types/get-callout-tag-data.cjs +16 -0
  53. package/dist/cjs/types/get-callout-with.cjs +16 -0
  54. package/dist/cjs/types/get-callouts-query.cjs +16 -0
  55. package/dist/cjs/types/get-contact-data-with.cjs +16 -0
  56. package/dist/cjs/types/get-contact-data.cjs +16 -0
  57. package/dist/cjs/types/get-contact-with.cjs +16 -0
  58. package/dist/cjs/types/get-contacts-query.cjs +16 -0
  59. package/dist/cjs/types/get-email-data.cjs +16 -0
  60. package/dist/cjs/types/get-notice-data.cjs +16 -0
  61. package/dist/cjs/types/get-notices-query.cjs +16 -0
  62. package/dist/cjs/types/get-payment-data-with.cjs +16 -0
  63. package/dist/cjs/types/get-payment-data.cjs +16 -0
  64. package/dist/cjs/types/get-payment-with.cjs +16 -0
  65. package/dist/cjs/types/get-payments-query.cjs +16 -0
  66. package/dist/cjs/types/get-segment-data-with.cjs +16 -0
  67. package/dist/cjs/types/get-segment-data.cjs +16 -0
  68. package/dist/cjs/types/get-segment-with.cjs +16 -0
  69. package/dist/cjs/types/get-stats-data.cjs +16 -0
  70. package/dist/cjs/types/get-stats-query.cjs +16 -0
  71. package/dist/cjs/types/get-upload-flow-data.cjs +16 -0
  72. package/dist/cjs/types/index.cjs +162 -0
  73. package/dist/cjs/types/noop.cjs +16 -0
  74. package/dist/cjs/types/notice-data.cjs +16 -0
  75. package/dist/cjs/types/parse-iso-options.cjs +16 -0
  76. package/dist/cjs/types/serial.cjs +16 -0
  77. package/dist/cjs/types/set-contribution-data.cjs +16 -0
  78. package/dist/cjs/types/start-contribution-data.cjs +16 -0
  79. package/dist/cjs/types/update-callout-data.cjs +16 -0
  80. package/dist/cjs/types/update-callout-response-comment-data.cjs +16 -0
  81. package/dist/cjs/types/update-callout-response-data.cjs +16 -0
  82. package/dist/cjs/types/update-callout-tag-data.cjs +16 -0
  83. package/dist/cjs/types/update-contact-data.cjs +16 -0
  84. package/dist/cjs/types/update-contact-profile-data.cjs +16 -0
  85. package/dist/cjs/types/update-contact-role-data.cjs +16 -0
  86. package/dist/cjs/types/update-email-data.cjs +16 -0
  87. package/dist/cjs/types/update-reset-password-data.cjs +16 -0
  88. package/dist/cjs/types/update-segment-data.cjs +16 -0
  89. package/dist/esm/data/content-ids.js +14 -0
  90. package/dist/esm/data/index.js +1 -0
  91. package/dist/esm/types/address.js +0 -0
  92. package/dist/esm/types/allow-null.js +0 -0
  93. package/dist/esm/types/callout-data.js +0 -0
  94. package/dist/esm/types/callout-map-schema.js +0 -0
  95. package/dist/esm/types/callout-response-comment-data.js +0 -0
  96. package/dist/esm/types/callout-response-view-schema.js +0 -0
  97. package/dist/esm/types/client-api-error-data.js +0 -0
  98. package/dist/esm/types/contact-data.js +0 -0
  99. package/dist/esm/types/contact-profile-data.js +0 -0
  100. package/dist/esm/types/contact-role-data.js +0 -0
  101. package/dist/esm/types/content-contacts-data.js +0 -0
  102. package/dist/esm/types/content-data.js +0 -0
  103. package/dist/esm/types/content-email-data.js +0 -0
  104. package/dist/esm/types/content-general-data.js +0 -0
  105. package/dist/esm/types/content-id.js +0 -0
  106. package/dist/esm/types/content-join-data.js +0 -0
  107. package/dist/esm/types/content-join-period-data.js +0 -0
  108. package/dist/esm/types/content-join-setup-data.js +0 -0
  109. package/dist/esm/types/content-payment-data.js +0 -0
  110. package/dist/esm/types/content-profile-data.js +0 -0
  111. package/dist/esm/types/content-share-data.js +0 -0
  112. package/dist/esm/types/content-telegram-data.js +0 -0
  113. package/dist/esm/types/contribution-info.js +0 -0
  114. package/dist/esm/types/create-api-key-data.js +0 -0
  115. package/dist/esm/types/create-callout-data.js +0 -0
  116. package/dist/esm/types/create-callout-response-comment-data.js +0 -0
  117. package/dist/esm/types/create-callout-response-data.js +0 -0
  118. package/dist/esm/types/create-callout-tag-data.js +0 -0
  119. package/dist/esm/types/create-contact-data.js +0 -0
  120. package/dist/esm/types/create-notice-data.js +0 -0
  121. package/dist/esm/types/create-segment-data.js +0 -0
  122. package/dist/esm/types/footer-link.js +0 -0
  123. package/dist/esm/types/force-update-contribution-data.js +0 -0
  124. package/dist/esm/types/get-api-key-data.js +0 -0
  125. package/dist/esm/types/get-api-keys-query.js +0 -0
  126. package/dist/esm/types/get-callout-data-with.js +0 -0
  127. package/dist/esm/types/get-callout-data.js +0 -0
  128. package/dist/esm/types/get-callout-form-data.js +0 -0
  129. package/dist/esm/types/get-callout-response-comment-data.js +0 -0
  130. package/dist/esm/types/get-callout-response-comments-query.js +0 -0
  131. package/dist/esm/types/get-callout-response-data-with.js +0 -0
  132. package/dist/esm/types/get-callout-response-data.js +0 -0
  133. package/dist/esm/types/get-callout-response-map-data.js +0 -0
  134. package/dist/esm/types/get-callout-response-with.js +0 -0
  135. package/dist/esm/types/get-callout-responses-query.js +0 -0
  136. package/dist/esm/types/get-callout-tag-data.js +0 -0
  137. package/dist/esm/types/get-callout-with.js +0 -0
  138. package/dist/esm/types/get-callouts-query.js +0 -0
  139. package/dist/esm/types/get-contact-data-with.js +0 -0
  140. package/dist/esm/types/get-contact-data.js +0 -0
  141. package/dist/esm/types/get-contact-with.js +0 -0
  142. package/dist/esm/types/get-contacts-query.js +0 -0
  143. package/dist/esm/types/get-email-data.js +0 -0
  144. package/dist/esm/types/get-notice-data.js +0 -0
  145. package/dist/esm/types/get-notices-query.js +0 -0
  146. package/dist/esm/types/get-payment-data-with.js +0 -0
  147. package/dist/esm/types/get-payment-data.js +0 -0
  148. package/dist/esm/types/get-payment-with.js +0 -0
  149. package/dist/esm/types/get-payments-query.js +0 -0
  150. package/dist/esm/types/get-segment-data-with.js +0 -0
  151. package/dist/esm/types/get-segment-data.js +0 -0
  152. package/dist/esm/types/get-segment-with.js +0 -0
  153. package/dist/esm/types/get-stats-data.js +0 -0
  154. package/dist/esm/types/get-stats-query.js +0 -0
  155. package/dist/esm/types/get-upload-flow-data.js +0 -0
  156. package/dist/esm/types/index.js +81 -0
  157. package/dist/esm/types/noop.js +0 -0
  158. package/dist/esm/types/notice-data.js +0 -0
  159. package/dist/esm/types/parse-iso-options.js +0 -0
  160. package/dist/esm/types/serial.js +0 -0
  161. package/dist/esm/types/set-contribution-data.js +0 -0
  162. package/dist/esm/types/start-contribution-data.js +0 -0
  163. package/dist/esm/types/update-callout-data.js +0 -0
  164. package/dist/esm/types/update-callout-response-comment-data.js +0 -0
  165. package/dist/esm/types/update-callout-response-data.js +0 -0
  166. package/dist/esm/types/update-callout-tag-data.js +0 -0
  167. package/dist/esm/types/update-contact-data.js +0 -0
  168. package/dist/esm/types/update-contact-profile-data.js +0 -0
  169. package/dist/esm/types/update-contact-role-data.js +0 -0
  170. package/dist/esm/types/update-email-data.js +0 -0
  171. package/dist/esm/types/update-reset-password-data.js +0 -0
  172. package/dist/esm/types/update-segment-data.js +0 -0
  173. package/dist/types/data/content-ids.d.ts +2 -0
  174. package/dist/types/data/index.d.ts +1 -0
  175. package/dist/types/search/contacts.d.ts +2 -2
  176. package/dist/types/types/address.d.ts +6 -0
  177. package/dist/types/types/allow-null.d.ts +7 -0
  178. package/dist/types/types/callout-data.d.ts +12 -0
  179. package/dist/types/types/callout-map-schema.d.ts +11 -0
  180. package/dist/types/types/callout-response-comment-data.d.ts +4 -0
  181. package/dist/types/types/callout-response-view-schema.d.ts +13 -0
  182. package/dist/types/types/client-api-error-data.d.ts +7 -0
  183. package/dist/types/types/contact-data.d.ts +6 -0
  184. package/dist/types/types/contact-profile-data.d.ts +14 -0
  185. package/dist/types/types/contact-role-data.d.ts +4 -0
  186. package/dist/types/types/content-contacts-data.d.ts +4 -0
  187. package/dist/types/types/content-data.d.ts +2 -0
  188. package/dist/types/types/content-email-data.d.ts +5 -0
  189. package/dist/types/types/content-general-data.d.ts +18 -0
  190. package/dist/types/types/content-id.d.ts +1 -0
  191. package/dist/types/types/content-join-data.d.ts +17 -0
  192. package/dist/types/types/content-join-period-data.d.ts +5 -0
  193. package/dist/types/types/content-join-setup-data.d.ts +14 -0
  194. package/dist/types/types/content-payment-data.d.ts +7 -0
  195. package/dist/types/types/content-profile-data.d.ts +3 -0
  196. package/dist/types/types/content-share-data.d.ts +6 -0
  197. package/dist/types/types/content-telegram-data.d.ts +4 -0
  198. package/dist/types/types/contribution-info.d.ts +15 -0
  199. package/dist/types/types/create-api-key-data.d.ts +4 -0
  200. package/dist/types/types/create-callout-data.d.ts +4 -0
  201. package/dist/types/types/create-callout-response-comment-data.d.ts +2 -0
  202. package/dist/types/types/create-callout-response-data.d.ts +9 -0
  203. package/dist/types/types/create-callout-tag-data.d.ts +4 -0
  204. package/dist/types/types/create-contact-data.d.ts +8 -0
  205. package/dist/types/types/create-notice-data.d.ts +2 -0
  206. package/dist/types/types/create-segment-data.d.ts +6 -0
  207. package/dist/types/types/footer-link.d.ts +4 -0
  208. package/dist/types/types/force-update-contribution-data.d.ts +8 -0
  209. package/dist/types/types/get-api-key-data.d.ts +8 -0
  210. package/dist/types/types/get-api-keys-query.d.ts +2 -0
  211. package/dist/types/types/get-callout-data-with.d.ts +8 -0
  212. package/dist/types/types/get-callout-data.d.ts +6 -0
  213. package/dist/types/types/get-callout-form-data.d.ts +10 -0
  214. package/dist/types/types/get-callout-response-comment-data.d.ts +7 -0
  215. package/dist/types/types/get-callout-response-comments-query.d.ts +2 -0
  216. package/dist/types/types/get-callout-response-data-with.d.ts +17 -0
  217. package/dist/types/types/get-callout-response-data.d.ts +9 -0
  218. package/dist/types/types/get-callout-response-map-data.d.ts +8 -0
  219. package/dist/types/types/get-callout-response-with.d.ts +1 -0
  220. package/dist/types/types/get-callout-responses-query.d.ts +2 -0
  221. package/dist/types/types/get-callout-tag-data.d.ts +4 -0
  222. package/dist/types/types/get-callout-with.d.ts +1 -0
  223. package/dist/types/types/get-callouts-query.d.ts +2 -0
  224. package/dist/types/types/get-contact-data-with.d.ts +8 -0
  225. package/dist/types/types/get-contact-data.d.ts +10 -0
  226. package/dist/types/types/get-contact-with.d.ts +1 -0
  227. package/dist/types/types/get-contacts-query.d.ts +2 -0
  228. package/dist/types/types/get-email-data.d.ts +4 -0
  229. package/dist/types/types/get-notice-data.d.ts +8 -0
  230. package/dist/types/types/get-notices-query.d.ts +2 -0
  231. package/dist/types/types/get-payment-data-with.d.ts +4 -0
  232. package/dist/types/types/get-payment-data.d.ts +6 -0
  233. package/dist/types/types/get-payment-with.d.ts +1 -0
  234. package/dist/types/types/get-payments-query.d.ts +2 -0
  235. package/dist/types/types/get-segment-data-with.d.ts +4 -0
  236. package/dist/types/types/get-segment-data.d.ts +7 -0
  237. package/dist/types/types/get-segment-with.d.ts +1 -0
  238. package/dist/types/types/get-stats-data.d.ts +5 -0
  239. package/dist/types/types/get-stats-query.d.ts +4 -0
  240. package/dist/types/types/get-upload-flow-data.d.ts +3 -0
  241. package/dist/types/types/index.d.ts +81 -0
  242. package/dist/types/types/noop.d.ts +5 -0
  243. package/dist/types/types/notice-data.d.ts +8 -0
  244. package/dist/types/types/parse-iso-options.d.ts +7 -0
  245. package/dist/types/types/serial.d.ts +3 -0
  246. package/dist/types/types/set-contribution-data.d.ts +7 -0
  247. package/dist/types/types/start-contribution-data.d.ts +5 -0
  248. package/dist/types/types/update-callout-data.d.ts +2 -0
  249. package/dist/types/types/update-callout-response-comment-data.d.ts +3 -0
  250. package/dist/types/types/update-callout-response-data.d.ts +2 -0
  251. package/dist/types/types/update-callout-tag-data.d.ts +2 -0
  252. package/dist/types/types/update-contact-data.d.ts +5 -0
  253. package/dist/types/types/update-contact-profile-data.d.ts +2 -0
  254. package/dist/types/types/update-contact-role-data.d.ts +4 -0
  255. package/dist/types/types/update-email-data.d.ts +2 -0
  256. package/dist/types/types/update-reset-password-data.d.ts +5 -0
  257. package/dist/types/types/update-segment-data.d.ts +2 -0
  258. package/package.json +1 -1
@@ -0,0 +1,4 @@
1
+ import type { UpdateCalloutResponseCommentData } from "./index.ts";
2
+ export interface CalloutResponseCommentData extends UpdateCalloutResponseCommentData {
3
+ responseId: string;
4
+ }
@@ -0,0 +1,13 @@
1
+ import type { CalloutMapSchema } from "./index.ts";
2
+ export interface CalloutResponseViewSchema {
3
+ buckets: string[];
4
+ titleProp: string;
5
+ imageProp: string;
6
+ imageFilter: string;
7
+ links: {
8
+ text: string;
9
+ url: string;
10
+ }[];
11
+ gallery: boolean;
12
+ map: CalloutMapSchema | null;
13
+ }
@@ -0,0 +1,7 @@
1
+ export interface ClientApiErrorData {
2
+ code?: string;
3
+ errors?: {
4
+ [key: string]: unknown;
5
+ };
6
+ httpCode?: number;
7
+ }
@@ -0,0 +1,6 @@
1
+ export interface ContactData {
2
+ email: string;
3
+ firstname: string;
4
+ lastname: string;
5
+ displayName: string;
6
+ }
@@ -0,0 +1,14 @@
1
+ import type { NewsletterStatus } from "../data/index.ts";
2
+ import type { Address } from "./index.ts";
3
+ export interface ContactProfileData {
4
+ telephone: string;
5
+ twitter: string;
6
+ preferredContact: string;
7
+ deliveryOptIn: boolean;
8
+ deliveryAddress: Address | null;
9
+ newsletterStatus: NewsletterStatus;
10
+ newsletterGroups: string[];
11
+ tags?: string[];
12
+ notes?: string;
13
+ description?: string;
14
+ }
@@ -0,0 +1,4 @@
1
+ import type { RoleType, UpdateContactRoleData } from "./index.ts";
2
+ export interface ContactRoleData extends UpdateContactRoleData {
3
+ role: RoleType;
4
+ }
@@ -0,0 +1,4 @@
1
+ export interface ContentContactsData {
2
+ tags: string[];
3
+ manualPaymentSources: string[];
4
+ }
@@ -0,0 +1,2 @@
1
+ import type { ContentContactsData, ContentEmailData, ContentGeneralData, ContentId, ContentJoinData, ContentJoinSetupData, ContentPaymentData, ContentProfileData, ContentShareData, ContentTelegramData } from "./index.ts";
2
+ export type ContentData<Id extends ContentId = ContentId> = Id extends "contacts" ? ContentContactsData : never | Id extends "email" ? ContentEmailData : never | Id extends "general" ? ContentGeneralData : never | Id extends "join" ? ContentJoinData : never | Id extends "join/setup" ? ContentJoinSetupData : never | Id extends "profile" ? ContentProfileData : never | Id extends "share" ? ContentShareData : never | Id extends "payment" ? ContentPaymentData : never | Id extends "telegram" ? ContentTelegramData : never;
@@ -0,0 +1,5 @@
1
+ export interface ContentEmailData {
2
+ footer: string;
3
+ supportEmail: string;
4
+ supportEmailName: string;
5
+ }
@@ -0,0 +1,18 @@
1
+ import type { FooterLink } from "./index.ts";
2
+ export interface ContentGeneralData<L = string> {
3
+ organisationName: string;
4
+ logoUrl: string;
5
+ siteUrl: string;
6
+ supportEmail: string;
7
+ privacyLink: string;
8
+ termsLink: string;
9
+ impressumLink: string;
10
+ /** Current locale, e.g. en, de@informal, ... */
11
+ locale: L;
12
+ theme: object;
13
+ currencyCode: string;
14
+ currencySymbol: string;
15
+ backgroundUrl: string;
16
+ hideContribution: boolean;
17
+ footerLinks: FooterLink[];
18
+ }
@@ -0,0 +1 @@
1
+ export type ContentId = "join" | "join/setup" | "profile" | "general" | "contacts" | "share" | "email" | "payment" | "telegram";
@@ -0,0 +1,17 @@
1
+ import type { ContributionPeriod, PaymentMethod } from "../data/index.ts";
2
+ import type { ContentJoinPeriodData, StripeFeeCountry } from "./index.ts";
3
+ export interface ContentJoinData {
4
+ title: string;
5
+ subtitle: string;
6
+ initialAmount: number;
7
+ initialPeriod: ContributionPeriod;
8
+ minMonthlyAmount: number;
9
+ periods: ContentJoinPeriodData[];
10
+ showAbsorbFee: boolean;
11
+ showNoContribution: boolean;
12
+ paymentMethods: PaymentMethod[];
13
+ /** @deprecated Use {@link ContentPaymentData.stripePublicKey} instead. */
14
+ stripePublicKey: string;
15
+ /** @deprecated Use {@link ContentPaymentData.stripeCountry} instead. */
16
+ stripeCountry: StripeFeeCountry;
17
+ }
@@ -0,0 +1,5 @@
1
+ import { ContributionPeriod } from "../data/index.ts";
2
+ export interface ContentJoinPeriodData {
3
+ name: ContributionPeriod;
4
+ presetAmounts: number[];
5
+ }
@@ -0,0 +1,14 @@
1
+ export interface ContentJoinSetupData {
2
+ welcome: string;
3
+ newsletterText: string;
4
+ newsletterOptIn: string;
5
+ newsletterTitle: string;
6
+ showNewsletterOptIn: boolean;
7
+ showMailOptIn: boolean;
8
+ mailTitle: string;
9
+ mailText: string;
10
+ mailOptIn: string;
11
+ surveySlug: string;
12
+ surveyRequired: boolean;
13
+ surveyText: string;
14
+ }
@@ -0,0 +1,7 @@
1
+ import { StripeFeeCountry } from "./index.ts";
2
+ export interface ContentPaymentData {
3
+ stripePublicKey: string;
4
+ stripeCountry: StripeFeeCountry;
5
+ taxRateEnabled: boolean;
6
+ taxRate: number;
7
+ }
@@ -0,0 +1,3 @@
1
+ export interface ContentProfileData {
2
+ introMessage: string;
3
+ }
@@ -0,0 +1,6 @@
1
+ export interface ContentShareData {
2
+ title: string;
3
+ description: string;
4
+ image: string;
5
+ twitterHandle: string;
6
+ }
@@ -0,0 +1,4 @@
1
+ export interface ContentTelegramData {
2
+ /** Markdown formatted welcome message */
3
+ welcomeMessageMd: string;
4
+ }
@@ -0,0 +1,15 @@
1
+ import type { ContributionPeriod, ContributionType, MembershipStatus } from "../data/index.ts";
2
+ import type { PaymentSource } from "./index.ts";
3
+ export interface ContributionInfo {
4
+ type: ContributionType;
5
+ amount?: number;
6
+ nextAmount?: number;
7
+ period?: ContributionPeriod;
8
+ cancellationDate?: Date;
9
+ renewalDate?: Date;
10
+ paymentSource?: PaymentSource;
11
+ payFee?: boolean;
12
+ hasPendingPayment?: boolean;
13
+ membershipStatus: MembershipStatus;
14
+ membershipExpiryDate?: Date;
15
+ }
@@ -0,0 +1,4 @@
1
+ export interface CreateApiKeyData {
2
+ description: string;
3
+ expires: Date | null;
4
+ }
@@ -0,0 +1,4 @@
1
+ import type { AllowNull, CalloutData, CalloutResponseViewSchema, GetCalloutFormData } from "./index.ts";
2
+ export type CreateCalloutData = AllowNull<CalloutData & GetCalloutFormData & {
3
+ responseViewSchema?: CalloutResponseViewSchema | null;
4
+ }>;
@@ -0,0 +1,2 @@
1
+ import type { CalloutResponseCommentData } from "./index.ts";
2
+ export type CreateCalloutResponseCommentData = CalloutResponseCommentData;
@@ -0,0 +1,9 @@
1
+ import type { CalloutResponseAnswersSlide } from "./index.ts";
2
+ export interface CreateCalloutResponseData {
3
+ guestName?: string;
4
+ guestEmail?: string;
5
+ answers: CalloutResponseAnswersSlide;
6
+ bucket?: string;
7
+ tags?: string[];
8
+ assigneeId?: string | null;
9
+ }
@@ -0,0 +1,4 @@
1
+ export interface CreateCalloutTagData {
2
+ name: string;
3
+ description: string;
4
+ }
@@ -0,0 +1,8 @@
1
+ import type { ContactRoleData, ForceUpdateContributionData, UpdateContactData } from "./index.ts";
2
+ export interface CreateContactData extends UpdateContactData {
3
+ email: string;
4
+ firstname: string;
5
+ lastname: string;
6
+ roles?: ContactRoleData[];
7
+ contribution?: ForceUpdateContributionData;
8
+ }
@@ -0,0 +1,2 @@
1
+ import type { AllowNull, NoticeData } from "./index.ts";
2
+ export type CreateNoticeData = AllowNull<NoticeData>;
@@ -0,0 +1,6 @@
1
+ import type { RuleGroup } from "./index.ts";
2
+ export interface CreateSegmentData {
3
+ name: string;
4
+ ruleGroup: RuleGroup;
5
+ order?: number;
6
+ }
@@ -0,0 +1,4 @@
1
+ export interface FooterLink {
2
+ url: string;
3
+ text: string;
4
+ }
@@ -0,0 +1,8 @@
1
+ import type { ContributionPeriod, ContributionType } from "../data/index.ts";
2
+ export interface ForceUpdateContributionData {
3
+ type: ContributionType.Manual | ContributionType.None;
4
+ amount: number | undefined;
5
+ period: ContributionPeriod | undefined;
6
+ source?: string;
7
+ reference?: string;
8
+ }
@@ -0,0 +1,8 @@
1
+ import type { GetContactData } from "./index.ts";
2
+ export interface GetApiKeyData {
3
+ id: string;
4
+ description: string;
5
+ expires: Date | null;
6
+ creator: GetContactData;
7
+ createdAt: Date;
8
+ }
@@ -0,0 +1,2 @@
1
+ import type { PaginatedQuery } from "./index.ts";
2
+ export type GetApiKeysQuery = PaginatedQuery;
@@ -0,0 +1,8 @@
1
+ import type { CalloutResponseViewSchema, GetCalloutData, GetCalloutFormData, GetCalloutWith, Noop } from "./index.ts";
2
+ export type GetCalloutDataWith<With extends GetCalloutWith> = GetCalloutData & ("responseCount" extends With ? {
3
+ responseCount: number;
4
+ } : Noop) & ("hasAnswered" extends With ? {
5
+ hasAnswered: boolean;
6
+ } : Noop) & ("responseViewSchema" extends With ? {
7
+ responseViewSchema: CalloutResponseViewSchema | null;
8
+ } : Noop) & ("form" extends With ? GetCalloutFormData : Noop);
@@ -0,0 +1,6 @@
1
+ import type { ItemStatus } from "../data/index.ts";
2
+ import type { CalloutData } from "./index.ts";
3
+ export interface GetCalloutData extends CalloutData {
4
+ slug: string;
5
+ status: ItemStatus;
6
+ }
@@ -0,0 +1,10 @@
1
+ import type { GetCalloutFormSchema } from "./index.ts";
2
+ export interface GetCalloutFormData {
3
+ formSchema: GetCalloutFormSchema;
4
+ intro: string;
5
+ thanksText: string;
6
+ thanksTitle: string;
7
+ thanksRedirect?: string;
8
+ shareTitle?: string;
9
+ shareDescription?: string;
10
+ }
@@ -0,0 +1,7 @@
1
+ import type { CalloutResponseCommentData, GetContactData } from "./index.ts";
2
+ export interface GetCalloutResponseCommentData extends CalloutResponseCommentData {
3
+ contact: GetContactData;
4
+ id: string;
5
+ createdAt: Date;
6
+ updatedAt: Date;
7
+ }
@@ -0,0 +1,2 @@
1
+ import type { PaginatedQuery } from "./index.ts";
2
+ export type GetCalloutResponseCommentsQuery = PaginatedQuery;
@@ -0,0 +1,17 @@
1
+ import type { CalloutResponseAnswers, GetCalloutData, GetCalloutResponseCommentData, GetCalloutResponseData, GetCalloutResponseWith, GetContactData, Noop } from "./index.ts";
2
+ export type GetCalloutResponseDataWith<With extends GetCalloutResponseWith> = GetCalloutResponseData & ("answers" extends With ? {
3
+ answers: CalloutResponseAnswers;
4
+ } : Noop) & ("assignee" extends With ? {
5
+ assignee: GetContactData | null;
6
+ } : Noop) & ("callout" extends With ? {
7
+ callout: GetCalloutData;
8
+ } : Noop) & ("contact" extends With ? {
9
+ contact: GetContactData | null;
10
+ } : Noop) & ("latestComment" extends With ? {
11
+ latestComment: GetCalloutResponseCommentData | null;
12
+ } : Noop) & ("tags" extends With ? {
13
+ tags: {
14
+ id: string;
15
+ name: string;
16
+ }[];
17
+ } : Noop);
@@ -0,0 +1,9 @@
1
+ export interface GetCalloutResponseData {
2
+ id: string;
3
+ number: number;
4
+ createdAt: Date;
5
+ updatedAt: Date;
6
+ bucket: string;
7
+ guestName: string | null;
8
+ guestEmail: string | null;
9
+ }
@@ -0,0 +1,8 @@
1
+ import type { CalloutResponseAnswerAddress, CalloutResponseAnswerFileUpload, CalloutResponseAnswers } from "./index.ts";
2
+ export interface GetCalloutResponseMapData {
3
+ number: number;
4
+ answers: CalloutResponseAnswers;
5
+ title: string;
6
+ photos: CalloutResponseAnswerFileUpload[];
7
+ address?: CalloutResponseAnswerAddress;
8
+ }
@@ -0,0 +1 @@
1
+ export type GetCalloutResponseWith = "answers" | "assignee" | "callout" | "contact" | "latestComment" | "tags" | void;
@@ -0,0 +1,2 @@
1
+ import type { PaginatedQuery } from "./index.ts";
2
+ export type GetCalloutResponsesQuery = PaginatedQuery;
@@ -0,0 +1,4 @@
1
+ export interface GetCalloutTagData {
2
+ id: string;
3
+ name: string;
4
+ }
@@ -0,0 +1 @@
1
+ export type GetCalloutWith = "form" | "responseViewSchema" | "responseCount" | "hasAnswered" | void;
@@ -0,0 +1,2 @@
1
+ import type { PaginatedQuery } from "./index.ts";
2
+ export type GetCalloutsQuery = PaginatedQuery;
@@ -0,0 +1,8 @@
1
+ import type { ContactProfileData, ContactRoleData, ContributionInfo, GetContactData, GetContactWith, Noop } from "./index.ts";
2
+ export type GetContactDataWith<With extends GetContactWith> = GetContactData & ("profile" extends With ? {
3
+ profile: ContactProfileData;
4
+ } : Noop) & ("contribution" extends With ? {
5
+ contribution: ContributionInfo;
6
+ } : Noop) & ("roles" extends With ? {
7
+ roles: ContactRoleData[];
8
+ } : Noop);
@@ -0,0 +1,10 @@
1
+ import type { ContributionPeriod } from "../data/index.ts";
2
+ import type { ContactData, RoleType } from "./index.ts";
3
+ export interface GetContactData extends ContactData {
4
+ id: string;
5
+ joined: Date;
6
+ lastSeen?: Date;
7
+ contributionAmount?: number;
8
+ contributionPeriod?: ContributionPeriod;
9
+ activeRoles: RoleType[];
10
+ }
@@ -0,0 +1 @@
1
+ export type GetContactWith = "profile" | "contribution" | "roles" | void;
@@ -0,0 +1,2 @@
1
+ import type { PaginatedQuery } from "./index.ts";
2
+ export type GetContactsQuery = PaginatedQuery;
@@ -0,0 +1,4 @@
1
+ export interface GetEmailData {
2
+ subject: string;
3
+ body: string;
4
+ }
@@ -0,0 +1,8 @@
1
+ import { ItemStatus } from "../data/index.ts";
2
+ import { NoticeData } from "./index.ts";
3
+ export interface GetNoticeData extends NoticeData {
4
+ id: string;
5
+ createdAt: Date;
6
+ updatedAt: Date;
7
+ status: ItemStatus;
8
+ }
@@ -0,0 +1,2 @@
1
+ import type { PaginatedQuery } from "./index.ts";
2
+ export type GetNoticesQuery = PaginatedQuery;
@@ -0,0 +1,4 @@
1
+ import type { GetContactData, GetPaymentData, GetPaymentWith, Noop } from "./index.ts";
2
+ export type GetPaymentDataWith<With extends GetPaymentWith> = GetPaymentData & ("contact" extends With ? {
3
+ contact: GetContactData | null;
4
+ } : Noop);
@@ -0,0 +1,6 @@
1
+ import type { PaymentStatus } from "../data/index.ts";
2
+ export interface GetPaymentData {
3
+ chargeDate: Date;
4
+ amount: number;
5
+ status: PaymentStatus;
6
+ }
@@ -0,0 +1 @@
1
+ export type GetPaymentWith = "contact" | void;
@@ -0,0 +1,2 @@
1
+ import type { PaginatedQuery } from "./index.ts";
2
+ export type GetPaymentsQuery = PaginatedQuery;
@@ -0,0 +1,4 @@
1
+ import { GetSegmentData, GetSegmentWith, Noop } from "./index.ts";
2
+ export type GetSegmentDataWith<With extends GetSegmentWith> = GetSegmentData & ("contactCount" extends With ? {
3
+ contactCount: number;
4
+ } : Noop);
@@ -0,0 +1,7 @@
1
+ import type { RuleGroup } from "./index.ts";
2
+ export interface GetSegmentData {
3
+ id: string;
4
+ name: string;
5
+ ruleGroup: RuleGroup;
6
+ order: number;
7
+ }
@@ -0,0 +1 @@
1
+ export type GetSegmentWith = "contactCount" | void;
@@ -0,0 +1,5 @@
1
+ export interface GetStatsData {
2
+ newContacts: number;
3
+ averageContribution: number | null;
4
+ totalRevenue: number | null;
5
+ }
@@ -0,0 +1,4 @@
1
+ export interface GetStatsQuery {
2
+ from: Date;
3
+ to: Date;
4
+ }
@@ -0,0 +1,3 @@
1
+ export interface GetUploadFlowData {
2
+ id: string;
3
+ }
@@ -1,3 +1,5 @@
1
+ export * from "./address.ts";
2
+ export * from "./allow-null.ts";
1
3
  export * from "./api-key-filter-name.ts";
2
4
  export * from "./array-filter-args.ts";
3
5
  export * from "./base-filter-args.ts";
@@ -50,15 +52,44 @@ export * from "./callout-component-nestable-schema.ts";
50
52
  export * from "./callout-component-nestable-tabs-schema.ts";
51
53
  export * from "./callout-component-nestable-well-schema.ts";
52
54
  export * from "./callout-component-schema.ts";
55
+ export * from "./callout-data.ts";
53
56
  export * from "./callout-filter-name.ts";
57
+ export * from "./callout-map-schema.ts";
54
58
  export * from "./callout-response-answer-address.ts";
55
59
  export * from "./callout-response-answer-file-upload.ts";
56
60
  export * from "./callout-response-answer.ts";
57
61
  export * from "./callout-response-answers-slide.ts";
58
62
  export * from "./callout-response-answers.ts";
63
+ export * from "./callout-response-comment-data.ts";
59
64
  export * from "./callout-response-comment-filter-name.ts";
60
65
  export * from "./callout-response-filter-name.ts";
66
+ export * from "./callout-response-view-schema.ts";
61
67
  export * from "./callout-tag-filter-name.ts";
68
+ export * from "./client-api-error-data.ts";
69
+ export * from "./contact-data.ts";
70
+ export * from "./contact-profile-data.ts";
71
+ export * from "./contact-role-data.ts";
72
+ export * from "./content-contacts-data.ts";
73
+ export * from "./content-data.ts";
74
+ export * from "./content-email-data.ts";
75
+ export * from "./content-general-data.ts";
76
+ export * from "./content-id.ts";
77
+ export * from "./content-join-data.ts";
78
+ export * from "./content-join-period-data.ts";
79
+ export * from "./content-join-setup-data.ts";
80
+ export * from "./content-payment-data.ts";
81
+ export * from "./content-profile-data.ts";
82
+ export * from "./content-share-data.ts";
83
+ export * from "./content-telegram-data.ts";
84
+ export * from "./contribution-info.ts";
85
+ export * from "./create-api-key-data.ts";
86
+ export * from "./create-callout-data.ts";
87
+ export * from "./create-callout-response-comment-data.ts";
88
+ export * from "./create-callout-response-data.ts";
89
+ export * from "./create-callout-tag-data.ts";
90
+ export * from "./create-contact-data.ts";
91
+ export * from "./create-notice-data.ts";
92
+ export * from "./create-segment-data.ts";
62
93
  export * from "./date-unit.ts";
63
94
  export * from "./duration.ts";
64
95
  export * from "./enum-filter-args.ts";
@@ -66,14 +97,51 @@ export * from "./feeable.ts";
66
97
  export * from "./filter-args.ts";
67
98
  export * from "./filter-type.ts";
68
99
  export * from "./filters.ts";
100
+ export * from "./footer-link.ts";
101
+ export * from "./force-update-contribution-data.ts";
102
+ export * from "./get-api-key-data.ts";
103
+ export * from "./get-api-keys-query.ts";
104
+ export * from "./get-callout-data-with.ts";
105
+ export * from "./get-callout-data.ts";
106
+ export * from "./get-callout-form-data.ts";
69
107
  export * from "./get-callout-form-schema.ts";
70
108
  export * from "./get-callout-navigation-schema.ts";
109
+ export * from "./get-callout-response-comment-data.ts";
110
+ export * from "./get-callout-response-comments-query.ts";
111
+ export * from "./get-callout-response-data-with.ts";
112
+ export * from "./get-callout-response-data.ts";
113
+ export * from "./get-callout-response-map-data.ts";
114
+ export * from "./get-callout-response-with.ts";
115
+ export * from "./get-callout-responses-query.ts";
71
116
  export * from "./get-callout-slide-schema.ts";
117
+ export * from "./get-callout-tag-data.ts";
118
+ export * from "./get-callout-with.ts";
119
+ export * from "./get-callouts-query.ts";
120
+ export * from "./get-contact-data-with.ts";
121
+ export * from "./get-contact-data.ts";
122
+ export * from "./get-contact-with.ts";
123
+ export * from "./get-contacts-query.ts";
124
+ export * from "./get-email-data.ts";
125
+ export * from "./get-notice-data.ts";
126
+ export * from "./get-notices-query.ts";
127
+ export * from "./get-payment-data-with.ts";
128
+ export * from "./get-payment-data.ts";
129
+ export * from "./get-payment-with.ts";
130
+ export * from "./get-payments-query.ts";
131
+ export * from "./get-segment-data-with.ts";
132
+ export * from "./get-segment-data.ts";
133
+ export * from "./get-segment-with.ts";
134
+ export * from "./get-stats-data.ts";
135
+ export * from "./get-stats-query.ts";
136
+ export * from "./get-upload-flow-data.ts";
137
+ export * from "./noop.ts";
138
+ export * from "./notice-data.ts";
72
139
  export * from "./notice-filter-name.ts";
73
140
  export * from "./operators-by-type.ts";
74
141
  export * from "./other-filter-args.ts";
75
142
  export * from "./paginated-query.ts";
76
143
  export * from "./paginated.ts";
144
+ export * from "./parse-iso-options.ts";
77
145
  export * from "./payment-filter-name.ts";
78
146
  export * from "./payment-source-go-cardless-direct-debit.ts";
79
147
  export * from "./payment-source-manual.ts";
@@ -89,12 +157,25 @@ export * from "./rule-opperator-params.ts";
89
157
  export * from "./rule-value.ts";
90
158
  export * from "./rule.ts";
91
159
  export * from "./segment-filter-name.ts";
160
+ export * from "./serial.ts";
92
161
  export * from "./set-callout-form-schema.ts";
93
162
  export * from "./set-callout-navigation-schema.ts";
94
163
  export * from "./set-callout-slide-schema.ts";
164
+ export * from "./set-contribution-data.ts";
165
+ export * from "./start-contribution-data.ts";
95
166
  export * from "./stripe-fee-country.ts";
96
167
  export * from "./text-case.ts";
97
168
  export * from "./unit-matches.ts";
169
+ export * from "./update-callout-data.ts";
170
+ export * from "./update-callout-response-comment-data.ts";
171
+ export * from "./update-callout-response-data.ts";
172
+ export * from "./update-callout-tag-data.ts";
173
+ export * from "./update-contact-data.ts";
174
+ export * from "./update-contact-profile-data.ts";
175
+ export * from "./update-contact-role-data.ts";
176
+ export * from "./update-email-data.ts";
177
+ export * from "./update-reset-password-data.ts";
178
+ export * from "./update-segment-data.ts";
98
179
  export * from "./validated-boolean-rule.ts";
99
180
  export * from "./validated-number-rule.ts";
100
181
  export * from "./validated-rule-group.ts";
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Not really sure why but this work for conditional intersections
3
+ * https://stackoverflow.com/questions/65549362/how-to-create-a-conditional-intersection-based-on-a-generic-parameter
4
+ */
5
+ export type Noop = {};
@@ -0,0 +1,8 @@
1
+ export interface NoticeData {
2
+ name: string;
3
+ starts: Date | null;
4
+ expires: Date | null;
5
+ text: string;
6
+ buttonText?: string;
7
+ url?: string;
8
+ }