@takeal/cusfront-sdk 0.3.20 → 0.6.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 (133) hide show
  1. package/CHANGELOG.md +137 -2
  2. package/README.md +407 -8
  3. package/dist/analytics.cjs +438 -0
  4. package/dist/analytics.cjs.map +1 -0
  5. package/dist/analytics.d.cts +129 -0
  6. package/dist/analytics.d.ts +129 -0
  7. package/dist/analytics.js +424 -0
  8. package/dist/analytics.js.map +1 -0
  9. package/dist/cards-B_aNY35J.d.cts +514 -0
  10. package/dist/cards-Ba1wZttb.d.ts +514 -0
  11. package/dist/deposits-BEc8U80M.d.cts +310 -0
  12. package/dist/deposits-DScyT_D9.d.ts +310 -0
  13. package/dist/{devices-DP_hxwmW.d.ts → devices-B_YveTl9.d.ts} +1 -1
  14. package/dist/{devices-C3JHi2Hi.d.cts → devices-a5Z45Mx_.d.cts} +1 -1
  15. package/dist/{http-B-OQwMYn.d.cts → http-DeANAoTs.d.cts} +11 -3
  16. package/dist/{http-B-OQwMYn.d.ts → http-DeANAoTs.d.ts} +11 -3
  17. package/dist/index.cjs +978 -101
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.d.cts +101 -13
  20. package/dist/index.d.ts +101 -13
  21. package/dist/index.js +963 -102
  22. package/dist/index.js.map +1 -1
  23. package/dist/react/index.cjs +2 -8
  24. package/dist/react/index.cjs.map +1 -1
  25. package/dist/react/index.d.cts +12 -5
  26. package/dist/react/index.d.ts +12 -5
  27. package/dist/react/index.js +2 -8
  28. package/dist/react/index.js.map +1 -1
  29. package/dist/resources/attribution.cjs +82 -0
  30. package/dist/resources/attribution.cjs.map +1 -0
  31. package/dist/resources/attribution.d.cts +100 -0
  32. package/dist/resources/attribution.d.ts +100 -0
  33. package/dist/resources/attribution.js +78 -0
  34. package/dist/resources/attribution.js.map +1 -0
  35. package/dist/resources/auth.cjs +81 -15
  36. package/dist/resources/auth.cjs.map +1 -1
  37. package/dist/resources/auth.d.cts +53 -6
  38. package/dist/resources/auth.d.ts +53 -6
  39. package/dist/resources/auth.js +81 -15
  40. package/dist/resources/auth.js.map +1 -1
  41. package/dist/resources/balance.d.cts +1 -1
  42. package/dist/resources/balance.d.ts +1 -1
  43. package/dist/resources/blog.cjs.map +1 -1
  44. package/dist/resources/blog.d.cts +8 -1
  45. package/dist/resources/blog.d.ts +8 -1
  46. package/dist/resources/blog.js.map +1 -1
  47. package/dist/resources/bonus.cjs +28 -0
  48. package/dist/resources/bonus.cjs.map +1 -0
  49. package/dist/resources/bonus.d.cts +121 -0
  50. package/dist/resources/bonus.d.ts +121 -0
  51. package/dist/resources/bonus.js +26 -0
  52. package/dist/resources/bonus.js.map +1 -0
  53. package/dist/resources/branding.d.cts +1 -1
  54. package/dist/resources/branding.d.ts +1 -1
  55. package/dist/resources/cards.cjs +55 -28
  56. package/dist/resources/cards.cjs.map +1 -1
  57. package/dist/resources/cards.d.cts +2 -347
  58. package/dist/resources/cards.d.ts +2 -347
  59. package/dist/resources/cards.js +55 -29
  60. package/dist/resources/cards.js.map +1 -1
  61. package/dist/resources/codes.cjs +20 -0
  62. package/dist/resources/codes.cjs.map +1 -0
  63. package/dist/resources/codes.d.cts +100 -0
  64. package/dist/resources/codes.d.ts +100 -0
  65. package/dist/resources/codes.js +18 -0
  66. package/dist/resources/codes.js.map +1 -0
  67. package/dist/resources/deposits.cjs +32 -7
  68. package/dist/resources/deposits.cjs.map +1 -1
  69. package/dist/resources/deposits.d.cts +3 -176
  70. package/dist/resources/deposits.d.ts +3 -176
  71. package/dist/resources/deposits.js +32 -7
  72. package/dist/resources/deposits.js.map +1 -1
  73. package/dist/resources/devices.cjs +3 -1
  74. package/dist/resources/devices.cjs.map +1 -1
  75. package/dist/resources/devices.d.cts +2 -2
  76. package/dist/resources/devices.d.ts +2 -2
  77. package/dist/resources/devices.js +3 -1
  78. package/dist/resources/devices.js.map +1 -1
  79. package/dist/resources/documents.cjs +66 -0
  80. package/dist/resources/documents.cjs.map +1 -0
  81. package/dist/resources/documents.d.cts +212 -0
  82. package/dist/resources/documents.d.ts +212 -0
  83. package/dist/resources/documents.js +64 -0
  84. package/dist/resources/documents.js.map +1 -0
  85. package/dist/resources/funding-options.cjs +16 -0
  86. package/dist/resources/funding-options.cjs.map +1 -0
  87. package/dist/resources/funding-options.d.cts +3 -0
  88. package/dist/resources/funding-options.d.ts +3 -0
  89. package/dist/resources/funding-options.js +14 -0
  90. package/dist/resources/funding-options.js.map +1 -0
  91. package/dist/resources/history.cjs +33 -0
  92. package/dist/resources/history.cjs.map +1 -0
  93. package/dist/resources/history.d.cts +95 -0
  94. package/dist/resources/history.d.ts +95 -0
  95. package/dist/resources/history.js +31 -0
  96. package/dist/resources/history.js.map +1 -0
  97. package/dist/resources/me.d.cts +3 -1
  98. package/dist/resources/me.d.ts +3 -1
  99. package/dist/resources/notifications.d.cts +1 -1
  100. package/dist/resources/notifications.d.ts +1 -1
  101. package/dist/resources/push.cjs +3 -1
  102. package/dist/resources/push.cjs.map +1 -1
  103. package/dist/resources/push.d.cts +1 -1
  104. package/dist/resources/push.d.ts +1 -1
  105. package/dist/resources/push.js +3 -1
  106. package/dist/resources/push.js.map +1 -1
  107. package/dist/resources/referral.cjs +16 -0
  108. package/dist/resources/referral.cjs.map +1 -0
  109. package/dist/resources/referral.d.cts +58 -0
  110. package/dist/resources/referral.d.ts +58 -0
  111. package/dist/resources/referral.js +14 -0
  112. package/dist/resources/referral.js.map +1 -0
  113. package/dist/resources/sessions.d.cts +1 -1
  114. package/dist/resources/sessions.d.ts +1 -1
  115. package/dist/resources/subscription.cjs +24 -0
  116. package/dist/resources/subscription.cjs.map +1 -0
  117. package/dist/resources/subscription.d.cts +48 -0
  118. package/dist/resources/subscription.d.ts +48 -0
  119. package/dist/resources/subscription.js +22 -0
  120. package/dist/resources/subscription.js.map +1 -0
  121. package/dist/resources/subscriptions.d.cts +1 -1
  122. package/dist/resources/subscriptions.d.ts +1 -1
  123. package/dist/resources/wallet.d.cts +1 -1
  124. package/dist/resources/wallet.d.ts +1 -1
  125. package/dist/telegram.cjs +495 -111
  126. package/dist/telegram.cjs.map +1 -1
  127. package/dist/telegram.d.cts +12 -5
  128. package/dist/telegram.d.ts +12 -5
  129. package/dist/telegram.js +495 -111
  130. package/dist/telegram.js.map +1 -1
  131. package/package.json +57 -5
  132. package/dist/customer-CoxPwe5o.d.cts +0 -32
  133. package/dist/customer-CoxPwe5o.d.ts +0 -32
@@ -0,0 +1,48 @@
1
+ import { H as HttpClient } from '../http-DeANAoTs.js';
2
+
3
+ /**
4
+ * Subscription resource — `client.subscription.*`.
5
+ *
6
+ * The user's own paid tier or gift: the discounts it gives and, for a
7
+ * gift, when it ends. Not to be confused with `client.subscriptions`, which
8
+ * is about announcement channels.
9
+ *
10
+ * Mirrors `GET /me/subscription` and `PUT /me/subscription/promo-code`.
11
+ */
12
+ interface UserSubscription {
13
+ id: string;
14
+ tier_id: string;
15
+ tier_name: string;
16
+ /** `active`, `tryout`, `grace`, `cancelled` or `expired`. */
17
+ status: string;
18
+ /** `billing` (charged monthly) or `gift` (never charged). */
19
+ kind: "billing" | "gift" | (string & {});
20
+ /** For a gift: when it ends; `null` = no end date. */
21
+ gift_until: string | null;
22
+ monthly_fee: string;
23
+ currency: string;
24
+ /** Discount on card prices, basis points. */
25
+ issuance_discount_bps: number;
26
+ /** Discount on the top-up commission, basis points. */
27
+ funding_discount_bps: number;
28
+ started_at: string;
29
+ current_period_end: string | null;
30
+ /** The promo code the monthly fee is charged with, if any. */
31
+ promo_code_id: string | null;
32
+ }
33
+ declare class SubscriptionResource {
34
+ private readonly http;
35
+ constructor(http: HttpClient);
36
+ /** The user's subscription, or `null` when there is none. */
37
+ get(opts?: {
38
+ signal?: AbortSignal;
39
+ }): Promise<UserSubscription | null>;
40
+ /**
41
+ * Charge the monthly fee with a promo code, as long as the code allows.
42
+ * `null` removes it. A code that can't be used on the fee fails with 400
43
+ * `promo_code_*`; no paid subscription running → 404.
44
+ */
45
+ setPromoCode(code: string | null): Promise<UserSubscription>;
46
+ }
47
+
48
+ export { SubscriptionResource, type UserSubscription };
@@ -0,0 +1,22 @@
1
+ // src/resources/subscription.ts
2
+ var SubscriptionResource = class {
3
+ constructor(http) {
4
+ this.http = http;
5
+ }
6
+ /** The user's subscription, or `null` when there is none. */
7
+ async get(opts = {}) {
8
+ return this.http.get("/me/subscription", { signal: opts.signal });
9
+ }
10
+ /**
11
+ * Charge the monthly fee with a promo code, as long as the code allows.
12
+ * `null` removes it. A code that can't be used on the fee fails with 400
13
+ * `promo_code_*`; no paid subscription running → 404.
14
+ */
15
+ async setPromoCode(code) {
16
+ return this.http.put("/me/subscription/promo-code", { body: { code } });
17
+ }
18
+ };
19
+
20
+ export { SubscriptionResource };
21
+ //# sourceMappingURL=subscription.js.map
22
+ //# sourceMappingURL=subscription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/resources/subscription.ts"],"names":[],"mappings":";AAkCO,IAAM,uBAAN,MAA2B;AAAA,EAChC,YAA6B,IAAA,EAAkB;AAAlB,IAAA,IAAA,CAAA,IAAA,GAAA,IAAA;AAAA,EAAmB;AAAA;AAAA,EAGhD,MAAM,GAAA,CAAI,IAAA,GAAiC,EAAC,EAAqC;AAC/E,IAAA,OAAO,IAAA,CAAK,KAAK,GAAA,CAA6B,kBAAA,EAAoB,EAAE,MAAA,EAAQ,IAAA,CAAK,QAAQ,CAAA;AAAA,EAC3F;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,aAAa,IAAA,EAAgD;AACjE,IAAA,OAAO,IAAA,CAAK,KAAK,GAAA,CAAsB,6BAAA,EAA+B,EAAE,IAAA,EAAM,EAAE,IAAA,EAAK,EAAG,CAAA;AAAA,EAC1F;AACF","file":"subscription.js","sourcesContent":["import type { HttpClient } from \"../http.js\";\n\n/**\n * Subscription resource — `client.subscription.*`.\n *\n * The user's own paid tier or gift: the discounts it gives and, for a\n * gift, when it ends. Not to be confused with `client.subscriptions`, which\n * is about announcement channels.\n *\n * Mirrors `GET /me/subscription` and `PUT /me/subscription/promo-code`.\n */\n\nexport interface UserSubscription {\n id: string;\n tier_id: string;\n tier_name: string;\n /** `active`, `tryout`, `grace`, `cancelled` or `expired`. */\n status: string;\n /** `billing` (charged monthly) or `gift` (never charged). */\n kind: \"billing\" | \"gift\" | (string & {});\n /** For a gift: when it ends; `null` = no end date. */\n gift_until: string | null;\n monthly_fee: string;\n currency: string;\n /** Discount on card prices, basis points. */\n issuance_discount_bps: number;\n /** Discount on the top-up commission, basis points. */\n funding_discount_bps: number;\n started_at: string;\n current_period_end: string | null;\n /** The promo code the monthly fee is charged with, if any. */\n promo_code_id: string | null;\n}\n\nexport class SubscriptionResource {\n constructor(private readonly http: HttpClient) {}\n\n /** The user's subscription, or `null` when there is none. */\n async get(opts: { signal?: AbortSignal } = {}): Promise<UserSubscription | null> {\n return this.http.get<UserSubscription | null>(\"/me/subscription\", { signal: opts.signal });\n }\n\n /**\n * Charge the monthly fee with a promo code, as long as the code allows.\n * `null` removes it. A code that can't be used on the fee fails with 400\n * `promo_code_*`; no paid subscription running → 404.\n */\n async setPromoCode(code: string | null): Promise<UserSubscription> {\n return this.http.put<UserSubscription>(\"/me/subscription/promo-code\", { body: { code } });\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { H as HttpClient } from '../http-B-OQwMYn.cjs';
1
+ import { H as HttpClient } from '../http-DeANAoTs.cjs';
2
2
 
3
3
  /**
4
4
  * Subscriptions resource — `client.subscriptions.*`.
@@ -1,4 +1,4 @@
1
- import { H as HttpClient } from '../http-B-OQwMYn.js';
1
+ import { H as HttpClient } from '../http-DeANAoTs.js';
2
2
 
3
3
  /**
4
4
  * Subscriptions resource — `client.subscriptions.*`.
@@ -1,4 +1,4 @@
1
- import { H as HttpClient } from '../http-B-OQwMYn.cjs';
1
+ import { H as HttpClient } from '../http-DeANAoTs.cjs';
2
2
 
3
3
  /**
4
4
  * Wallet resource — `client.wallet.*`.
@@ -1,4 +1,4 @@
1
- import { H as HttpClient } from '../http-B-OQwMYn.js';
1
+ import { H as HttpClient } from '../http-DeANAoTs.js';
2
2
 
3
3
  /**
4
4
  * Wallet resource — `client.wallet.*`.