@marteye/studiojs 1.1.35 → 1.1.36

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.
@@ -0,0 +1,24 @@
1
+ import { HttpClient } from "../net/http";
2
+ import { Invoice } from "../types";
3
+ export interface InvoicesListResponse {
4
+ invoices: Invoice[];
5
+ lastId: string | null;
6
+ hasMore: boolean;
7
+ }
8
+ export default function create(httpClient: HttpClient): {
9
+ /**
10
+ * List all invoices for a market with pagination
11
+ * @param marketId - ID of the market
12
+ * @param lastId - ID of the last invoice from previous page (for pagination)
13
+ * @returns Paginated list of invoices
14
+ */
15
+ list: (marketId: string, lastId?: string) => Promise<InvoicesListResponse>;
16
+ /**
17
+ * Get a specific invoice by ID
18
+ * @param marketId - ID of the market
19
+ * @param invoiceId - ID of the invoice to fetch
20
+ * @returns The invoice details
21
+ */
22
+ get: (marketId: string, invoiceId: string) => Promise<Invoice>;
23
+ };
24
+ export type Invoices = ReturnType<typeof create>;
@@ -0,0 +1,24 @@
1
+ import { HttpClient } from "../net/http";
2
+ import { Payment } from "../types";
3
+ export interface PaymentsListResponse {
4
+ payments: Payment[];
5
+ lastId: string | null;
6
+ hasMore: boolean;
7
+ }
8
+ export default function create(httpClient: HttpClient): {
9
+ /**
10
+ * List all payments for a market with pagination
11
+ * @param marketId - ID of the market
12
+ * @param lastId - ID of the last payment from previous page (for pagination)
13
+ * @returns Paginated list of payments
14
+ */
15
+ list: (marketId: string, lastId?: string) => Promise<PaymentsListResponse>;
16
+ /**
17
+ * Get a specific payment by ID
18
+ * @param marketId - ID of the market
19
+ * @param paymentId - ID of the payment to fetch
20
+ * @returns The payment details
21
+ */
22
+ get: (marketId: string, paymentId: string) => Promise<Payment>;
23
+ };
24
+ export type Payments = ReturnType<typeof create>;
@@ -0,0 +1,24 @@
1
+ import { HttpClient } from "../net/http";
2
+ import { Payout } from "../types";
3
+ export interface PayoutsListResponse {
4
+ payouts: Payout[];
5
+ lastId: string | null;
6
+ hasMore: boolean;
7
+ }
8
+ export default function create(httpClient: HttpClient): {
9
+ /**
10
+ * List all payouts for a market with pagination
11
+ * @param marketId - ID of the market
12
+ * @param lastId - ID of the last payout from previous page (for pagination)
13
+ * @returns Paginated list of payouts
14
+ */
15
+ list: (marketId: string, lastId?: string) => Promise<PayoutsListResponse>;
16
+ /**
17
+ * Get a specific payout by ID
18
+ * @param marketId - ID of the market
19
+ * @param payoutId - ID of the payout to fetch
20
+ * @returns The payout details
21
+ */
22
+ get: (marketId: string, payoutId: string) => Promise<Payout>;
23
+ };
24
+ export type Payouts = ReturnType<typeof create>;
@@ -171,6 +171,18 @@ export default function resources(httpClient: HttpClient): {
171
171
  getByAccountNumber: (marketId: string, accountNumber: string) => Promise<import("./types").Customer | null>;
172
172
  getByMartEyeUid: (marketId: string, marteyeUid: string) => Promise<import("./types").Customer | null>;
173
173
  };
174
+ invoices: {
175
+ list: (marketId: string, lastId?: string) => Promise<import("./resources/invoices").InvoicesListResponse>;
176
+ get: (marketId: string, invoiceId: string) => Promise<import("./types").Invoice>;
177
+ };
178
+ payments: {
179
+ list: (marketId: string, lastId?: string) => Promise<import("./resources/payments").PaymentsListResponse>;
180
+ get: (marketId: string, paymentId: string) => Promise<import("./types").Payment>;
181
+ };
182
+ payouts: {
183
+ list: (marketId: string, lastId?: string) => Promise<import("./resources/payouts").PayoutsListResponse>;
184
+ get: (marketId: string, payoutId: string) => Promise<import("./types").Payout>;
185
+ };
174
186
  search: {
175
187
  query: (marketId: string, query: string) => Promise<import("./resources/search").SearchResult>;
176
188
  };
package/dist/studio.d.ts CHANGED
@@ -180,6 +180,18 @@ export declare function Studio(info?: {
180
180
  getByAccountNumber: (marketId: string, accountNumber: string) => Promise<import("./types").Customer | null>;
181
181
  getByMartEyeUid: (marketId: string, marteyeUid: string) => Promise<import("./types").Customer | null>;
182
182
  };
183
+ invoices: {
184
+ list: (marketId: string, lastId?: string) => Promise<import("./resources/invoices").InvoicesListResponse>;
185
+ get: (marketId: string, invoiceId: string) => Promise<import("./types").Invoice>;
186
+ };
187
+ payments: {
188
+ list: (marketId: string, lastId?: string) => Promise<import("./resources/payments").PaymentsListResponse>;
189
+ get: (marketId: string, paymentId: string) => Promise<import("./types").Payment>;
190
+ };
191
+ payouts: {
192
+ list: (marketId: string, lastId?: string) => Promise<import("./resources/payouts").PayoutsListResponse>;
193
+ get: (marketId: string, payoutId: string) => Promise<import("./types").Payout>;
194
+ };
183
195
  search: {
184
196
  query: (marketId: string, query: string) => Promise<import("./resources/search").SearchResult>;
185
197
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marteye/studiojs",
3
- "version": "1.1.35",
3
+ "version": "1.1.36",
4
4
  "description": "MartEye Studio JavaScript SDK",
5
5
  "license": "MIT",
6
6
  "source": "src/index.ts",