@winible/winible-typed 1.0.9 → 2.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 (236) hide show
  1. package/dist/migrations/20230206061925-stale.js +13 -0
  2. package/dist/migrations/20230206061925-stale.js.map +1 -0
  3. package/dist/migrations/20230313175015-league-user.js +29 -0
  4. package/dist/migrations/20230313175015-league-user.js.map +1 -0
  5. package/dist/migrations/20230330174702-extend-premium-content.js +35 -0
  6. package/dist/migrations/20230330174702-extend-premium-content.js.map +1 -0
  7. package/dist/migrations/20230405141245-deprecate-agencies.js +9 -0
  8. package/dist/migrations/20230405141245-deprecate-agencies.js.map +1 -0
  9. package/dist/migrations/20230405142440-deprecate-unused-tables.js +23 -0
  10. package/dist/migrations/20230405142440-deprecate-unused-tables.js.map +1 -0
  11. package/dist/migrations/20230410144940-deprecate-consent-people.js +9 -0
  12. package/dist/migrations/20230410144940-deprecate-consent-people.js.map +1 -0
  13. package/dist/migrations/20230410174328-deprecate-consent-people-table.js +9 -0
  14. package/dist/migrations/20230410174328-deprecate-consent-people-table.js.map +1 -0
  15. package/dist/migrations/20230410181920-migrate-credit-payments-to-transactions.js +9 -0
  16. package/dist/migrations/20230410181920-migrate-credit-payments-to-transactions.js.map +1 -0
  17. package/dist/migrations/20230410202433-migrate-credit-payments-fields.js +12 -0
  18. package/dist/migrations/20230410202433-migrate-credit-payments-fields.js.map +1 -0
  19. package/dist/migrations/20230410211059-deprecate-credit-purchases.js +9 -0
  20. package/dist/migrations/20230410211059-deprecate-credit-purchases.js.map +1 -0
  21. package/dist/migrations/20230410212035-deprecate-dashboard_user_permissions.js +10 -0
  22. package/dist/migrations/20230410212035-deprecate-dashboard_user_permissions.js.map +1 -0
  23. package/dist/migrations/20230410212324-deprecate-non-breaking-tables.js +34 -0
  24. package/dist/migrations/20230410212324-deprecate-non-breaking-tables.js.map +1 -0
  25. package/dist/migrations/20230411054826-create-users-table.js +141 -0
  26. package/dist/migrations/20230411054826-create-users-table.js.map +1 -0
  27. package/dist/migrations/20230411202848-migrate_transactions_table.js +24 -0
  28. package/dist/migrations/20230411202848-migrate_transactions_table.js.map +1 -0
  29. package/dist/migrations/20230411203543-migrate_league_users.js +9 -0
  30. package/dist/migrations/20230411203543-migrate_league_users.js.map +1 -0
  31. package/dist/migrations/20230411205324-migrate_league.js +13 -0
  32. package/dist/migrations/20230411205324-migrate_league.js.map +1 -0
  33. package/dist/migrations/20230411221159-migrate_media.js +9 -0
  34. package/dist/migrations/20230411221159-migrate_media.js.map +1 -0
  35. package/dist/migrations/20230411221327-migrate_media_asset.js +10 -0
  36. package/dist/migrations/20230411221327-migrate_media_asset.js.map +1 -0
  37. package/dist/migrations/20230411221842-migrate_media_asset_fields.js +10 -0
  38. package/dist/migrations/20230411221842-migrate_media_asset_fields.js.map +1 -0
  39. package/dist/migrations/20230411222018-migrate_notifications.js +25 -0
  40. package/dist/migrations/20230411222018-migrate_notifications.js.map +1 -0
  41. package/dist/scripts/bet-syncing/findGoodBets.js +238 -0
  42. package/dist/scripts/bet-syncing/findGoodBets.js.map +1 -0
  43. package/dist/scripts/bet-syncing/pullOdds.js +21 -8
  44. package/dist/scripts/bet-syncing/pullOdds.js.map +1 -1
  45. package/dist/scripts/bet-syncing/pullPlayerResults.js +47 -21
  46. package/dist/scripts/bet-syncing/pullPlayerResults.js.map +1 -1
  47. package/dist/scripts/bet-syncing/pullPlayers.js +1 -1
  48. package/dist/scripts/bet-syncing/pullPlayers.js.map +1 -1
  49. package/dist/scripts/bet-syncing/updateStaleOdds.js +34 -0
  50. package/dist/scripts/bet-syncing/updateStaleOdds.js.map +1 -0
  51. package/dist/scripts/cleanupRecurlyPlans.js +12 -5
  52. package/dist/scripts/cleanupRecurlyPlans.js.map +1 -1
  53. package/dist/scripts/mapCurrentPaymentsToInvoiceId.js +12 -5
  54. package/dist/scripts/mapCurrentPaymentsToInvoiceId.js.map +1 -1
  55. package/dist/src/index.js +1 -18
  56. package/dist/src/index.js.map +1 -1
  57. package/dist/typed-model/credit-payment.js +133 -82
  58. package/dist/typed-model/credit-payment.js.map +1 -1
  59. package/dist/typed-model/index.js +3 -81
  60. package/dist/typed-model/index.js.map +1 -1
  61. package/dist/typed-model/league-user.js +60 -0
  62. package/dist/typed-model/league-user.js.map +1 -0
  63. package/dist/typed-model/media-asset.js +0 -9
  64. package/dist/typed-model/media-asset.js.map +1 -1
  65. package/dist/typed-model/notification.js +34 -24
  66. package/dist/typed-model/notification.js.map +1 -1
  67. package/dist/typed-model/odds.js +5 -0
  68. package/dist/typed-model/odds.js.map +1 -1
  69. package/dist/typed-model/pb-sequelize.js +18 -4
  70. package/dist/typed-model/pb-sequelize.js.map +1 -1
  71. package/dist/typed-model/subscription-plan-on-premium-content.js +57 -0
  72. package/dist/typed-model/subscription-plan-on-premium-content.js.map +1 -0
  73. package/dist/typed-model/subscription-plan.js +0 -9
  74. package/dist/typed-model/subscription-plan.js.map +1 -1
  75. package/dist/typed-model/subscription.js +0 -14
  76. package/dist/typed-model/subscription.js.map +1 -1
  77. package/dist/typed-model/user.js +194 -0
  78. package/dist/typed-model/user.js.map +1 -0
  79. package/package.json +4 -3
  80. package/src/index.ts +0 -2
  81. package/typed-model/credit-payment.ts +124 -126
  82. package/typed-model/index.ts +1 -51
  83. package/typed-model/{list-member.ts → league-user.ts} +31 -19
  84. package/typed-model/media-asset.ts +0 -10
  85. package/typed-model/notification.ts +39 -44
  86. package/typed-model/pb-sequelize.ts +18 -4
  87. package/typed-model/subscription-plan.ts +0 -10
  88. package/typed-model/subscription.ts +1 -15
  89. package/typed-model/user.ts +248 -0
  90. package/dist/index.d.ts +0 -3
  91. package/dist/migrations/20220601151258-custom_name_describing_your_migration.d.ts +0 -6
  92. package/dist/migrations/20220605225655-create-dashboard-user-permissions.d.ts +0 -6
  93. package/dist/migrations/20220606001300-update-dashboard-user-permissions.d.ts +0 -6
  94. package/dist/migrations/20220607091109-add-read-date-for-message.d.ts +0 -6
  95. package/dist/migrations/20220616225456-add-delete-columns.d.ts +0 -6
  96. package/dist/migrations/20220709202211-disable-feed.d.ts +0 -6
  97. package/dist/migrations/20220723215213-limit-promotion-claims.d.ts +0 -6
  98. package/dist/migrations/20220723220233-num_claims.d.ts +0 -6
  99. package/dist/migrations/20220723221907-default_false_promos.d.ts +0 -6
  100. package/dist/migrations/20220724172559-default_zero_claims.d.ts +0 -6
  101. package/dist/migrations/20220724201419-pinned_post.d.ts +0 -6
  102. package/dist/migrations/20220729164625-unsend_mass.d.ts +0 -6
  103. package/dist/migrations/20220823033002-interval-unit.d.ts +0 -6
  104. package/dist/migrations/20220830193530-processorId.d.ts +0 -6
  105. package/dist/migrations/20220907121932-add-processor-to-sub.d.ts +0 -6
  106. package/dist/migrations/20220907212232-add-trans-id.d.ts +0 -6
  107. package/dist/migrations/20220907220423-big-int-trans.d.ts +0 -6
  108. package/dist/migrations/20220909161902-add-stale.d.ts +0 -6
  109. package/dist/migrations/20220922000225-verified-spender.d.ts +0 -6
  110. package/dist/migrations/20220922212108-verified-spender-2.d.ts +0 -6
  111. package/dist/migrations/20221013223648-product-subscription-list.d.ts +0 -6
  112. package/dist/migrations/20221014001037-product-subscription-list.d.ts +0 -6
  113. package/dist/migrations/20221026055245-update-type.d.ts +0 -6
  114. package/dist/migrations/20221108060019-recurly-sub.d.ts +0 -6
  115. package/dist/migrations/20221110170148-rename-recurly-account.d.ts +0 -6
  116. package/dist/migrations/20221112212510-archive-promo.d.ts +0 -6
  117. package/dist/migrations/20221117044529-sub-status.d.ts +0 -6
  118. package/dist/migrations/20221122051433-default-plan.d.ts +0 -6
  119. package/dist/migrations/20221128034620-invoice-id.d.ts +0 -6
  120. package/dist/scripts/bet-syncing/pullTeams.d.ts +0 -1
  121. package/dist/scripts/cleanupRecurlyPlans.d.ts +0 -1
  122. package/dist/scripts/createDashboardLink.d.ts +0 -1
  123. package/dist/scripts/createRecurlyPlans.d.ts +0 -1
  124. package/dist/scripts/deleteMalformedImages.d.ts +0 -1
  125. package/dist/scripts/fixSaltedPasswords.js +0 -40
  126. package/dist/scripts/fixSaltedPasswords.js.map +0 -1
  127. package/dist/scripts/mapCurrentPaymentsToInvoiceId.d.ts +0 -1
  128. package/dist/scripts/payoutRecurlySubs.d.ts +0 -1
  129. package/dist/scripts/payoutSubscriptions.d.ts +0 -1
  130. package/dist/scripts/removeUnreferenceSubs.d.ts +0 -1
  131. package/dist/scripts/test.d.ts +0 -1
  132. package/dist/slack/index.d.ts +0 -1
  133. package/dist/slack/v1/bypassCreator.d.ts +0 -8
  134. package/dist/slack/v1/cancelSubscription.d.ts +0 -6
  135. package/dist/slack/v1/changeName.d.ts +0 -8
  136. package/dist/slack/v1/checkAuthSub.d.ts +0 -6
  137. package/dist/slack/v1/dashboardLink.d.ts +0 -8
  138. package/dist/slack/v1/index.d.ts +0 -7
  139. package/dist/slack/v1/refund.d.ts +0 -6
  140. package/dist/slack/v1/searchUser.d.ts +0 -6
  141. package/dist/src/index.d.ts +0 -3
  142. package/dist/src/pk-client.d.ts +0 -151
  143. package/dist/src/pk-sub.d.ts +0 -77
  144. package/dist/src/recurlyInstance.d.ts +0 -3
  145. package/dist/src/types.d.ts +0 -30
  146. package/dist/support/index.d.ts +0 -2
  147. package/dist/support/slack-client.d.ts +0 -3
  148. package/dist/support/uploadcare.d.ts +0 -14
  149. package/dist/support/utils.d.ts +0 -2
  150. package/dist/typed-model/asset-category.d.ts +0 -9
  151. package/dist/typed-model/asset-constent-person.d.ts +0 -13
  152. package/dist/typed-model/bet.d.ts +0 -12
  153. package/dist/typed-model/blocked-ip.d.ts +0 -8
  154. package/dist/typed-model/category-tag.d.ts +0 -9
  155. package/dist/typed-model/consent-person.d.ts +0 -13
  156. package/dist/typed-model/content-category-tag.d.ts +0 -9
  157. package/dist/typed-model/content-like.d.ts +0 -10
  158. package/dist/typed-model/credit-payment.d.ts +0 -34
  159. package/dist/typed-model/credit-payout.d.ts +0 -10
  160. package/dist/typed-model/credit-purchase.d.ts +0 -10
  161. package/dist/typed-model/customer-profile.d.ts +0 -17
  162. package/dist/typed-model/dashboard-user-permissions.d.ts +0 -9
  163. package/dist/typed-model/dashboard-user.d.ts +0 -20
  164. package/dist/typed-model/fan-list.d.ts +0 -10
  165. package/dist/typed-model/fraud.d.ts +0 -9
  166. package/dist/typed-model/game.d.ts +0 -56
  167. package/dist/typed-model/index.d.ts +0 -46
  168. package/dist/typed-model/league.d.ts +0 -9
  169. package/dist/typed-model/list-member.d.ts +0 -9
  170. package/dist/typed-model/mass-message.d.ts +0 -11
  171. package/dist/typed-model/media-asset.d.ts +0 -15
  172. package/dist/typed-model/media-category.d.ts +0 -10
  173. package/dist/typed-model/media.d.ts +0 -14
  174. package/dist/typed-model/message-media.d.ts +0 -9
  175. package/dist/typed-model/message.d.ts +0 -27
  176. package/dist/typed-model/notification.d.ts +0 -18
  177. package/dist/typed-model/odds.d.ts +0 -30
  178. package/dist/typed-model/parlay.d.ts +0 -8
  179. package/dist/typed-model/pb-sequelize.d.ts +0 -3
  180. package/dist/typed-model/phone-chat-participation.d.ts +0 -20
  181. package/dist/typed-model/phone-chat.d.ts +0 -16
  182. package/dist/typed-model/phone-owner.d.ts +0 -53
  183. package/dist/typed-model/phone-user.d.ts +0 -21
  184. package/dist/typed-model/player.d.ts +0 -22
  185. package/dist/typed-model/premium-content.d.ts +0 -23
  186. package/dist/typed-model/purchased-content.d.ts +0 -11
  187. package/dist/typed-model/recurly-account.d.ts +0 -9
  188. package/dist/typed-model/short-url.d.ts +0 -12
  189. package/dist/typed-model/subscription-bundle.d.ts +0 -12
  190. package/dist/typed-model/subscription-category-tags.d.ts +0 -9
  191. package/dist/typed-model/subscription-plan.d.ts +0 -27
  192. package/dist/typed-model/subscription-promotion.d.ts +0 -19
  193. package/dist/typed-model/subscription.d.ts +0 -26
  194. package/dist/typed-model/team.d.ts +0 -16
  195. package/dist/typed-model/twilio-phone.d.ts +0 -17
  196. package/dist/typed-model/user-follow.d.ts +0 -13
  197. package/dist/typed-model/verification-code.d.ts +0 -11
  198. package/dist/webhooks/index.d.ts +0 -1
  199. package/dist/webhooks/payment/index.d.ts +0 -1
  200. package/dist/webhooks/payment/refund.d.ts +0 -2
  201. package/src/pk-client.ts +0 -1650
  202. package/src/pk-sub.ts +0 -455
  203. package/typed-model/asset-category.ts +0 -57
  204. package/typed-model/asset-constent-person.ts +0 -82
  205. package/typed-model/bet.ts +0 -84
  206. package/typed-model/blocked-ip.ts +0 -52
  207. package/typed-model/category-tag.ts +0 -66
  208. package/typed-model/consent-person.ts +0 -78
  209. package/typed-model/content-category-tag.ts +0 -79
  210. package/typed-model/credit-purchase.ts +0 -67
  211. package/typed-model/customer-profile.ts +0 -71
  212. package/typed-model/dashboard-user-permissions.ts +0 -51
  213. package/typed-model/dashboard-user.ts +0 -146
  214. package/typed-model/fan-list.ts +0 -68
  215. package/typed-model/fraud.ts +0 -62
  216. package/typed-model/game.ts +0 -311
  217. package/typed-model/market.ts +0 -54
  218. package/typed-model/mass-message.ts +0 -64
  219. package/typed-model/media-category.ts +0 -70
  220. package/typed-model/message-media.ts +0 -74
  221. package/typed-model/message.ts +0 -258
  222. package/typed-model/odds.ts +0 -232
  223. package/typed-model/parlay.ts +0 -47
  224. package/typed-model/phone-chat-participation.ts +0 -166
  225. package/typed-model/phone-chat.ts +0 -185
  226. package/typed-model/player-result.ts +0 -93
  227. package/typed-model/player.ts +0 -118
  228. package/typed-model/short-url.ts +0 -120
  229. package/typed-model/sportsbook.ts +0 -48
  230. package/typed-model/subscription-bundle.ts +0 -80
  231. package/typed-model/subscription-category-tags.ts +0 -79
  232. package/typed-model/subscription-promotion.ts +0 -134
  233. package/typed-model/team.ts +0 -91
  234. package/typed-model/twilio-phone.ts +0 -149
  235. package/typed-model/user-follow.ts +0 -141
  236. package/typed-model/verification-code.ts +0 -74
@@ -1,7 +0,0 @@
1
- export { default as refund } from "./refund";
2
- export { default as searchUser } from "./searchUser";
3
- export { default as cancelSubscription } from "./cancelSubscription";
4
- export { default as checkAuthSub } from "./checkAuthSub";
5
- export { default as bypassCreator } from "./bypassCreator";
6
- export { default as changeName } from "./changeName";
7
- export { default as dashboardlink } from "./dashboardLink";
@@ -1,6 +0,0 @@
1
- declare const _default: ({ ack, say, payload }: {
2
- ack: any;
3
- say: any;
4
- payload: any;
5
- }) => Promise<any>;
6
- export default _default;
@@ -1,6 +0,0 @@
1
- declare const _default: ({ ack, say, payload }: {
2
- ack: any;
3
- say: any;
4
- payload: any;
5
- }) => Promise<void>;
6
- export default _default;
@@ -1,3 +0,0 @@
1
- export { default as pkClient } from "./pk-client";
2
- export * from "./pk-sub";
3
- export { default as recurlyInstance } from "./recurlyInstance";
@@ -1,151 +0,0 @@
1
- import PKCustomerProfile, { ProcessorId } from "../typed-model/customer-profile";
2
- import PhoneUser from "../typed-model/phone-user";
3
- import { APIContracts } from "authorizenet";
4
- import { TransactionData, PkSubStatus } from "./types";
5
- import { Subscription } from "../typed-model";
6
- export declare type TransactionStatus = "authorizedPendingCapture" | "capturedPendingSettlement" | "communicationError" | "refundSettledSuccessfully" | "refundPendingSettlement" | "approvedReview" | "declined" | "couldNotVoid" | "expired" | "generalError" | "failedReview" | "settledSuccessfully" | "settlementError" | "underReview" | "voided" | "FDSPendingReview" | "FDSAuthorizedPendingReview" | "returnedItem";
7
- export declare const createCustomerProfile: (user: PhoneUser, data: TransactionData) => Promise<unknown>;
8
- export declare const getCustomerProfile: (customerProfileId?: string, userId?: string) => Promise<any>;
9
- export declare const getCustomerPaymentProfile: (customerProfileId: string, customerPaymentProfileId: string) => Promise<TransactionData>;
10
- export declare const addPaymentProfile: (customerProfileId: string, data: TransactionData) => Promise<string>;
11
- export declare const deleteCustomerProfile: (customerProfileId: string, customerPaymentProfileId: string) => Promise<unknown>;
12
- export declare const updateCustomerProfile: (customerProfileId: string, customerPaymentProfileId: string, data: TransactionData) => Promise<{
13
- customerPaymentProfileId: string;
14
- processorId: ProcessorId;
15
- }>;
16
- export declare const chargeCreditCardAndCreateProfile: (user: PhoneUser, data: TransactionData, amountInCents: number, description: string, skipProfileCreation?: boolean, useCoachingMid?: boolean) => Promise<{
17
- amountInCents: number;
18
- transactionId: string;
19
- pkCustomerProfileId?: string | undefined;
20
- pkCustomerPaymentProfileId?: string | undefined;
21
- processorId: ProcessorId;
22
- }>;
23
- export declare const purchaseCreditsWithCreditCardAndCreatorProfile: (user: PhoneUser, data: TransactionData, amountInCents: number) => Promise<{
24
- amountInCents: number;
25
- transactionId: string;
26
- processorId: ProcessorId;
27
- }>;
28
- export declare const purchaseCreditsWithCustomerProfile: (customerProfileId: string, customerPaymentProfileId: string, amountInCents: number) => Promise<{
29
- amountInCents: number;
30
- transactionId: string;
31
- processorId: ProcessorId;
32
- }>;
33
- export declare const chargeCustomerByPaymentProfile: (customerProfileId: string, customerPaymentProfileId: string, amountInCents: number, description: string) => Promise<{
34
- amountInCents: number;
35
- transactionId: string;
36
- processorId: ProcessorId;
37
- }>;
38
- export declare function createSubscription({ intervalCount, intervalUnit, trialLength, amountInCents, trialAmountInCents, customerProfileId, customerPaymentProfileId, creatorName, processorId, startDate, }: {
39
- intervalCount: number;
40
- intervalUnit: "months" | "days";
41
- trialAmountInCents: number;
42
- trialLength: number;
43
- amountInCents: number;
44
- customerProfileId: string;
45
- customerPaymentProfileId: string;
46
- creatorName: string;
47
- processorId: ProcessorId;
48
- startDate?: Date;
49
- }): Promise<{
50
- pkSubId: string;
51
- }>;
52
- export declare function createSubscriptionWithCreditCard({ intervalCount, intervalUnit, trialLength, amountInCents, trialAmountInCents, data, creatorName, processorId: processorId, }: {
53
- intervalCount: number;
54
- intervalUnit: "months" | "days";
55
- trialAmountInCents: number;
56
- trialLength: number;
57
- amountInCents: number;
58
- data: TransactionData;
59
- creatorName: string;
60
- processorId: ProcessorId;
61
- }): Promise<{
62
- pkSubId: string;
63
- paymentProfile: {
64
- pkCustomerProfileId?: string;
65
- pkCustomerPaymentProfileId?: string;
66
- processorId: ProcessorId;
67
- };
68
- }>;
69
- export declare function cancelSubscription(subscription: Subscription, processorId: ProcessorId): Promise<unknown>;
70
- export declare function updateSubscription({ authSubscriptionId, intervalCount, intervalUnit, processorId: processorId, }: {
71
- authSubscriptionId: number;
72
- intervalCount: number;
73
- intervalUnit: "months" | "days";
74
- processorId: ProcessorId;
75
- }): Promise<unknown>;
76
- export declare function getSubscription(subscriptionId: string, processorId: ProcessorId): Promise<unknown>;
77
- export declare function getSubscriptionStatus(subscriptionId: string, processorId: ProcessorId): Promise<PkSubStatus>;
78
- export declare function getSubscriptionList(processorId: ProcessorId, inactive?: boolean): Promise<APIContracts.SubscriptionDetail[]>;
79
- export declare function voidTransaction(transactionId: string, processorId: ProcessorId): Promise<unknown>;
80
- export declare const updateUserPaymentProfile: (userId: string, customerProfileId: string, processorId: ProcessorId, pkCustomerPaymentProfileId?: string) => Promise<PKCustomerProfile>;
81
- export declare function getTransactionsForCustomerProfile({ customerProfileId, processorId, }: {
82
- customerProfileId: string;
83
- processorId: ProcessorId;
84
- }): Promise<{
85
- transId: string;
86
- amountInCents: number;
87
- status: string;
88
- }[]>;
89
- export declare function refundTransaction({ transId, creditCard, customerProfile, amountInCents, processorId, }: {
90
- transId: number;
91
- creditCard?: APIContracts.CreditCardMaskedType;
92
- customerProfile?: APIContracts.CustomerProfileIdType;
93
- amountInCents: number;
94
- processorId: ProcessorId;
95
- }): Promise<{
96
- refundTransactionId: string;
97
- }>;
98
- export declare function getTransactionStatus({ transId, processorId, }: {
99
- transId: number;
100
- processorId: ProcessorId;
101
- }): Promise<{
102
- status: TransactionStatus;
103
- transId: number;
104
- code: "1" | "2" | "3" | "4";
105
- settleAmountInCents: number;
106
- creditCard?: APIContracts.CreditCardMaskedType;
107
- customerProfile?: APIContracts.CustomerProfileIdType;
108
- }>;
109
- declare const _default: {
110
- createCustomerProfile: (user: PhoneUser, data: TransactionData) => Promise<unknown>;
111
- getCustomerProfile: (customerProfileId?: string | undefined, userId?: string | undefined) => Promise<any>;
112
- addPaymentProfile: (customerProfileId: string, data: TransactionData) => Promise<string>;
113
- deleteCustomerProfile: (customerProfileId: string, customerPaymentProfileId: string) => Promise<unknown>;
114
- updateCustomerProfile: (customerProfileId: string, customerPaymentProfileId: string, data: TransactionData) => Promise<{
115
- customerPaymentProfileId: string;
116
- processorId: ProcessorId;
117
- }>;
118
- purchaseCreditsWithCustomerProfile: (customerProfileId: string, customerPaymentProfileId: string, amountInCents: number) => Promise<{
119
- amountInCents: number;
120
- transactionId: string;
121
- processorId: ProcessorId;
122
- }>;
123
- purchaseCreditsWithCreditCardAndCreatorProfile: (user: PhoneUser, data: TransactionData, amountInCents: number) => Promise<{
124
- amountInCents: number;
125
- transactionId: string;
126
- processorId: ProcessorId;
127
- }>;
128
- createSubscription: typeof createSubscription;
129
- cancelSubscription: typeof cancelSubscription;
130
- getSubscription: typeof getSubscription;
131
- getSubscriptionStatus: typeof getSubscriptionStatus;
132
- chargeCustomerByPaymentProfile: (customerProfileId: string, customerPaymentProfileId: string, amountInCents: number, description: string) => Promise<{
133
- amountInCents: number;
134
- transactionId: string;
135
- processorId: ProcessorId;
136
- }>;
137
- getSubscriptionList: typeof getSubscriptionList;
138
- updateUserPaymentProfile: (userId: string, customerProfileId: string, processorId: ProcessorId, pkCustomerPaymentProfileId?: string | undefined) => Promise<PKCustomerProfile>;
139
- voidTransaction: typeof voidTransaction;
140
- chargeCreditCardAndCreateProfile: (user: PhoneUser, data: TransactionData, amountInCents: number, description: string, skipProfileCreation?: boolean | undefined, useCoachingMid?: boolean | undefined) => Promise<{
141
- amountInCents: number;
142
- transactionId: string;
143
- pkCustomerProfileId?: string | undefined;
144
- pkCustomerPaymentProfileId?: string | undefined;
145
- processorId: ProcessorId;
146
- }>;
147
- getTransactionsForCustomerProfile: typeof getTransactionsForCustomerProfile;
148
- getTransactionStatus: typeof getTransactionStatus;
149
- refundTransaction: typeof refundTransaction;
150
- };
151
- export default _default;
@@ -1,77 +0,0 @@
1
- import PhoneUser from "../typed-model/phone-user";
2
- import PhoneOwner from "../typed-model/phone-owner";
3
- import SubscriptionPlan from "../typed-model/subscription-plan";
4
- import SubscriptionBundle from "../typed-model/subscription-bundle";
5
- import { TransactionData } from "./types";
6
- import { ProcessorId } from "../typed-model/customer-profile";
7
- export declare class SubscriptionInitException extends Error {
8
- constructor(message: string);
9
- }
10
- export declare class SubscriptionChargeException extends Error {
11
- constructor(message: string);
12
- }
13
- export declare class SubscriptionChargeCreditCardException extends SubscriptionChargeException {
14
- constructor(message: string);
15
- }
16
- export declare class SubscriptionChargeProfileException extends SubscriptionChargeException {
17
- constructor(message: string);
18
- }
19
- export declare class CreatePaymentProfileException extends Error {
20
- constructor(message: string);
21
- }
22
- export declare class InvalidSubscriptionRequestException extends Error {
23
- constructor(message: string);
24
- }
25
- export declare class CliqSubscriptionCreationException extends Error {
26
- constructor(message: string);
27
- }
28
- export declare class CliqPaymentCreationException extends Error {
29
- constructor();
30
- }
31
- export declare class CreatePKSubscriptionException extends Error {
32
- constructor(name: string, message: string);
33
- }
34
- export declare class PKSub {
35
- user: PhoneUser;
36
- creator: PhoneOwner;
37
- subscriptionPlan: SubscriptionPlan;
38
- trialAmount: number;
39
- trialLength: number;
40
- amountInCents: number;
41
- intervalCount: number;
42
- intervalUnit: "months" | "days";
43
- transactionData?: TransactionData;
44
- useCoachingMid: boolean;
45
- paymentProfile?: {
46
- customerProfileId: string;
47
- customerPaymentProfileId: string;
48
- };
49
- constructor(user: PhoneUser, creator: PhoneOwner, subscriptionPlan: SubscriptionPlan, subscriptionBundle?: SubscriptionBundle, isPreviouslySubscribed?: boolean, useCoachingMid?: boolean);
50
- _charge(amount: number, description: string): Promise<{
51
- amountInCents: number;
52
- transactionId: string;
53
- pkCustomerProfileId?: string;
54
- pkCustomerPaymentProfileId?: string;
55
- processorId: ProcessorId;
56
- } | undefined>;
57
- _chargeFirstPayment(): Promise<{
58
- amountInCents: number;
59
- transactionId: string;
60
- pkCustomerProfileId?: string;
61
- pkCustomerPaymentProfileId?: string;
62
- processorId: ProcessorId;
63
- }>;
64
- _initializePkSubscription(processorId: ProcessorId): Promise<{
65
- pkSubId: string;
66
- }>;
67
- setTransactionData(transactionData: TransactionData): void;
68
- setPaymentProfile(paymentProfile: {
69
- customerProfileId: string;
70
- customerPaymentProfileId: string;
71
- }): void;
72
- buildSubscription(): Promise<{
73
- subscription: any;
74
- creditPayment: any;
75
- pkSubId: string;
76
- }>;
77
- }
@@ -1,3 +0,0 @@
1
- import * as recurly from "recurly";
2
- declare const _default: recurly.Client;
3
- export default _default;
@@ -1,30 +0,0 @@
1
- export declare type CreditCard = {
2
- cardNumber: string;
3
- expirationDate: string;
4
- cardCode: string;
5
- };
6
- export declare type Payment = {
7
- creditCard: CreditCard;
8
- };
9
- export declare type Address = {
10
- firstName: string;
11
- lastName: string;
12
- address: string;
13
- city: string;
14
- zip: string;
15
- country: string;
16
- state: string;
17
- };
18
- export declare type TransactionData = {
19
- payment: Payment;
20
- billTo: Address;
21
- defaultPaymentProfile: string;
22
- };
23
- export declare type PkSubStatus = "active" | "expired" | "suspended" | "canceled" | "terminated";
24
- export declare type ArbTransaction = {
25
- getTransId: () => string;
26
- getResponse: () => string;
27
- getSubmitTimeUTC: () => string;
28
- getPayNum: () => number;
29
- getAttemptNum: () => string;
30
- };
@@ -1,2 +0,0 @@
1
- export * from "./slack-client";
2
- export * from "./utils";
@@ -1,3 +0,0 @@
1
- export declare const postSlackNotification: (body: any) => Promise<void>;
2
- export declare const postSlackText: (text: string) => Promise<void>;
3
- export declare const postSubscriptionAlarm: (pkIds: string[]) => Promise<void>;
@@ -1,14 +0,0 @@
1
- /// <reference types="node" />
2
- import crypto = require("crypto");
3
- export default function (public_key: string, private_key: crypto.BinaryLike | crypto.KeyObject, options: {}): {
4
- files: {
5
- store: (fileId: string, callback: any) => void;
6
- storeCustom: (fileId: any, target: any, callback: any) => void;
7
- info: (fileId: string, callback: any) => void;
8
- remove: (fileId: string, callback: any) => void;
9
- removeMultiple: (fileIds: any, callback: any) => void;
10
- };
11
- videos: {
12
- convert: (fileId: string, callback: any) => void;
13
- };
14
- };
@@ -1,2 +0,0 @@
1
- export declare const convertVideoToMp4: (url: string) => Promise<string>;
2
- export declare const convertImageUrlToImageKit: (url: string, transformation: any) => string;
@@ -1,9 +0,0 @@
1
- import { Model, InferAttributes, InferCreationAttributes, CreationOptional } from "sequelize";
2
- declare class AssetCategory extends Model<InferAttributes<AssetCategory>, InferCreationAttributes<AssetCategory>> {
3
- id: CreationOptional<string>;
4
- mediaAssetId: string;
5
- mediaCategoryId: string;
6
- createdAt: CreationOptional<Date>;
7
- updatedAt: CreationOptional<Date>;
8
- }
9
- export default AssetCategory;
@@ -1,13 +0,0 @@
1
- import { Model, InferAttributes, InferCreationAttributes, CreationOptional, NonAttribute } from "sequelize";
2
- import ConsentPerson from "./consent-person";
3
- import MediaAsset from "./media-asset";
4
- declare class AssetConsentPerson extends Model<InferAttributes<AssetConsentPerson>, InferCreationAttributes<AssetConsentPerson>> {
5
- id: CreationOptional<string>;
6
- consentPersonId: string;
7
- mediaAssetId: string;
8
- createdAt: CreationOptional<Date>;
9
- updatedAt: CreationOptional<Date>;
10
- consent_person?: NonAttribute<ConsentPerson>;
11
- media_asset?: NonAttribute<MediaAsset[]>;
12
- }
13
- export default AssetConsentPerson;
@@ -1,12 +0,0 @@
1
- import { Model, InferAttributes, InferCreationAttributes, CreationOptional } from "sequelize";
2
- declare class Bet extends Model<InferAttributes<Bet>, InferCreationAttributes<Bet>> {
3
- id: CreationOptional<string>;
4
- oddsJamOddsId: string;
5
- oddsId: string;
6
- price: number;
7
- userId: string;
8
- parlayId?: string;
9
- createdAt: CreationOptional<Date>;
10
- updatedAt: CreationOptional<Date>;
11
- }
12
- export default Bet;
@@ -1,8 +0,0 @@
1
- import { Model, InferAttributes, InferCreationAttributes, CreationOptional } from "sequelize";
2
- declare class BlockedIP extends Model<InferAttributes<BlockedIP>, InferCreationAttributes<BlockedIP>> {
3
- id: CreationOptional<string>;
4
- ipAddress: string;
5
- createdAt: CreationOptional<Date>;
6
- updatedAt: CreationOptional<Date>;
7
- }
8
- export default BlockedIP;
@@ -1,9 +0,0 @@
1
- import { Model, InferAttributes, InferCreationAttributes, CreationOptional } from "sequelize";
2
- declare class CategoryTag extends Model<InferAttributes<CategoryTag>, InferCreationAttributes<CategoryTag>> {
3
- id: CreationOptional<string>;
4
- ownerId: string;
5
- name: string;
6
- createdAt: CreationOptional<Date>;
7
- updatedAt: CreationOptional<Date>;
8
- }
9
- export default CategoryTag;
@@ -1,13 +0,0 @@
1
- import { Model, InferAttributes, InferCreationAttributes, CreationOptional } from "sequelize";
2
- declare class ConsentPerson extends Model<InferAttributes<ConsentPerson>, InferCreationAttributes<ConsentPerson>> {
3
- id: CreationOptional<string>;
4
- ownerId: string;
5
- fullName: string;
6
- birthday: Date;
7
- consentFormKey: string;
8
- idImageKey: string;
9
- reviewStatus: "pending" | "approved";
10
- createdAt: CreationOptional<Date>;
11
- updatedAt: CreationOptional<Date>;
12
- }
13
- export default ConsentPerson;
@@ -1,9 +0,0 @@
1
- import { Model, InferAttributes, InferCreationAttributes, CreationOptional } from "sequelize";
2
- declare class ContentCategoryTag extends Model<InferAttributes<ContentCategoryTag>, InferCreationAttributes<ContentCategoryTag>> {
3
- id: CreationOptional<string>;
4
- contentId: string;
5
- tagId: string;
6
- createdAt: CreationOptional<Date>;
7
- updatedAt: CreationOptional<Date>;
8
- }
9
- export default ContentCategoryTag;
@@ -1,10 +0,0 @@
1
- import { Model, InferAttributes, InferCreationAttributes, CreationOptional } from "sequelize";
2
- declare class ContentLike extends Model<InferAttributes<ContentLike>, InferCreationAttributes<ContentLike>> {
3
- id: CreationOptional<string>;
4
- contentId: string;
5
- userId: string;
6
- createdAt: CreationOptional<Date>;
7
- updatedAt: CreationOptional<Date>;
8
- static getById: (id: string) => Promise<ContentLike | null>;
9
- }
10
- export default ContentLike;
@@ -1,34 +0,0 @@
1
- import { Transaction } from "sequelize";
2
- import { Model, InferAttributes, InferCreationAttributes, CreationOptional } from "sequelize";
3
- import PhoneOwner from "./phone-owner";
4
- import PhoneUser from "./phone-user";
5
- import PremiumContent from "./premium-content";
6
- import Message from "./message";
7
- import Subscription from "./subscription";
8
- declare type InteractionType = "subscription" | "tip" | "text" | "unlock_message" | "content" | "unlock" | "audio" | "referral" | "video";
9
- declare class CreditPayments extends Model<InferAttributes<CreditPayments>, InferCreationAttributes<CreditPayments>> {
10
- id: CreationOptional<string>;
11
- userId?: string;
12
- ownerId: string;
13
- creditAmountInCents: number;
14
- interactionType: InteractionType;
15
- payoutDate?: Date;
16
- metadata?: string;
17
- earningAmountInCents: number;
18
- payoutId?: string;
19
- referredCreditPaymentId?: string;
20
- transId?: number;
21
- invoiceId?: string;
22
- createdAt: CreationOptional<Date>;
23
- updatedAt: CreationOptional<Date>;
24
- static getById: (id: string) => Promise<CreditPayments | null>;
25
- static logContentPurchase: (user: PhoneUser, contentId: string, owner: PhoneOwner, alreadyPaid?: boolean, transaction?: Transaction, invoiceId?: string) => Promise<CreditPayments>;
26
- static logMessage: (user: PhoneUser, owner: PhoneOwner, chatRateInCents: number) => Promise<CreditPayments>;
27
- static logTip: (user: PhoneUser, owner: PhoneOwner, tipAmountInCents: number) => Promise<CreditPayments>;
28
- static logAudioCall: (user: PhoneUser, owner: PhoneOwner, callAmountInCents: number) => Promise<CreditPayments>;
29
- static logVideoCall: (user: PhoneUser, owner: PhoneOwner, callAmountInCents: number) => Promise<CreditPayments>;
30
- static logUnlockMessage: (user: PhoneUser, owner: PhoneOwner, message: Message, alreadyPaid?: boolean, transaction?: Transaction, invoiceId?: string) => Promise<CreditPayments>;
31
- static logSubscriptionPayment: (userId: string, owner: PhoneOwner, subscriptionAmountInCents: number, subscription: Subscription, transaction: Transaction | undefined, invoiceId?: string) => Promise<CreditPayments>;
32
- static logUnlockedContent: (user: PhoneUser, owner: PhoneOwner, lockedContent: PremiumContent) => Promise<CreditPayments>;
33
- }
34
- export default CreditPayments;
@@ -1,10 +0,0 @@
1
- import { Model, InferAttributes, InferCreationAttributes, CreationOptional } from "sequelize";
2
- declare class CreditPayout extends Model<InferAttributes<CreditPayout>, InferCreationAttributes<CreditPayout>> {
3
- id: CreationOptional<string>;
4
- ownerId: string;
5
- agencyId?: string;
6
- amountInCents: number;
7
- createdAt: CreationOptional<Date>;
8
- updatedAt: CreationOptional<Date>;
9
- }
10
- export default CreditPayout;
@@ -1,10 +0,0 @@
1
- import { Model, InferAttributes, InferCreationAttributes, CreationOptional } from "sequelize";
2
- declare class CreditPurchase extends Model<InferAttributes<CreditPurchase>, InferCreationAttributes<CreditPurchase>> {
3
- id: CreationOptional<string>;
4
- userId: string;
5
- creditAmountInCents: number;
6
- createdAt: CreationOptional<Date>;
7
- updatedAt: CreationOptional<Date>;
8
- static getById: (id: string) => Promise<CreditPurchase | null>;
9
- }
10
- export default CreditPurchase;
@@ -1,17 +0,0 @@
1
- import { Model, InferAttributes, InferCreationAttributes, CreationOptional } from "sequelize";
2
- export declare enum ProcessorId {
3
- HUMBOLDT = "humboldt",
4
- KAJA = "kaja",
5
- KAJACOACHING = "kajacoaching",
6
- RECURLY = "recurly"
7
- }
8
- declare class PKCustomerProfile extends Model<InferAttributes<PKCustomerProfile>, InferCreationAttributes<PKCustomerProfile>> {
9
- id: CreationOptional<string>;
10
- userId: string;
11
- customerProfileId: string;
12
- defaultPaymentProfileId?: string;
13
- processorId: ProcessorId;
14
- createdAt: CreationOptional<Date>;
15
- updatedAt: CreationOptional<Date>;
16
- }
17
- export default PKCustomerProfile;
@@ -1,9 +0,0 @@
1
- import { Model, InferAttributes, InferCreationAttributes, CreationOptional } from "sequelize";
2
- declare class DashboardUserPermissions extends Model<InferAttributes<DashboardUserPermissions>, InferCreationAttributes<DashboardUserPermissions>> {
3
- id: CreationOptional<string>;
4
- dashboardUserId: string;
5
- role: "admin" | "message-only";
6
- createdAt: CreationOptional<Date>;
7
- updatedAt: CreationOptional<Date>;
8
- }
9
- export default DashboardUserPermissions;
@@ -1,20 +0,0 @@
1
- import { Model, InferAttributes, InferCreationAttributes, CreationOptional } from "sequelize";
2
- declare class DashboardUser extends Model<InferAttributes<DashboardUser>, InferCreationAttributes<DashboardUser>> {
3
- id: CreationOptional<string>;
4
- ownerId?: string;
5
- userId?: string;
6
- email?: string;
7
- password?: string;
8
- referringOwnerId?: string;
9
- name?: string;
10
- username?: string;
11
- masspayUserToken?: string;
12
- deleted?: boolean;
13
- emailVerified?: boolean;
14
- createdAt?: Date;
15
- updatedAt?: Date;
16
- static getById: (id: string) => Promise<DashboardUser | null>;
17
- static getByEmail: (email: string) => Promise<DashboardUser | null>;
18
- static getAllByOwnerId: (ownerId: string) => Promise<DashboardUser[]>;
19
- }
20
- export default DashboardUser;
@@ -1,10 +0,0 @@
1
- import { Model, InferAttributes, InferCreationAttributes, CreationOptional } from "sequelize";
2
- declare class FanList extends Model<InferAttributes<FanList>, InferCreationAttributes<FanList>> {
3
- id: CreationOptional<string>;
4
- name: string;
5
- ownerId: string;
6
- isArchived?: boolean;
7
- createdAt: CreationOptional<Date>;
8
- updatedAt: CreationOptional<Date>;
9
- }
10
- export default FanList;
@@ -1,9 +0,0 @@
1
- import { Model, InferAttributes, InferCreationAttributes, CreationOptional } from "sequelize";
2
- declare class Fraud extends Model<InferAttributes<Fraud>, InferCreationAttributes<Fraud>> {
3
- id: CreationOptional<string>;
4
- userId: string;
5
- ownerId: string;
6
- createdAt: CreationOptional<Date>;
7
- updatedAt: CreationOptional<Date>;
8
- }
9
- export default Fraud;
@@ -1,56 +0,0 @@
1
- import { Model, InferAttributes, InferCreationAttributes, CreationOptional } from "sequelize";
2
- declare class Game extends Model<InferAttributes<Game>, InferCreationAttributes<Game>> {
3
- id: CreationOptional<string>;
4
- oddsJamId: string;
5
- sport: "football" | "basketball" | "baseball" | "mma" | "boxing" | "hockey" | "soccer" | "tennis" | "golf" | "motorsports" | "esports";
6
- league: string;
7
- startDate: Date;
8
- homeTeam: string;
9
- awayTeam: string;
10
- isLive: boolean;
11
- tournament?: string;
12
- homeTeamId: string;
13
- homeOddsJamTeamId: string;
14
- awayTeamId: string;
15
- awayOddsJamTeamId: string;
16
- leagueId: string;
17
- clock?: string;
18
- period?: string;
19
- status?: string;
20
- weather?: string;
21
- broadcast?: string;
22
- lastPlay?: string;
23
- venueName?: string;
24
- description?: string;
25
- seasonType?: string;
26
- seasonWeek?: string;
27
- seasonYear?: string;
28
- awayStarter?: string;
29
- currentOuts?: number;
30
- homeStarter?: string;
31
- weatherTemp?: string;
32
- awayTeamAbb?: string;
33
- currentBalls?: string;
34
- homeTeamAbb?: string;
35
- awayTeamCity?: string;
36
- awayTeamName?: string;
37
- homeTeamCity?: string;
38
- homeTeamName?: string;
39
- venueLocation?: string;
40
- currentStrikes?: number;
41
- runnerOnFirst?: string;
42
- runnerOnThird?: string;
43
- runnerOnSecond?: string;
44
- scoreAwayTotal?: number;
45
- scoreHomeTotal?: number;
46
- weatherTempHigh?: string;
47
- currentPossession?: string;
48
- currentBatterName?: string;
49
- scoreAwayPeriod1?: number;
50
- scoreHomePeriod1?: number;
51
- currentPitcherName?: string;
52
- currentDownAndDistance?: string;
53
- createdAt: CreationOptional<Date>;
54
- updatedAt: CreationOptional<Date>;
55
- }
56
- export default Game;