@tapsilat/tapsilat-js 2026.4.2 → 2026.7.7

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/README.md CHANGED
@@ -107,6 +107,8 @@ This JavaScript SDK provides full feature parity with Tapsilat's Python and .NET
107
107
  |-----------------|------------|--------|------|
108
108
  | Order Management | Yes | Yes | Yes |
109
109
  | Payment Terms | Yes | Yes | Yes |
110
+ | System Utilities | Yes | Yes | Yes |
111
+ | Organization | Yes | Yes | Yes |
110
112
  | GSM Validation | Yes | Yes | Yes |
111
113
  | Installment Validation | Yes | Yes | Yes |
112
114
  | Webhook Verification | Yes | No | No |
@@ -324,6 +326,51 @@ const terminatedOrder = await tapsilat.terminateOrder({
324
326
  console.log('Order terminated at:', terminatedOrder.terminated_at);
325
327
  ```
326
328
 
329
+ ### Submerchant Management
330
+
331
+ #### Create Submerchant
332
+ ```typescript
333
+ const submerchant = await tapsilat.submerchant.create({
334
+ name: "Test Submerchant",
335
+ email: "submerchant@example.com",
336
+ address: "Istanbul, Turkey",
337
+ city: "Istanbul",
338
+ country: "Turkey",
339
+ gsm_number: "5555555555",
340
+ iban: "TR123456789012345678901234",
341
+ identity_number: "11111111111",
342
+ contact_name: "Test",
343
+ contact_surname: "Sub",
344
+ sub_merchant_type: "PERSONAL",
345
+ tax_office: "Test Office",
346
+ zip_code: "34000"
347
+ });
348
+ console.log('Submerchant created:', submerchant.id);
349
+ ```
350
+
351
+ #### List Submerchants
352
+ ```typescript
353
+ const submerchants = await tapsilat.submerchant.list(1, 10);
354
+ submerchants.data.forEach(sub => {
355
+ console.log(`Submerchant: ${sub.name}`);
356
+ });
357
+ ```
358
+
359
+ ### Document Downloads
360
+
361
+ #### Download Order PDF
362
+ ```typescript
363
+ const pdfBlob = await tapsilat.orders.getPdf('order-reference-id');
364
+ // For browsers, you can create an object URL to download the Blob:
365
+ // const url = URL.createObjectURL(pdfBlob);
366
+ // window.open(url);
367
+ ```
368
+
369
+ #### Download Order Excel
370
+ ```typescript
371
+ const excelBlob = await tapsilat.orders.getExcel('order-reference-id');
372
+ ```
373
+
327
374
  ### Subscription Management
328
375
 
329
376
  #### Create Subscription
@@ -428,6 +475,31 @@ const settings = await tapsilat.getOrganizationSettings();
428
475
  console.log('Organization Settings:', settings);
429
476
  ```
430
477
 
478
+ #### Get Currency Presets
479
+ ```typescript
480
+ const presets = await tapsilat.getOrganizationCurrencyPresets();
481
+ console.log('Available currencies:', presets);
482
+ ```
483
+
484
+ #### Get Suborganization Details
485
+ ```typescript
486
+ const suborg = await tapsilat.getOrganizationSuborganizationDetails('suborg-id');
487
+ console.log('Suborganization Name:', suborg.name);
488
+ ```
489
+
490
+ ### System Utilities
491
+
492
+ #### Get System Endpoints
493
+ ```typescript
494
+ // Fetch various system configurations
495
+ const errorCodes = await tapsilat.getSystemErrorCodes();
496
+ const productTypes = await tapsilat.getSystemProductTypes();
497
+ const transactionStatuses = await tapsilat.getSystemTransactionStatuses();
498
+ const basketItemTypes = await tapsilat.getSystemBasketItemTypes();
499
+
500
+ console.log('Available Error Codes:', errorCodes.rows);
501
+ ```
502
+
431
503
  ### Manual Operations
432
504
 
433
505
  #### Trigger Manual Callback
@@ -1,5 +1,5 @@
1
1
  import { ConfigManager } from "./config/ConfigManager";
2
- import { TapsilatConfig, PaginatedResponse, Order, OrderRefundRequest, OrderRefundResponse, OrderStatusResponse, OrderPaymentDetail, OrderCreateRequest, OrderCreateResponse, OrderPaymentTermCreateDTO, OrderPaymentTermUpdateDTO, OrderTermRefundRequest, PaymentTermResponse, PaymentTermDeleteRequest, PaymentTermRefundResponse, PaymentTermTerminateRequest, OrderTerminateRequest, OrderTerminateResponse, SubscriptionGetRequest, SubscriptionCancelRequest, SubscriptionCreateRequest, SubscriptionRedirectRequest, SubscriptionDetail, SubscriptionCreateResponse, SubscriptionRedirectResponse, OrganizationSettings, OrderTransaction, OrderSubmerchant, APIResponse, OrderAccountingRequest, OrderPostAuthRequest, AddBasketItemRequest, RemoveBasketItemRequest, UpdateBasketItemRequest, CallbackURLDTO, OrgCreateBusinessRequest, GetUserLimitRequest, SetLimitUserRequest, GetVposRequest, OrgCreateUserReq, OrgUserVerifyReq, OrgUserMobileVerifyReq } from "./types/index";
2
+ import { TapsilatConfig, GetOrderResponse, GetOrdersRequest, GetOrdersResponse, CancelOrderResponse, OrderRefundRequest, OrderRefundResponse, OrderStatusResponse, GetSystemOrderStatusesResponse, GetOrderPaymentDetailsResponse, OrderPaymentDetailDTO, OrderCreateRequest, OrderCreateResponse, OrderPaymentTermCreateDTO, OrderPaymentTermUpdateDTO, OrderTermRefundRequest, PaymentTermResponse, GetOrderTermResponse, PaymentTermDeleteRequest, PaymentTermRefundResponse, PaymentTermTerminateRequest, OrderTerminateRequest, OrderTerminateResponse, OrderPaymentTermActionResponse, SubscriptionGetRequest, SubscriptionCancelRequest, SubscriptionCreateRequest, SubscriptionRedirectRequest, ListSubscriptionsRequest, SubscriptionDetail, ListSubscriptionsResponse, SubscriptionCreateResponse, SubscriptionRedirectResponse, OrganizationSettings, GetOrderTransactionsResponse, GetOrderSubmerchantsRequest, GetOrderSubmerchantsResponse, OrderAccountingRequest, OrderAccountingResponse, OrderPostAuthRequest, OrderPostAuthResponse, AddBasketItemRequest, AddBasketItemResponse, RemoveBasketItemRequest, RemoveBasketItemResponse, UpdateBasketItemRequest, UpdateBasketItemResponse, OrderManualCallbackResponse, OrderRelatedUpdateResponse, CallbackURLDTO, OrgCreateBusinessRequest, OrgCreateBusinessResponse, OrganizationResponse, GetOrganizationCurrenciesResponse, GetUserLimitRequest, GetUserLimitResponse, SetLimitUserRequest, SetLimitUserResponse, GetOrganizationLimitsResponse, GetMetaResponse, GetOrganizationScopesResponse, GetSuborganizationsRequest, GetSubOrganizationListResponse, GetVposRequest, GetVposResponse, OrgCreateUserRequest, OrgCreateUserResponse, OrgUserVerifyRequest, OrgUserVerifyResponse, OrgUserMobileVerifyRequest, OrgUserMobileVerifyResponse, CancelSubscriptionResponse, OrderPaymentOptionsUpdateDTO, SplitOrderItemPaymentDTO, OrderCallbackResponse, OrderVposQueryResponse, GetOrganizationCurrencyPresetsResponse, GetSuborganizationDetailsResponse, GetSuborganizationSubmerchantsResponse, GetOrderPaymentsRequest, GetOrderPaymentsResponse, OrderOIPDTO, OrderOIPResponse, SubmerchantCreateDTO, SubmerchantUpdateDTO, GetSubmerchantResponse, ListSubmerchantsResponse, OrgUserTokenCreateReq, OrgUserTokenCreateResponse, RefundOrderDTO, GetSystemBasketItemTypesResponse, GetSystemErrorCodesResponse, GetSystemPaymentTermStatusesResponse, GetSystemProductTypesResponse, GetSystemShortcutTypesResponse, GetSystemTransactionPaymentTypesResponse, GetSystemTransactionPurposesResponse, GetSystemTransactionStatusesResponse } from "./types/index";
3
3
  /**
4
4
  * Main SDK class for Tapsilat payment operations
5
5
  *
@@ -57,6 +57,14 @@ export declare class TapsilatSDK {
57
57
  * Access to organization operations
58
58
  */
59
59
  get organization(): any;
60
+ /**
61
+ * Access to submerchant operations
62
+ */
63
+ get submerchant(): any;
64
+ /**
65
+ * Access to system operations
66
+ */
67
+ get system(): any;
60
68
  /**
61
69
  * Access to webhook operations
62
70
  */
@@ -92,10 +100,10 @@ export declare class TapsilatSDK {
92
100
  * @param {string} [orderRequest.payment_success_url] - URL to redirect after successful payment
93
101
  * @param {string} [orderRequest.payment_failure_url] - URL to redirect after failed payment
94
102
  * @param {number[]} [orderRequest.enabled_installments] - Allowed installment counts
95
- * @param {Record<string, unknown>} [orderRequest.metadata] - Additional custom data
103
+ * @param {OrderMetadata[]} [orderRequest.metadata] - Additional custom key/value data
96
104
  *
97
105
  * @returns {Promise<OrderCreateResponse>} Promise resolving to order creation response
98
- * @returns {string} OrderCreateResponse.order_id - Internal order identifier
106
+ * @returns {string} [OrderCreateResponse.id] - Internal order identifier
99
107
  * @returns {string} OrderCreateResponse.reference_id - Unique order reference for tracking
100
108
  * @returns {string} [OrderCreateResponse.checkout_url] - Payment page URL for customer
101
109
  * @returns {string} [OrderCreateResponse.conversation_id] - Echo of provided conversation ID
@@ -120,11 +128,11 @@ export declare class TapsilatSDK {
120
128
  * @description Handles accounting operations for a specific order using its reference ID.
121
129
  *
122
130
  * @param {OrderAccountingRequest} request - Accounting request details
123
- * @returns {Promise<APIResponse<unknown>>} Promise resolving to the accounting response
131
+ * @returns {Promise<OrderAccountingResponse>} Promise resolving to the accounting response
124
132
  * @throws {TapsilatValidationError} When input validation fails
125
133
  * @throws {TapsilatError} When API returns an error response
126
134
  */
127
- orderAccounting(request: OrderAccountingRequest): Promise<APIResponse<unknown>>;
135
+ orderAccounting(request: OrderAccountingRequest): Promise<OrderAccountingResponse>;
128
136
  /**
129
137
  * Process post-authorization for an order
130
138
  *
@@ -132,21 +140,61 @@ export declare class TapsilatSDK {
132
140
  * @description Handles post-authorization operations for a specific order.
133
141
  *
134
142
  * @param {OrderPostAuthRequest} request - Post-authorization request details
135
- * @returns {Promise<APIResponse<unknown>>} Promise resolving to the post-auth response
143
+ * @returns {Promise<OrderPostAuthResponse>} Promise resolving to the post-auth response
136
144
  * @throws {TapsilatValidationError} When input validation fails
137
145
  * @throws {TapsilatError} When API returns an error response
138
146
  */
139
- orderPostAuth(request: OrderPostAuthRequest): Promise<APIResponse<unknown>>;
147
+ orderPostAuth(request: OrderPostAuthRequest): Promise<OrderPostAuthResponse>;
140
148
  /**
141
149
  * Retrieve system order statuses
142
150
  *
143
151
  * @summary Retrieve system order statuses
144
152
  * @description Gets a list of all possible order statuses in the system.
145
153
  *
146
- * @returns {Promise<APIResponse<unknown>>} Promise resolving to system order statuses
154
+ * @returns {Promise<GetSystemOrderStatusesResponse>} Promise resolving to system order statuses
147
155
  * @throws {TapsilatError} When API returns an error response
148
156
  */
149
- getSystemOrderStatuses(): Promise<APIResponse<unknown>>;
157
+ getSystemOrderStatuses(): Promise<GetSystemOrderStatusesResponse>;
158
+ /**
159
+ * Retrieves system basket item types.
160
+ * Based on `get_system_basket_item_types` from Python SDK.
161
+ */
162
+ getSystemBasketItemTypes(): Promise<GetSystemBasketItemTypesResponse>;
163
+ /**
164
+ * Retrieves system error codes.
165
+ * Based on `get_system_error_codes` from Python SDK.
166
+ */
167
+ getSystemErrorCodes(): Promise<GetSystemErrorCodesResponse>;
168
+ /**
169
+ * Retrieves system payment term statuses.
170
+ * Based on `get_system_payment_term_statuses` from Python SDK.
171
+ */
172
+ getSystemPaymentTermStatuses(): Promise<GetSystemPaymentTermStatusesResponse>;
173
+ /**
174
+ * Retrieves system product types.
175
+ * Based on `get_system_product_types` from Python SDK.
176
+ */
177
+ getSystemProductTypes(): Promise<GetSystemProductTypesResponse>;
178
+ /**
179
+ * Retrieves system shortcut types.
180
+ * Based on `get_system_shortcut_types` from Python SDK.
181
+ */
182
+ getSystemShortcutTypes(): Promise<GetSystemShortcutTypesResponse>;
183
+ /**
184
+ * Retrieves system transaction payment types.
185
+ * Based on `get_system_transaction_payment_types` from Python SDK.
186
+ */
187
+ getSystemTransactionPaymentTypes(): Promise<GetSystemTransactionPaymentTypesResponse>;
188
+ /**
189
+ * Retrieves system transaction purposes.
190
+ * Based on `get_system_transaction_purposes` from Python SDK.
191
+ */
192
+ getSystemTransactionPurposes(): Promise<GetSystemTransactionPurposesResponse>;
193
+ /**
194
+ * Retrieves system transaction statuses.
195
+ * Based on `get_system_transaction_statuses` from Python SDK.
196
+ */
197
+ getSystemTransactionStatuses(): Promise<GetSystemTransactionStatusesResponse>;
150
198
  /**
151
199
  * Gets an order by reference ID.
152
200
  *
@@ -159,7 +207,7 @@ export declare class TapsilatSDK {
159
207
  * @throws {TapsilatNetworkError} When API request fails due to network issues
160
208
  * @throws {TapsilatError} When API returns an error response
161
209
  */
162
- getOrder(referenceId: string): Promise<Order>;
210
+ getOrder(referenceId: string): Promise<GetOrderResponse>;
163
211
  /**
164
212
  * Lists orders with pagination support.
165
213
  *
@@ -171,15 +219,7 @@ export declare class TapsilatSDK {
171
219
  * @throws {TapsilatNetworkError} When API request fails due to network issues
172
220
  * @throws {TapsilatError} When API returns an error response
173
221
  */
174
- getOrders(params?: {
175
- page?: number;
176
- per_page?: number;
177
- start_date?: string;
178
- end_date?: string;
179
- status?: string;
180
- organization_id?: string;
181
- related_reference_id?: string;
182
- }): Promise<PaginatedResponse<Order>>;
222
+ getOrders(params?: GetOrdersRequest): Promise<GetOrdersResponse>;
183
223
  /**
184
224
  * Cancels an order by reference_id.
185
225
  *
@@ -191,19 +231,19 @@ export declare class TapsilatSDK {
191
231
  * @throws {TapsilatValidationError} When referenceId is invalid
192
232
  * @throws {TapsilatError} When API returns an error response or order cannot be canceled
193
233
  */
194
- cancelOrder(referenceId: string): Promise<Order>;
234
+ cancelOrder(referenceId: string): Promise<CancelOrderResponse>;
195
235
  /**
196
236
  * Gets the current status of an order by reference ID
197
237
  *
198
238
  * @summary Retrieves real-time payment status and tracking information for a specific order
199
239
  * @description
200
240
  * Queries the Tapsilat payment platform to retrieve the current status of an order using its
201
- * unique reference ID. This method provides real-time information about payment progress,
202
- * completion status, and last update timestamp. It's essential for tracking payment flow
241
+ * unique reference ID. This method provides real-time information about payment processing
242
+ * status and error code (if returned by the API). It's essential for tracking payment flow
203
243
  * and implementing proper order state management in your application.
204
244
  *
205
- * The status information includes payment state (CREATED, PENDING_PAYMENT, COMPLETED, CANCELLED),
206
- * last update timestamp, and any relevant status metadata. This method should be used to:
245
+ * The status information includes payment state and API-level error code metadata.
246
+ * This method should be used to:
207
247
  * - Check if a payment has been completed after redirecting from checkout
208
248
  * - Monitor payment status for pending transactions
209
249
  * - Verify order state before fulfilling goods/services
@@ -212,13 +252,11 @@ export declare class TapsilatSDK {
212
252
  * @param {string} referenceId - Unique order reference identifier from order creation
213
253
  *
214
254
  * @returns {Promise<OrderStatusResponse>} Promise resolving to current order status information
215
- * @returns {string} OrderStatusResponse.referenceId - Echo of the provided reference ID
216
- * @returns {string} OrderStatusResponse.status - Current payment status (CREATED, PENDING_PAYMENT, COMPLETED, CANCELLED, FAILED)
217
- * @returns {string} OrderStatusResponse.lastUpdatedAt - ISO 8601 timestamp of last status change
255
+ * @returns {string} [OrderStatusResponse.error_code] - API-level error code when present
256
+ * @returns {string} [OrderStatusResponse.status] - Current payment processing status
218
257
  *
219
258
  * @throws {TapsilatValidationError} When input validation fails:
220
259
  * - Reference ID is null, undefined, or empty string
221
- * - Reference ID format is invalid (should match order ID pattern)
222
260
  * @throws {TapsilatNetworkError} When network request fails:
223
261
  * - Connection timeout during status check
224
262
  * - DNS resolution failure
@@ -254,19 +292,35 @@ export declare class TapsilatSDK {
254
292
  */
255
293
  refundAllOrder(referenceId: string): Promise<OrderRefundResponse>;
256
294
  /**
257
- * Retrieves the payment details for an order.
295
+ * Retrieves the payment details for an order via POST request.
258
296
  * Based on `get_order_payment_details` from the Python SDK.
259
- *
260
- * @summary Retrieve detailed payment transaction information for an order
261
- * @description Gets payment method, amount, status, and card info for order transactions.
262
- *
263
- * @param referenceId - The unique identifier of the order.
264
- * @param conversationId - Optional conversation ID for more specific querying.
265
- * @returns Promise resolving to a list of payment details.
266
- * @throws {TapsilatValidationError} When referenceId is invalid
267
- * @throws {TapsilatError} When API returns an error response or payment details are missing
268
297
  */
269
- getOrderPaymentDetails(referenceId: string, conversationId?: string): Promise<OrderPaymentDetail[]>;
298
+ getOrderPaymentDetails(request: OrderPaymentDetailDTO): Promise<GetOrderPaymentDetailsResponse>;
299
+ /**
300
+ * Retrieves the payment details for an order by ID.
301
+ * Based on `get_order_payment_details_by_id` from the Python SDK.
302
+ */
303
+ getOrderPaymentDetailsById(referenceId: string): Promise<GetOrderPaymentDetailsResponse>;
304
+ /**
305
+ * Retrieves the order callback via GET request.
306
+ * Based on `order_callback` from the Python SDK.
307
+ */
308
+ orderCallback(id: string): Promise<OrderCallbackResponse>;
309
+ /**
310
+ * Updates payment options for an order.
311
+ * Based on `update_payment_options` from the Python SDK.
312
+ */
313
+ updatePaymentOptions(request: OrderPaymentOptionsUpdateDTO): Promise<OrderRelatedUpdateResponse>;
314
+ /**
315
+ * Splits order item payment.
316
+ * Based on `split_order_item_payment` from the Python SDK.
317
+ */
318
+ splitOrderItemPayment(request: SplitOrderItemPaymentDTO): Promise<OrderRelatedUpdateResponse>;
319
+ /**
320
+ * Queries vpos for an order.
321
+ * Based on `order_vpos_query` from the Python SDK.
322
+ */
323
+ orderVposQuery(id: string): Promise<OrderVposQueryResponse>;
270
324
  /**
271
325
  * Gets an order by conversation_id.
272
326
  * Based on `get_order_by_conversation_id` from the Python SDK.
@@ -279,7 +333,7 @@ export declare class TapsilatSDK {
279
333
  * @throws {TapsilatValidationError} When conversationId is invalid
280
334
  * @throws {TapsilatError} When API returns an error response
281
335
  */
282
- getOrderByConversationId(conversationId: string): Promise<Order>;
336
+ getOrderByConversationId(conversationId: string): Promise<GetOrderResponse>;
283
337
  /**
284
338
  * Gets order transactions by reference_id.
285
339
  * Based on `get_order_transactions` from the Python SDK.
@@ -292,7 +346,7 @@ export declare class TapsilatSDK {
292
346
  * @throws {TapsilatValidationError} When referenceId is invalid
293
347
  * @throws {TapsilatError} When API returns an error response
294
348
  */
295
- getOrderTransactions(referenceId: string): Promise<OrderTransaction[]>;
349
+ getOrderTransactions(referenceId: string): Promise<GetOrderTransactionsResponse>;
296
350
  /**
297
351
  * Gets order submerchants with pagination.
298
352
  * Based on `get_order_submerchants` from the Python SDK.
@@ -304,10 +358,7 @@ export declare class TapsilatSDK {
304
358
  * @returns Promise resolving to paginated list of submerchants
305
359
  * @throws {TapsilatError} When API returns an error response
306
360
  */
307
- getOrderSubmerchants(params?: {
308
- page?: number;
309
- per_page?: number;
310
- }): Promise<PaginatedResponse<OrderSubmerchant>>;
361
+ getOrderSubmerchants(params?: GetOrderSubmerchantsRequest): Promise<GetOrderSubmerchantsResponse>;
311
362
  /**
312
363
  * Gets checkout URL for an order.
313
364
  * Based on `get_checkout_url` from the Python SDK.
@@ -393,7 +444,7 @@ export declare class TapsilatSDK {
393
444
  * @throws {TapsilatValidationError} When input validation fails
394
445
  * @throws {TapsilatError} When API returns an error response
395
446
  */
396
- createOrderTerm(termData: OrderPaymentTermCreateDTO): Promise<PaymentTermResponse>;
447
+ createOrderTerm(termData: OrderPaymentTermCreateDTO): Promise<OrderPaymentTermActionResponse>;
397
448
  /**
398
449
  * Updates an existing payment term
399
450
  *
@@ -416,7 +467,7 @@ export declare class TapsilatSDK {
416
467
  * @throws {TapsilatValidationError} When input validation fails
417
468
  * @throws {TapsilatError} When API returns an error response
418
469
  */
419
- updateOrderTerm(updateData: OrderPaymentTermUpdateDTO): Promise<PaymentTermResponse>;
470
+ updateOrderTerm(updateData: OrderPaymentTermUpdateDTO): Promise<OrderPaymentTermActionResponse>;
420
471
  /**
421
472
  * Deletes a payment term
422
473
  *
@@ -432,7 +483,7 @@ export declare class TapsilatSDK {
432
483
  * @throws {TapsilatValidationError} When input validation fails
433
484
  * @throws {TapsilatError} When API returns an error response
434
485
  */
435
- deleteOrderTerm(deleteData: PaymentTermDeleteRequest): Promise<PaymentTermResponse>;
486
+ deleteOrderTerm(deleteData: PaymentTermDeleteRequest): Promise<OrderPaymentTermActionResponse>;
436
487
  /**
437
488
  * Refunds a specific payment term
438
489
  *
@@ -487,85 +538,231 @@ export declare class TapsilatSDK {
487
538
  * @throws {TapsilatError} When API returns an error response
488
539
  */
489
540
  terminateOrder(terminateData: OrderTerminateRequest): Promise<OrderTerminateResponse>;
490
- orderManualCallback(referenceId: string, conversationId?: string): Promise<APIResponse<unknown>>;
491
- orderRelatedUpdate(referenceId: string, relatedReferenceId: string): Promise<APIResponse<unknown>>;
541
+ orderManualCallback(referenceId: string, conversationId?: string): Promise<OrderManualCallbackResponse>;
542
+ orderRelatedUpdate(referenceId: string, relatedReferenceId: string): Promise<OrderRelatedUpdateResponse>;
492
543
  getOrganizationSettings(): Promise<OrganizationSettings>;
493
- getOrderTerm(termReferenceId: string): Promise<PaymentTermResponse>;
544
+ getOrderTerm(termReferenceId: string): Promise<GetOrderTermResponse>;
494
545
  /**
495
546
  * Add a new item to an existing order basket
496
547
  */
497
- addBasketItem(request: AddBasketItemRequest): Promise<APIResponse<unknown>>;
548
+ addBasketItem(request: AddBasketItemRequest): Promise<AddBasketItemResponse>;
498
549
  /**
499
550
  * Remove an item from an existing order basket
500
551
  */
501
- removeBasketItem(request: RemoveBasketItemRequest): Promise<APIResponse<unknown>>;
552
+ removeBasketItem(request: RemoveBasketItemRequest): Promise<RemoveBasketItemResponse>;
502
553
  /**
503
554
  * Update an existing item in an order basket
504
555
  */
505
- updateBasketItem(request: UpdateBasketItemRequest): Promise<APIResponse<unknown>>;
556
+ updateBasketItem(request: UpdateBasketItemRequest): Promise<UpdateBasketItemResponse>;
506
557
  /**
507
558
  * Retrieve organization callback (webhook) settings
508
559
  */
509
- getOrganizationCallback(): Promise<APIResponse<CallbackURLDTO>>;
560
+ getOrganizationCallback(): Promise<CallbackURLDTO>;
510
561
  /**
511
562
  * Update organization callback (webhook) settings
512
563
  */
513
- updateOrganizationCallback(request: CallbackURLDTO): Promise<APIResponse<unknown>>;
564
+ updateOrganizationCallback(request: CallbackURLDTO): Promise<OrganizationResponse>;
514
565
  /**
515
566
  * Create a new business entity within the organization
516
567
  */
517
- createOrganizationBusiness(request: OrgCreateBusinessRequest): Promise<APIResponse<unknown>>;
568
+ createOrganizationBusiness(request: OrgCreateBusinessRequest): Promise<OrgCreateBusinessResponse>;
518
569
  /**
519
570
  * Retrieve supported currencies for the organization
520
571
  */
521
- getOrganizationCurrencies(): Promise<APIResponse<unknown>>;
572
+ getOrganizationCurrencies(): Promise<GetOrganizationCurrenciesResponse>;
573
+ /**
574
+ * Retrieves organization currency presets.
575
+ * Based on `get_organization_currency_presets` from Python SDK.
576
+ */
577
+ getOrganizationCurrencyPresets(): Promise<GetOrganizationCurrencyPresetsResponse>;
578
+ /**
579
+ * Retrieves organization suborganization details.
580
+ * Based on `get_organization_suborganization_details` from Python SDK.
581
+ */
582
+ getOrganizationSuborganizationDetails(id: string): Promise<GetSuborganizationDetailsResponse>;
583
+ /**
584
+ * Retrieves organization suborganization submerchants.
585
+ * Based on `get_organization_suborganization_submerchants` from Python SDK.
586
+ */
587
+ getOrganizationSuborganizationSubmerchants(id: string): Promise<GetSuborganizationSubmerchantsResponse>;
522
588
  /**
523
589
  * Retrieve limit information for a specific organization user
524
590
  */
525
- getOrganizationLimitUser(request: GetUserLimitRequest): Promise<APIResponse<unknown>>;
591
+ getOrganizationLimitUser(request: GetUserLimitRequest): Promise<GetUserLimitResponse>;
526
592
  /**
527
593
  * Set limit for a specific organization user
528
594
  */
529
- setOrganizationLimitUser(request: SetLimitUserRequest): Promise<APIResponse<unknown>>;
595
+ setOrganizationLimitUser(request: SetLimitUserRequest): Promise<SetLimitUserResponse>;
530
596
  /**
531
597
  * Retrieve organization overall limits
532
598
  */
533
- getOrganizationLimits(): Promise<APIResponse<unknown>>;
599
+ getOrganizationLimits(): Promise<GetOrganizationLimitsResponse>;
534
600
  /**
535
601
  * Retrieve meta information for the organization
536
602
  */
537
- getOrganizationMeta(): Promise<APIResponse<unknown>>;
603
+ getOrganizationMeta(name: string): Promise<GetMetaResponse>;
538
604
  /**
539
605
  * Retrieve supported scopes for the organization
540
606
  */
541
- getOrganizationScopes(): Promise<APIResponse<unknown>>;
607
+ getOrganizationScopes(): Promise<GetOrganizationScopesResponse>;
542
608
  /**
543
609
  * Retrieve list of sub-organizations
544
610
  */
545
- getOrganizationSuborganizations(): Promise<APIResponse<unknown>>;
611
+ getOrganizationSuborganizations(params?: GetSuborganizationsRequest): Promise<GetSubOrganizationListResponse>;
546
612
  /**
547
613
  * Create a new user within the organization
548
614
  */
549
- createOrganizationUser(request: OrgCreateUserReq): Promise<APIResponse<unknown>>;
615
+ createOrganizationUser(request: OrgCreateUserRequest): Promise<OrgCreateUserResponse>;
550
616
  /**
551
617
  * Verify an organization user
552
618
  */
553
- verifyOrganizationUser(request: OrgUserVerifyReq): Promise<APIResponse<unknown>>;
619
+ verifyOrganizationUser(request: OrgUserVerifyRequest): Promise<OrgUserVerifyResponse>;
554
620
  /**
555
621
  * Verify an organization user via mobile
556
622
  */
557
- verifyOrganizationUserMobile(request: OrgUserMobileVerifyReq): Promise<APIResponse<unknown>>;
623
+ verifyOrganizationUserMobile(request: OrgUserMobileVerifyRequest): Promise<OrgUserMobileVerifyResponse>;
558
624
  /**
559
625
  * List virtual POS terminals for the organization
560
626
  */
561
- listOrganizationVpos(request: GetVposRequest): Promise<APIResponse<unknown>>;
627
+ listOrganizationVpos(request: GetVposRequest): Promise<GetVposResponse>;
562
628
  createSubscription(request: SubscriptionCreateRequest): Promise<SubscriptionCreateResponse>;
563
629
  getSubscription(request: SubscriptionGetRequest): Promise<SubscriptionDetail>;
564
- listSubscriptions(params?: {
565
- page?: number;
566
- per_page?: number;
567
- }): Promise<PaginatedResponse<SubscriptionDetail>>;
568
- cancelSubscription(request: SubscriptionCancelRequest): Promise<APIResponse<unknown>>;
630
+ listSubscriptions(params?: ListSubscriptionsRequest): Promise<ListSubscriptionsResponse>;
631
+ cancelSubscription(request: SubscriptionCancelRequest): Promise<CancelSubscriptionResponse>;
569
632
  redirectSubscription(request: SubscriptionRedirectRequest): Promise<SubscriptionRedirectResponse>;
633
+ /**
634
+ * Gets payments for an order.
635
+ * Based on `get_order_payments` from the Python SDK.
636
+ *
637
+ * @summary Get order payments
638
+ * @description Retrieve a list of payments made for a specific order.
639
+ *
640
+ * @param request - Order payments request containing order_id
641
+ * @returns Promise resolving to order payments
642
+ */
643
+ getOrderPayments(request: GetOrderPaymentsRequest): Promise<GetOrderPaymentsResponse>;
644
+ /**
645
+ * Downloads order PDF.
646
+ * Based on `get_order_pdf` from the Python SDK.
647
+ *
648
+ * @summary Download order PDF
649
+ * @description Download order as a PDF file.
650
+ *
651
+ * @param id - Order reference ID
652
+ * @returns Promise resolving to a Blob representing the PDF
653
+ */
654
+ getOrderPdf(id: string): Promise<Blob>;
655
+ /**
656
+ * Downloads order Excel.
657
+ * Based on `get_order_excel` from the Python SDK.
658
+ *
659
+ * @summary Download order Excel
660
+ * @description Download order as an Excel file.
661
+ *
662
+ * @param id - Order reference ID
663
+ * @returns Promise resolving to a Blob representing the Excel file
664
+ */
665
+ getOrderExcel(id: string): Promise<Blob>;
666
+ /**
667
+ * Creates an order refund request.
668
+ * Based on `create_order_refund_request` from the Python SDK.
669
+ *
670
+ * @summary Create order refund request
671
+ * @description Request a refund for an order.
672
+ *
673
+ * @param request - Order refund request payload
674
+ * @returns Promise resolving to refund response
675
+ */
676
+ createOrderRefundRequest(request: RefundOrderDTO): Promise<OrderRefundResponse>;
677
+ /**
678
+ * Adds an order item payment.
679
+ * Based on `add_order_oip` from the Python SDK.
680
+ *
681
+ * @summary Add Order OIP
682
+ * @description Adds an order item payment to a specific order.
683
+ *
684
+ * @param request - Order OIP request payload containing order_id and other details
685
+ * @returns Promise resolving to OIP response
686
+ */
687
+ addOrderOip(request: OrderOIPDTO): Promise<OrderOIPResponse>;
688
+ /**
689
+ * Creates a submerchant.
690
+ * Based on `create_submerchant` from the Python SDK.
691
+ *
692
+ * @summary Create submerchant
693
+ * @description Creates a new submerchant.
694
+ *
695
+ * @param request - Submerchant creation payload
696
+ * @returns Promise resolving to the created submerchant details
697
+ */
698
+ createSubmerchant(request: SubmerchantCreateDTO): Promise<GetSubmerchantResponse>;
699
+ /**
700
+ * Gets a submerchant.
701
+ * Based on `get_submerchant` from the Python SDK.
702
+ *
703
+ * @summary Get submerchant
704
+ * @description Retrieves submerchant details.
705
+ *
706
+ * @param id - Submerchant ID
707
+ * @returns Promise resolving to submerchant details
708
+ */
709
+ getSubmerchant(id: string): Promise<GetSubmerchantResponse>;
710
+ /**
711
+ * Gets suborganization by submerchant.
712
+ * Based on `get_suborganization_by_submerchant` from the Python SDK.
713
+ *
714
+ * @summary Get suborganization by submerchant
715
+ * @description Retrieves the suborganization details associated with a submerchant.
716
+ *
717
+ * @param id - Submerchant ID
718
+ * @returns Promise resolving to suborganization details
719
+ */
720
+ getSuborganizationBySubmerchant(id: string): Promise<unknown>;
721
+ /**
722
+ * Updates a submerchant.
723
+ * Based on `update_submerchant` from the Python SDK.
724
+ *
725
+ * @summary Update submerchant
726
+ * @description Updates submerchant details.
727
+ *
728
+ * @param id - Submerchant ID
729
+ * @param request - Update payload
730
+ * @returns Promise resolving to updated submerchant details
731
+ */
732
+ updateSubmerchant(id: string, request: SubmerchantUpdateDTO): Promise<GetSubmerchantResponse>;
733
+ /**
734
+ * Deletes a submerchant.
735
+ * Based on `delete_submerchant` from the Python SDK.
736
+ *
737
+ * @summary Delete submerchant
738
+ * @description Deletes a submerchant.
739
+ *
740
+ * @param id - Submerchant ID
741
+ * @returns Promise resolving to deletion status
742
+ */
743
+ deleteSubmerchant(id: string): Promise<unknown>;
744
+ /**
745
+ * Lists submerchants.
746
+ * Based on `list_submerchants` from the Python SDK.
747
+ *
748
+ * @summary List submerchants
749
+ * @description Retrieves a paginated list of submerchants.
750
+ *
751
+ * @param page - Page number
752
+ * @param perPage - Items per page
753
+ * @returns Promise resolving to list of submerchants
754
+ */
755
+ listSubmerchants(page?: number, perPage?: number): Promise<ListSubmerchantsResponse>;
756
+ /**
757
+ * Creates an organization user token.
758
+ * Based on `create_organization_user_token` from the Python SDK.
759
+ *
760
+ * @summary Create organization user token
761
+ * @description Creates a token for an organization user.
762
+ *
763
+ * @param request - Token creation payload
764
+ * @returns Promise resolving to the created token details
765
+ */
766
+ createOrganizationUserToken(request: OrgUserTokenCreateReq): Promise<OrgUserTokenCreateResponse>;
570
767
  }
571
768
  //# sourceMappingURL=TapsilatSDK.d.ts.map