@tolt/api 0.6.1 → 0.7.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 (166) hide show
  1. package/dist/api/errors/ContentTooLargeError.d.ts +7 -0
  2. package/dist/api/errors/ContentTooLargeError.js +17 -0
  3. package/dist/api/errors/index.d.ts +1 -0
  4. package/dist/api/errors/index.js +1 -0
  5. package/dist/api/resources/clicks/client/Client.d.ts +6 -1
  6. package/dist/api/resources/clicks/client/Client.js +15 -4
  7. package/dist/api/resources/clicks/client/requests/GetClicksRequest.d.ts +1 -1
  8. package/dist/api/resources/clicks/client/requests/ListClicksRequest.d.ts +10 -5
  9. package/dist/api/resources/clicks/types/ListClicksRequestOrder.d.ts +1 -0
  10. package/dist/api/resources/clicks/types/ListClicksRequestOrder.js +1 -0
  11. package/dist/api/resources/clicks/types/ListClicksRequestSort.d.ts +1 -1
  12. package/dist/api/resources/clicks/types/ListClicksRequestSort.js +1 -1
  13. package/dist/api/resources/commissions/client/Client.d.ts +29 -7
  14. package/dist/api/resources/commissions/client/Client.js +56 -16
  15. package/dist/api/resources/commissions/client/requests/ApproveCommissionsRequest.d.ts +1 -1
  16. package/dist/api/resources/commissions/client/requests/BulkApproveCommissionsRequest.d.ts +2 -2
  17. package/dist/api/resources/commissions/client/requests/BulkDeclineCommissionsRequest.d.ts +2 -2
  18. package/dist/api/resources/commissions/client/requests/DeclineCommissionsRequest.d.ts +1 -1
  19. package/dist/api/resources/commissions/client/requests/DeleteCommissionsRequest.d.ts +1 -1
  20. package/dist/api/resources/commissions/client/requests/GetCommissionsRequest.d.ts +1 -1
  21. package/dist/api/resources/commissions/client/requests/ListCommissionsRequest.d.ts +14 -5
  22. package/dist/api/resources/commissions/client/requests/UpdateCommissionsRequest.d.ts +19 -4
  23. package/dist/api/resources/commissions/client/requests/UpdateCommissionsRequest.js +8 -1
  24. package/dist/api/resources/commissions/client/requests/index.d.ts +1 -1
  25. package/dist/api/resources/commissions/client/requests/index.js +1 -1
  26. package/dist/api/resources/commissions/types/ListCommissionsRequestOrder.d.ts +1 -0
  27. package/dist/api/resources/commissions/types/ListCommissionsRequestOrder.js +1 -0
  28. package/dist/api/resources/commissions/types/ListCommissionsRequestSort.d.ts +1 -1
  29. package/dist/api/resources/commissions/types/ListCommissionsRequestSort.js +1 -1
  30. package/dist/api/resources/customers/client/Client.d.ts +27 -4
  31. package/dist/api/resources/customers/client/Client.js +42 -9
  32. package/dist/api/resources/customers/client/requests/CreateCustomersRequest.d.ts +20 -2
  33. package/dist/api/resources/customers/client/requests/CreateCustomersRequest.js +1 -0
  34. package/dist/api/resources/customers/client/requests/DeleteCustomersRequest.d.ts +1 -1
  35. package/dist/api/resources/customers/client/requests/GetCustomersRequest.d.ts +1 -1
  36. package/dist/api/resources/customers/client/requests/ListCustomersRequest.d.ts +14 -5
  37. package/dist/api/resources/customers/client/requests/UpdateCustomersRequest.d.ts +15 -2
  38. package/dist/api/resources/customers/client/requests/UpdateCustomersRequest.js +1 -0
  39. package/dist/api/resources/customers/types/ListCustomersRequestOrder.d.ts +1 -0
  40. package/dist/api/resources/customers/types/ListCustomersRequestOrder.js +1 -0
  41. package/dist/api/resources/customers/types/ListCustomersRequestSort.d.ts +1 -1
  42. package/dist/api/resources/customers/types/ListCustomersRequestSort.js +1 -1
  43. package/dist/api/resources/customers/types/ListCustomersRequestStatus.d.ts +1 -0
  44. package/dist/api/resources/customers/types/ListCustomersRequestStatus.js +1 -0
  45. package/dist/api/resources/embed/client/Client.d.ts +5 -2
  46. package/dist/api/resources/embed/client/Client.js +9 -4
  47. package/dist/api/resources/embed/client/index.d.ts +1 -1
  48. package/dist/api/resources/embed/client/index.js +1 -1
  49. package/dist/api/resources/embed/types/CreateTokenEmbedRequest.d.ts +1 -0
  50. package/dist/api/resources/embed/types/index.d.ts +1 -0
  51. package/dist/api/resources/embed/types/index.js +1 -0
  52. package/dist/api/resources/flows/client/Client.d.ts +7 -1
  53. package/dist/api/resources/flows/client/Client.js +13 -3
  54. package/dist/api/resources/flows/client/requests/GetFlowsRequest.d.ts +1 -1
  55. package/dist/api/resources/flows/client/requests/ListFlowsRequest.d.ts +13 -5
  56. package/dist/api/resources/flows/types/ListFlowsRequestActive.d.ts +1 -0
  57. package/dist/api/resources/flows/types/ListFlowsRequestActive.js +1 -0
  58. package/dist/api/resources/flows/types/ListFlowsRequestOrder.d.ts +1 -0
  59. package/dist/api/resources/flows/types/ListFlowsRequestOrder.js +1 -0
  60. package/dist/api/resources/flows/types/ListFlowsRequestSort.d.ts +1 -1
  61. package/dist/api/resources/flows/types/ListFlowsRequestSort.js +1 -1
  62. package/dist/api/resources/groups/client/Client.d.ts +7 -1
  63. package/dist/api/resources/groups/client/Client.js +13 -3
  64. package/dist/api/resources/groups/client/requests/GetGroupsRequest.d.ts +1 -1
  65. package/dist/api/resources/groups/client/requests/ListGroupsRequest.d.ts +10 -5
  66. package/dist/api/resources/groups/types/ListGroupsRequestDefault.d.ts +1 -0
  67. package/dist/api/resources/groups/types/ListGroupsRequestDefault.js +1 -0
  68. package/dist/api/resources/groups/types/ListGroupsRequestOrder.d.ts +1 -0
  69. package/dist/api/resources/groups/types/ListGroupsRequestOrder.js +1 -0
  70. package/dist/api/resources/groups/types/ListGroupsRequestSort.d.ts +1 -1
  71. package/dist/api/resources/groups/types/ListGroupsRequestSort.js +1 -1
  72. package/dist/api/resources/index.d.ts +0 -1
  73. package/dist/api/resources/index.js +0 -1
  74. package/dist/api/resources/links/client/Client.d.ts +17 -5
  75. package/dist/api/resources/links/client/Client.js +37 -11
  76. package/dist/api/resources/links/client/requests/CreateLinksRequest.d.ts +6 -2
  77. package/dist/api/resources/links/client/requests/DeleteLinksRequest.d.ts +1 -1
  78. package/dist/api/resources/links/client/requests/GetLinksRequest.d.ts +1 -1
  79. package/dist/api/resources/links/client/requests/ListLinksRequest.d.ts +12 -5
  80. package/dist/api/resources/links/client/requests/UpdateLinksRequest.d.ts +6 -2
  81. package/dist/api/resources/links/types/ListLinksRequestOrder.d.ts +1 -0
  82. package/dist/api/resources/links/types/ListLinksRequestOrder.js +1 -0
  83. package/dist/api/resources/links/types/ListLinksRequestSort.d.ts +1 -1
  84. package/dist/api/resources/links/types/ListLinksRequestSort.js +1 -1
  85. package/dist/api/resources/partners/client/Client.d.ts +39 -10
  86. package/dist/api/resources/partners/client/Client.js +66 -21
  87. package/dist/api/resources/partners/client/requests/ApprovePartnersRequest.d.ts +1 -1
  88. package/dist/api/resources/partners/client/requests/BulkApprovePartnersRequest.d.ts +2 -2
  89. package/dist/api/resources/partners/client/requests/BulkRejectPartnersRequest.d.ts +4 -2
  90. package/dist/api/resources/partners/client/requests/CreatePartnersRequest.d.ts +21 -7
  91. package/dist/api/resources/partners/client/requests/CreatePartnersRequest.js +1 -0
  92. package/dist/api/resources/partners/client/requests/GetPartnersRequest.d.ts +1 -1
  93. package/dist/api/resources/partners/client/requests/ListPartnersRequest.d.ts +11 -5
  94. package/dist/api/resources/partners/client/requests/RejectPartnersRequest.d.ts +2 -1
  95. package/dist/api/resources/partners/client/requests/SuspendPartnersRequest.d.ts +2 -1
  96. package/dist/api/resources/partners/client/requests/UpdatePartnersRequest.d.ts +10 -2
  97. package/dist/api/resources/partners/types/ListPartnersRequestOrder.d.ts +1 -0
  98. package/dist/api/resources/partners/types/ListPartnersRequestOrder.js +1 -0
  99. package/dist/api/resources/partners/types/ListPartnersRequestSort.d.ts +1 -1
  100. package/dist/api/resources/partners/types/ListPartnersRequestSort.js +1 -1
  101. package/dist/api/resources/partners/types/ListPartnersRequestStatus.d.ts +1 -0
  102. package/dist/api/resources/partners/types/ListPartnersRequestStatus.js +1 -0
  103. package/dist/api/resources/programs/client/Client.d.ts +7 -1
  104. package/dist/api/resources/programs/client/Client.js +13 -3
  105. package/dist/api/resources/programs/client/requests/GetProgramsRequest.d.ts +1 -1
  106. package/dist/api/resources/programs/client/requests/ListProgramsRequest.d.ts +8 -5
  107. package/dist/api/resources/programs/types/ListProgramsRequestOrder.d.ts +1 -0
  108. package/dist/api/resources/programs/types/ListProgramsRequestOrder.js +1 -0
  109. package/dist/api/resources/programs/types/ListProgramsRequestSort.d.ts +1 -1
  110. package/dist/api/resources/programs/types/ListProgramsRequestSort.js +1 -1
  111. package/dist/api/resources/promotionCodes/client/Client.d.ts +27 -5
  112. package/dist/api/resources/promotionCodes/client/Client.js +46 -10
  113. package/dist/api/resources/promotionCodes/client/requests/CreatePromotionCodesRequest.d.ts +9 -2
  114. package/dist/api/resources/promotionCodes/client/requests/CreatePromotionCodesRequest.js +1 -0
  115. package/dist/api/resources/promotionCodes/client/requests/DeletePromotionCodesRequest.d.ts +1 -1
  116. package/dist/api/resources/promotionCodes/client/requests/GetPromotionCodesRequest.d.ts +1 -1
  117. package/dist/api/resources/promotionCodes/client/requests/ListPromotionCodesRequest.d.ts +11 -5
  118. package/dist/api/resources/promotionCodes/client/requests/UpdatePromotionCodesRequest.d.ts +8 -1
  119. package/dist/api/resources/promotionCodes/client/requests/UpdatePromotionCodesRequest.js +1 -0
  120. package/dist/api/resources/promotionCodes/types/ListPromotionCodesRequestOrder.d.ts +1 -0
  121. package/dist/api/resources/promotionCodes/types/ListPromotionCodesRequestOrder.js +1 -0
  122. package/dist/api/resources/promotionCodes/types/ListPromotionCodesRequestSort.d.ts +1 -1
  123. package/dist/api/resources/promotionCodes/types/ListPromotionCodesRequestSort.js +1 -1
  124. package/dist/api/resources/promotionCodes/types/ListPromotionCodesRequestType.d.ts +1 -0
  125. package/dist/api/resources/promotionCodes/types/ListPromotionCodesRequestType.js +1 -0
  126. package/dist/api/resources/reports/client/Client.d.ts +15 -0
  127. package/dist/api/resources/reports/client/Client.js +30 -5
  128. package/dist/api/resources/reports/client/requests/CustomerStatsReportsRequest.d.ts +3 -0
  129. package/dist/api/resources/reports/client/requests/LinksReportsRequest.d.ts +8 -0
  130. package/dist/api/resources/reports/client/requests/OverviewReportsRequest.d.ts +3 -0
  131. package/dist/api/resources/reports/client/requests/PartnersReportsRequest.d.ts +8 -0
  132. package/dist/api/resources/reports/client/requests/TimeseriesReportsRequest.d.ts +5 -0
  133. package/dist/api/resources/reports/types/LinksReportsRequestOrder.d.ts +1 -0
  134. package/dist/api/resources/reports/types/LinksReportsRequestOrder.js +1 -0
  135. package/dist/api/resources/reports/types/LinksReportsRequestSort.d.ts +1 -0
  136. package/dist/api/resources/reports/types/LinksReportsRequestSort.js +1 -0
  137. package/dist/api/resources/reports/types/PartnersReportsRequestOrder.d.ts +1 -0
  138. package/dist/api/resources/reports/types/PartnersReportsRequestOrder.js +1 -0
  139. package/dist/api/resources/reports/types/PartnersReportsRequestSort.d.ts +1 -0
  140. package/dist/api/resources/reports/types/PartnersReportsRequestSort.js +1 -0
  141. package/dist/api/resources/reports/types/TimeseriesReportsRequestGranularity.d.ts +1 -0
  142. package/dist/api/resources/reports/types/TimeseriesReportsRequestGranularity.js +1 -0
  143. package/dist/api/resources/transactions/client/Client.d.ts +30 -7
  144. package/dist/api/resources/transactions/client/Client.js +53 -14
  145. package/dist/api/resources/transactions/client/requests/CreateTransactionsRequest.d.ts +17 -3
  146. package/dist/api/resources/transactions/client/requests/DeleteTransactionsRequest.d.ts +1 -1
  147. package/dist/api/resources/transactions/client/requests/GetTransactionsRequest.d.ts +1 -1
  148. package/dist/api/resources/transactions/client/requests/ListTransactionsRequest.d.ts +12 -5
  149. package/dist/api/resources/transactions/client/requests/RefundTransactionsRequest.d.ts +1 -1
  150. package/dist/api/resources/transactions/client/requests/RerunFlowsTransactionsRequest.d.ts +1 -1
  151. package/dist/api/resources/transactions/client/requests/UpdateTransactionsRequest.d.ts +13 -2
  152. package/dist/api/resources/transactions/types/ListTransactionsRequestOrder.d.ts +1 -0
  153. package/dist/api/resources/transactions/types/ListTransactionsRequestOrder.js +1 -0
  154. package/dist/api/resources/transactions/types/ListTransactionsRequestSort.d.ts +1 -1
  155. package/dist/api/resources/transactions/types/ListTransactionsRequestSort.js +1 -1
  156. package/dist/api/types/Commission.d.ts +1 -1
  157. package/dist/api/types/Customer.d.ts +2 -2
  158. package/dist/api/types/Error_.d.ts +1 -0
  159. package/dist/api/types/Error_.js +1 -0
  160. package/dist/environments.d.ts +2 -2
  161. package/dist/environments.js +1 -1
  162. package/package.json +1 -1
  163. package/dist/api/resources/embed/client/requests/CreateTokenEmbedRequest.d.ts +0 -14
  164. package/dist/api/resources/embed/client/requests/index.d.ts +0 -1
  165. package/dist/api/resources/embed/client/requests/index.js +0 -1
  166. /package/dist/api/resources/embed/{client/requests → types}/CreateTokenEmbedRequest.js +0 -0
@@ -1,20 +1,31 @@
1
1
  /**
2
2
  * @example
3
3
  * {
4
- * id: "id"
4
+ * id: "txn_fB3egT1sKNVNu3ZYuU1ypYDA",
5
+ * amount: 5000,
6
+ * product_name: "Pro plan"
5
7
  * }
6
8
  */
7
9
  export interface UpdateTransactionsRequest {
8
10
  id: string;
9
- /** Monetary amount as an integer in the smallest currency unit (cents), e.g. 500 = 5.00 */
11
+ /** The payment amount in the smallest unit of the program currency (cents for USD); percentage commissions are calculated from it. */
10
12
  amount?: number;
13
+ /** Payment status text, such as paid, which is what new transactions get. refunded is not accepted here: refund a transaction with the refund action. null clears the status. */
11
14
  status?: string | null;
15
+ /** Where the transaction came from, such as stripe or api. */
12
16
  source?: string | null;
17
+ /** Kind of payment: subscription for a recurring payment, or one_time. */
13
18
  billing_type?: string | null;
19
+ /** Id of the payment in your billing system, such as a Stripe charge id. */
14
20
  charge_id?: string | null;
21
+ /** Id of the tracked click behind this payment, as returned when listing clicks. */
15
22
  click_id?: string | null;
23
+ /** Id of the purchased product in your billing system. */
16
24
  product_id?: string | null;
25
+ /** Readable name of the purchased product, such as Pro plan. It is saved as the transaction's product name, which revenue_by_product groups revenue by; flows match on product_id, not on this name. null clears it. */
17
26
  product_name?: string | null;
27
+ /** Billing period of a subscription payment: month or year. */
18
28
  interval?: string | null;
29
+ /** When the payment happened, as a timestamp with a time zone, for example 2026-03-01T12:00:00Z. Reports and date filters place the transaction on this date. */
19
30
  created_at?: string;
20
31
  }
@@ -1,3 +1,4 @@
1
+ /** Ranking direction: desc puts the most recently created or updated rows first. */
1
2
  export declare const ListTransactionsRequestOrder: {
2
3
  readonly Asc: "asc";
3
4
  readonly Desc: "desc";
@@ -1,4 +1,5 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
+ /** Ranking direction: desc puts the most recently created or updated rows first. */
2
3
  export const ListTransactionsRequestOrder = {
3
4
  Asc: "asc",
4
5
  Desc: "desc",
@@ -1,4 +1,4 @@
1
- /** Column the list is ordered and paged by. */
1
+ /** Timestamp to order and page by: created_at follows creation order, updated_at follows each item's most recent change. */
2
2
  export declare const ListTransactionsRequestSort: {
3
3
  readonly CreatedAt: "created_at";
4
4
  readonly UpdatedAt: "updated_at";
@@ -1,5 +1,5 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- /** Column the list is ordered and paged by. */
2
+ /** Timestamp to order and page by: created_at follows creation order, updated_at follows each item's most recent change. */
3
3
  export const ListTransactionsRequestSort = {
4
4
  CreatedAt: "created_at",
5
5
  UpdatedAt: "updated_at",
@@ -18,7 +18,7 @@ export interface Commission {
18
18
  is_ad_click: boolean | null;
19
19
  is_self_referral: boolean | null;
20
20
  approval_type: string | null;
21
- scheduled_approval_date: string;
21
+ scheduled_approval_date: string | null;
22
22
  created_at: string;
23
23
  updated_at: string;
24
24
  }
@@ -12,8 +12,8 @@ export interface Customer {
12
12
  link_id: string | null;
13
13
  promotion_code_id: string | null;
14
14
  click_id: string | null;
15
- lead_at: string;
16
- active_at: string;
15
+ lead_at: string | null;
16
+ active_at: string | null;
17
17
  created_at: string;
18
18
  updated_at: string;
19
19
  }
@@ -25,6 +25,7 @@ export declare namespace Error_ {
25
25
  readonly TransactionRefunded: "transaction_refunded";
26
26
  readonly CommissionExists: "commission_exists";
27
27
  readonly RateLimited: "rate_limited";
28
+ readonly PayloadTooLarge: "payload_too_large";
28
29
  readonly InternalError: "internal_error";
29
30
  };
30
31
  type Code = (typeof Code)[keyof typeof Code];
@@ -17,6 +17,7 @@ export var Error_;
17
17
  TransactionRefunded: "transaction_refunded",
18
18
  CommissionExists: "commission_exists",
19
19
  RateLimited: "rate_limited",
20
+ PayloadTooLarge: "payload_too_large",
20
21
  InternalError: "internal_error",
21
22
  };
22
23
  })(Error_ || (Error_ = {}));
@@ -1,4 +1,4 @@
1
1
  export declare const ToltApiEnvironment: {
2
- readonly Production: "https://platform.tolt.dev";
2
+ readonly Default: "https://platform.tolt.dev";
3
3
  };
4
- export type ToltApiEnvironment = typeof ToltApiEnvironment.Production;
4
+ export type ToltApiEnvironment = typeof ToltApiEnvironment.Default;
@@ -1,4 +1,4 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  export const ToltApiEnvironment = {
3
- Production: "https://platform.tolt.dev",
3
+ Default: "https://platform.tolt.dev",
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tolt/api",
3
- "version": "0.6.1",
3
+ "version": "0.7.0",
4
4
  "description": "TypeScript SDK for the Tolt Public API",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -1,14 +0,0 @@
1
- /**
2
- * @example
3
- * {}
4
- */
5
- export interface CreateTokenEmbedRequest {
6
- partner_id?: string;
7
- partner?: CreateTokenEmbedRequest.Partner;
8
- }
9
- export declare namespace CreateTokenEmbedRequest {
10
- interface Partner {
11
- email: string;
12
- program_id: string;
13
- }
14
- }
@@ -1 +0,0 @@
1
- export type { CreateTokenEmbedRequest } from "./CreateTokenEmbedRequest.js";
@@ -1 +0,0 @@
1
- export {};