@aepstore-dev/contracts 1.36.0 → 1.37.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.
- package/gen/payments.ts +20 -3
- package/package.json +1 -1
- package/proto/payments.proto +16 -3
package/gen/payments.ts
CHANGED
|
@@ -119,7 +119,9 @@ export interface ListTransactionsRequest {
|
|
|
119
119
|
/**
|
|
120
120
|
* ↓ added for the wallet statement page (Round 3)
|
|
121
121
|
* UI-semantic filter mapped onto displayKind:
|
|
122
|
-
* ALL | INCOME | OUTCOME | REFUND | WITHDRAWAL | PREMIUM
|
|
122
|
+
* ALL | SALES | INCOME | OUTCOME | REFUND | WITHDRAWAL | PREMIUM
|
|
123
|
+
* SALES = the seller's earnings on this account (USER_PENDING credits from
|
|
124
|
+
* PURCHASE transactions); these stay separate from INCOME (TOPUP).
|
|
123
125
|
*/
|
|
124
126
|
flow: string;
|
|
125
127
|
/**
|
|
@@ -155,12 +157,16 @@ export interface StatementEntry {
|
|
|
155
157
|
/**
|
|
156
158
|
* ↓ added for the wallet statement page (Round 3)
|
|
157
159
|
* UI-friendly classification computed server-side:
|
|
158
|
-
* TOPUP | PURCHASE | REFUND | PREMIUM | WITHDRAWAL |
|
|
160
|
+
* TOPUP | PURCHASE | SALE | REFUND | PREMIUM | WITHDRAWAL | ADJUSTMENT
|
|
161
|
+
* SALE is the seller's view of someone else's PURCHASE (CREDIT to their
|
|
162
|
+
* USER_PENDING) — distinct from PURCHASE which is the buyer's DEBIT.
|
|
159
163
|
* PREMIUM is split out of PURCHASE/REFUND so the UI can show
|
|
160
164
|
* "Продление Premium" / refund-of-premium in their own filter bucket.
|
|
165
|
+
* SALE_CLEAR transactions are excluded from the wallet view — the maturity
|
|
166
|
+
* event is surfaced via sale_status on the original SALE row instead.
|
|
161
167
|
*/
|
|
162
168
|
displayKind: string;
|
|
163
|
-
/** running
|
|
169
|
+
/** affected-account running balance, Decimal-as-string */
|
|
164
170
|
balanceAfter: string;
|
|
165
171
|
/** empty for non-product entries */
|
|
166
172
|
productId: string;
|
|
@@ -169,6 +175,17 @@ export interface StatementEntry {
|
|
|
169
175
|
productCategory: string;
|
|
170
176
|
/** optional thumbnail URL for richer rows */
|
|
171
177
|
productPreview: string;
|
|
178
|
+
/**
|
|
179
|
+
* Sale lifecycle. Populated only when display_kind=SALE.
|
|
180
|
+
* PENDING — held in USER_PENDING, not yet withdrawable.
|
|
181
|
+
* MATURED — SALE_CLEAR has fired; money is in USER_PAYOUT.
|
|
182
|
+
*/
|
|
183
|
+
saleStatus: string;
|
|
184
|
+
/**
|
|
185
|
+
* ISO 8601 when the sale becomes withdrawable (sale_completed_at +
|
|
186
|
+
* GRACE_DAYS). Empty for non-sale rows.
|
|
187
|
+
*/
|
|
188
|
+
maturesAt: string;
|
|
172
189
|
}
|
|
173
190
|
|
|
174
191
|
export interface TransactionsListResponse {
|
package/package.json
CHANGED
package/proto/payments.proto
CHANGED
|
@@ -124,7 +124,9 @@ message ListTransactionsRequest {
|
|
|
124
124
|
int32 limit = 4;
|
|
125
125
|
// ↓ added for the wallet statement page (Round 3)
|
|
126
126
|
// UI-semantic filter mapped onto displayKind:
|
|
127
|
-
// ALL | INCOME | OUTCOME | REFUND | WITHDRAWAL | PREMIUM
|
|
127
|
+
// ALL | SALES | INCOME | OUTCOME | REFUND | WITHDRAWAL | PREMIUM
|
|
128
|
+
// SALES = the seller's earnings on this account (USER_PENDING credits from
|
|
129
|
+
// PURCHASE transactions); these stay separate from INCOME (TOPUP).
|
|
128
130
|
string flow = 5;
|
|
129
131
|
// Period selection. `month` is the convenience form (YYYY-MM) used by the
|
|
130
132
|
// month dropdown; from/to override it for an arbitrary range.
|
|
@@ -151,15 +153,26 @@ message StatementEntry {
|
|
|
151
153
|
string created_at = 8;
|
|
152
154
|
// ↓ added for the wallet statement page (Round 3)
|
|
153
155
|
// UI-friendly classification computed server-side:
|
|
154
|
-
// TOPUP | PURCHASE | REFUND | PREMIUM | WITHDRAWAL |
|
|
156
|
+
// TOPUP | PURCHASE | SALE | REFUND | PREMIUM | WITHDRAWAL | ADJUSTMENT
|
|
157
|
+
// SALE is the seller's view of someone else's PURCHASE (CREDIT to their
|
|
158
|
+
// USER_PENDING) — distinct from PURCHASE which is the buyer's DEBIT.
|
|
155
159
|
// PREMIUM is split out of PURCHASE/REFUND so the UI can show
|
|
156
160
|
// "Продление Premium" / refund-of-premium in their own filter bucket.
|
|
161
|
+
// SALE_CLEAR transactions are excluded from the wallet view — the maturity
|
|
162
|
+
// event is surfaced via sale_status on the original SALE row instead.
|
|
157
163
|
string display_kind = 9;
|
|
158
|
-
string balance_after = 10; // running
|
|
164
|
+
string balance_after = 10; // affected-account running balance, Decimal-as-string
|
|
159
165
|
string product_id = 11; // empty for non-product entries
|
|
160
166
|
string product_name = 12;
|
|
161
167
|
string product_category = 13; // "Assets" | "Project File" | "Templates"
|
|
162
168
|
string product_preview = 14; // optional thumbnail URL for richer rows
|
|
169
|
+
// Sale lifecycle. Populated only when display_kind=SALE.
|
|
170
|
+
// PENDING — held in USER_PENDING, not yet withdrawable.
|
|
171
|
+
// MATURED — SALE_CLEAR has fired; money is in USER_PAYOUT.
|
|
172
|
+
string sale_status = 15;
|
|
173
|
+
// ISO 8601 when the sale becomes withdrawable (sale_completed_at +
|
|
174
|
+
// GRACE_DAYS). Empty for non-sale rows.
|
|
175
|
+
string matures_at = 16;
|
|
163
176
|
}
|
|
164
177
|
message TransactionsListResponse { repeated StatementEntry items = 1; int32 total = 2; int32 page = 3; int32 limit = 4; }
|
|
165
178
|
|