@temboplus/afloat 0.1.77-beta.10 → 0.1.77-beta.12

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.
@@ -7,6 +7,29 @@ import { PayoutChannel } from "./payout.dtos.js";
7
7
  import { PayoutQuery } from "./payout.query.js";
8
8
  import { PayoutFilters } from "./payout.dtos.js";
9
9
  import { Paged } from "@/lib/query/index.js";
10
+ /**
11
+ * Input type for payout creation mutation
12
+ */
13
+ export interface CreatePayoutInput {
14
+ channel: PayoutChannel;
15
+ receiver: ContactInfo;
16
+ amount: Amount;
17
+ notes?: string;
18
+ }
19
+ /**
20
+ * Input type for payout approval mutation
21
+ */
22
+ export interface ApprovePayoutInput {
23
+ id: string;
24
+ notes?: string;
25
+ }
26
+ /**
27
+ * Input type for payout rejection mutation
28
+ */
29
+ export interface RejectPayoutInput {
30
+ id: string;
31
+ notes?: string;
32
+ }
10
33
  /**
11
34
  * Flexible query input type - supports the class, filters interface, URL params, etc.
12
35
  */
@@ -93,11 +116,11 @@ export declare class PayoutRepository extends BaseRepository<PayoutAPI> {
93
116
  /**
94
117
  * Creates a new payout with the provided input data.
95
118
  *
96
- * @param args - The payout creation data
97
- * @param args.channel - The payout channel to use
98
- * @param args.receiver - Contact information for the payout receiver
99
- * @param args.amount - The amount to pay out
100
- * @param args.notes - Optional notes for the payout
119
+ * @param input - The payout creation data
120
+ * @param input.channel - The payout channel to use
121
+ * @param input.receiver - Contact information for the payout receiver
122
+ * @param input.amount - The amount to pay out
123
+ * @param input.notes - Optional notes for the payout
101
124
  * @returns Promise that resolves to the created payout
102
125
  * @throws {APIError} If the input is invalid or if the creation operation fails
103
126
  *
@@ -111,18 +134,12 @@ export declare class PayoutRepository extends BaseRepository<PayoutAPI> {
111
134
  * });
112
135
  * ```
113
136
  */
114
- pay(args: {
115
- channel: PayoutChannel;
116
- receiver: ContactInfo;
117
- amount: Amount;
118
- notes?: string;
119
- }): Promise<Payout>;
137
+ pay(input: CreatePayoutInput): Promise<Payout>;
120
138
  /**
121
139
  * Approves a payout with optional notes.
122
140
  *
123
- * @param id - The ID of the payout to approve
124
- * @param args - Optional arguments
125
- * @param args.notes - Optional notes for the approval
141
+ * @param input.id - The ID of the payout to approve
142
+ * @param input.notes - Optional notes for the approval
126
143
  * @returns Promise that resolves to the approved payout
127
144
  * @throws {APIError} If payout is not found, already approved, or if the operation fails
128
145
  *
@@ -133,15 +150,12 @@ export declare class PayoutRepository extends BaseRepository<PayoutAPI> {
133
150
  * });
134
151
  * ```
135
152
  */
136
- approve(id: string, args?: {
137
- notes?: string;
138
- }): Promise<Payout>;
153
+ approve(input: ApprovePayoutInput): Promise<Payout>;
139
154
  /**
140
155
  * Rejects a payout with optional notes.
141
156
  *
142
- * @param id - The ID of the payout to reject
143
- * @param args - Optional arguments
144
- * @param args.notes - Optional notes for the rejection
157
+ * @param input.id - The ID of the payout to reject
158
+ * @param input.notes - Optional notes for the rejection
145
159
  * @returns Promise that resolves to the rejected payout
146
160
  * @throws {APIError} If payout is not found, already rejected, or if the operation fails
147
161
  *
@@ -152,9 +166,7 @@ export declare class PayoutRepository extends BaseRepository<PayoutAPI> {
152
166
  * });
153
167
  * ```
154
168
  */
155
- reject(id: string, args?: {
156
- notes?: string;
157
- }): Promise<Payout>;
169
+ reject(input: RejectPayoutInput): Promise<Payout>;
158
170
  /**
159
171
  * Retrieves a payout by its ID.
160
172
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@temboplus/afloat",
3
- "version": "0.1.77-beta.10",
3
+ "version": "0.1.77-beta.12",
4
4
  "description": "A foundational library for Temboplus-Afloat projects.",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.esm.js",