@technance/technance-payment-sdk 1.0.3 → 1.0.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.
Files changed (50) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/dist/{ApiClient-CWwFZrLg.d.ts → ApiClient-YcAJEgtc.d.ts} +8 -8
  3. package/dist/ApiClient.d.ts +5 -4
  4. package/dist/Client.d.ts +5 -4
  5. package/dist/Client.js +1 -1
  6. package/dist/endpoints/Backoffice/Client.d.ts +5 -4
  7. package/dist/endpoints/Backoffice/index.d.ts +5 -4
  8. package/dist/endpoints/Backoffice/types.d.ts +3 -2
  9. package/dist/endpoints/Currencies/Client.d.ts +5 -4
  10. package/dist/endpoints/Currencies/index.d.ts +5 -4
  11. package/dist/endpoints/Networks/Client.d.ts +5 -4
  12. package/dist/endpoints/Networks/index.d.ts +5 -4
  13. package/dist/endpoints/Partners/Client.d.ts +5 -4
  14. package/dist/endpoints/Partners/index.d.ts +5 -4
  15. package/dist/endpoints/{Orders → WithdrawalOrders}/Client.d.ts +5 -4
  16. package/dist/endpoints/WithdrawalOrders/Client.js +1 -0
  17. package/dist/endpoints/{Orders → WithdrawalOrders}/index.d.ts +5 -4
  18. package/dist/endpoints/index.d.ts +10 -9
  19. package/dist/endpoints/index.js +1 -1
  20. package/dist/{index-CO0zNEaF.d.ts → index-6Az0wEqj.d.ts} +1 -1
  21. package/dist/{index-Dc3DD3A1.d.ts → index-QRwWK6Tg.d.ts} +1 -1
  22. package/dist/{index-Ddpq6m3Y.d.ts → index-RYmKHYSW.d.ts} +1 -1
  23. package/dist/{index-CghKRuMZ.d.ts → index-gxIgyrPZ.d.ts} +1 -1
  24. package/dist/{index-FMX04nfE.d.ts → index-n6Xc_D9h.d.ts} +1 -1
  25. package/dist/index.d.ts +11 -10
  26. package/dist/routing.d.ts +1 -1
  27. package/dist/routing.js +1 -1
  28. package/dist/types/Backoffice.d.ts +4 -3
  29. package/dist/types/Backoffice.js +1 -1
  30. package/dist/types/GetManyWithdrawalOrder.d.ts +13 -0
  31. package/dist/types/Partner.d.ts +1 -1
  32. package/dist/types/PlaceWithdrawalOrder.d.ts +13 -0
  33. package/dist/types/WithdrawalMeta.d.ts +12 -0
  34. package/dist/types/{Order.d.ts → WithdrawalOrder.d.ts} +4 -4
  35. package/dist/types/WithdrawalOrder.js +1 -0
  36. package/dist/types/{OrderResult.d.ts → WithdrawalOrderResult.d.ts} +4 -4
  37. package/dist/types/WithdrawalOrderResult.js +1 -0
  38. package/dist/types/index.d.ts +5 -3
  39. package/dist/types/index.js +1 -1
  40. package/dist/webhooks/index.d.ts +2 -2
  41. package/dist/webhooks/types.d.ts +3 -3
  42. package/package.json +6 -1
  43. package/dist/endpoints/Orders/Client.js +0 -1
  44. package/dist/endpoints/Orders/types.d.ts +0 -28
  45. package/dist/types/Order.js +0 -1
  46. package/dist/types/OrderRef.d.ts +0 -10
  47. /package/dist/endpoints/{Orders → WithdrawalOrders}/index.js +0 -0
  48. /package/dist/{endpoints/Orders/types.js → types/GetManyWithdrawalOrder.js} +0 -0
  49. /package/dist/types/{OrderRef.js → PlaceWithdrawalOrder.js} +0 -0
  50. /package/dist/types/{OrderResult.js → WithdrawalMeta.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,53 @@
1
1
  # @technance/technance-payment-sdk
2
2
 
3
+ ## 1.0.7
4
+
5
+ ### Patch Changes
6
+
7
+ - ee5cc63: Publish through npm trusted publishing (OIDC) and name the source repository in package metadata.
8
+
9
+ ## 1.0.6
10
+
11
+ ### Patch Changes
12
+
13
+ - 1aff83f:
14
+
15
+ ## 1.0.5
16
+
17
+ ### Patch Changes
18
+
19
+ - a8173df: Align SDK with backend API.
20
+
21
+ NOTE: this release contains breaking renames and signature changes. The
22
+ patch bump is intentional (per repo policy at release time) but is
23
+ semver-incorrect. Consumers MUST update at upgrade time.
24
+
25
+ Breaking:
26
+ - Renamed `client.orders` to `client.withdrawalOrders`. The methods
27
+ (`placeOrder`, `getMany`, `getOne`) are unchanged.
28
+ - Renamed type `Order` to `WithdrawalOrder` (and `Order.Status` to
29
+ `WithdrawalOrder.Status`).
30
+ - Renamed type `OrderResult` to `WithdrawalOrderResult` (used by
31
+ `withdrawal.completed` webhook payload). Field name `txHash` is
32
+ preserved to match the backend's webhook payload exactly.
33
+ - Removed `OrderRef` (was only used as the obsolete `placeOrder`
34
+ return type).
35
+ - Fixed `placeOrder` to match the live `POST /api/v1/payment/withdrawals`
36
+ contract: now accepts a single order body
37
+ (`{ address, currency, network, amount, usdAmount, refId?, owner? }`)
38
+ and returns a single `WithdrawalOrder` instead of `OrderRef[]`.
39
+ - Promoted `PlaceOrder.Payload` and `GetManyOrder.Query` from the
40
+ endpoint folder to top-level public types as `PlaceWithdrawalOrder`
41
+ and `GetManyWithdrawalOrder`.
42
+ - Updated `routing.orders` to `routing.withdrawalOrders` (paths
43
+ themselves are unchanged at `/api/v1/payment/withdrawals`).
44
+
45
+ Type tightenings:
46
+ - `Partner.name` is now `string | null` to match the backend entity.
47
+ - `BackofficeWithdrawal.meta` is now typed as `WithdrawalMeta | null`
48
+ (with `systemToUda` / `udaToDestination` shape) instead of the loose
49
+ `Record<string, unknown>`.
50
+
3
51
  ## 1.0.3
4
52
 
5
53
  ### Patch Changes
@@ -1,9 +1,9 @@
1
1
  import * as axios from 'axios';
2
2
  import { AxiosInstance } from 'axios';
3
- import { Order } from './types/Order.js';
4
- import { OrderRef } from './types/OrderRef.js';
3
+ import { WithdrawalOrder } from './types/WithdrawalOrder.js';
4
+ import { GetManyWithdrawalOrder } from './types/GetManyWithdrawalOrder.js';
5
5
  import { Pagination } from './types/Pagination.js';
6
- import { PlaceOrder, GetManyOrder } from './endpoints/Orders/types.js';
6
+ import { PlaceWithdrawalOrder } from './types/PlaceWithdrawalOrder.js';
7
7
  import { Balance } from './types/Balance.js';
8
8
  import { Partner } from './types/Partner.js';
9
9
  import { Currency } from './types/Currency.js';
@@ -14,9 +14,9 @@ import { GetManyWithdrawalOrders, GetManyWebhookDeliveries } from './endpoints/B
14
14
  declare class Client$4 {
15
15
  private readonly apiClient;
16
16
  constructor(apiClient: ApiClient);
17
- placeOrder(payload: PlaceOrder.Payload): Promise<axios.AxiosResponse<OrderRef[], any, {}>>;
18
- getMany(query?: GetManyOrder.Query): Promise<axios.AxiosResponse<Pagination<Order>, any, {}>>;
19
- getOne(id: string | number): Promise<axios.AxiosResponse<Order, any, {}>>;
17
+ placeOrder(payload: PlaceWithdrawalOrder.Payload): Promise<axios.AxiosResponse<WithdrawalOrder, any, {}>>;
18
+ getMany(query?: GetManyWithdrawalOrder.Query): Promise<axios.AxiosResponse<Pagination<WithdrawalOrder>, any, {}>>;
19
+ getOne(id: string | number): Promise<axios.AxiosResponse<WithdrawalOrder, any, {}>>;
20
20
  }
21
21
 
22
22
  declare class Client$3 {
@@ -57,7 +57,7 @@ interface ClientParams {
57
57
  }
58
58
  declare function createClient({ baseUrl, apiKey, backofficeApiKey }: ClientParams): {
59
59
  api: axios.AxiosInstance;
60
- orders: Client$4;
60
+ withdrawalOrders: Client$4;
61
61
  partners: Client$3;
62
62
  currencies: Client$2;
63
63
  networks: Client$1;
@@ -67,4 +67,4 @@ declare function createClient({ baseUrl, apiKey, backofficeApiKey }: ClientParam
67
67
  type ApiClient = AxiosInstance;
68
68
  declare function createApiClient({ baseUrl, apiKey, backofficeApiKey }: ClientParams): AxiosInstance;
69
69
 
70
- export { type ApiClient as A, Client as C, Client$2 as a, Client$4 as b, Client$3 as c, Client$1 as d, type ClientParams as e, createApiClient as f, createClient as g };
70
+ export { type ApiClient as A, Client as C, Client$2 as a, Client$1 as b, Client$3 as c, Client$4 as d, type ClientParams as e, createApiClient as f, createClient as g };
@@ -1,13 +1,14 @@
1
1
  import 'axios';
2
- export { A as ApiClient, f as createApiClient } from './ApiClient-CWwFZrLg.js';
3
- import './types/Order.js';
4
- import './types/OrderRef.js';
2
+ export { A as ApiClient, f as createApiClient } from './ApiClient-YcAJEgtc.js';
3
+ import './types/WithdrawalOrder.js';
4
+ import './types/GetManyWithdrawalOrder.js';
5
5
  import './types/Pagination.js';
6
- import './endpoints/Orders/types.js';
6
+ import './types/PlaceWithdrawalOrder.js';
7
7
  import './types/Balance.js';
8
8
  import './types/Partner.js';
9
9
  import './types/Currency.js';
10
10
  import './types/CurrencyRef.js';
11
11
  import './types/Network.js';
12
12
  import './types/Backoffice.js';
13
+ import './types/WithdrawalMeta.js';
13
14
  import './endpoints/Backoffice/types.js';
package/dist/Client.d.ts CHANGED
@@ -1,13 +1,14 @@
1
1
  import 'axios';
2
- export { e as ClientParams, g as createClient } from './ApiClient-CWwFZrLg.js';
3
- import './types/Order.js';
4
- import './types/OrderRef.js';
2
+ export { e as ClientParams, g as createClient } from './ApiClient-YcAJEgtc.js';
3
+ import './types/WithdrawalOrder.js';
4
+ import './types/GetManyWithdrawalOrder.js';
5
5
  import './types/Pagination.js';
6
- import './endpoints/Orders/types.js';
6
+ import './types/PlaceWithdrawalOrder.js';
7
7
  import './types/Balance.js';
8
8
  import './types/Partner.js';
9
9
  import './types/Currency.js';
10
10
  import './types/CurrencyRef.js';
11
11
  import './types/Network.js';
12
12
  import './types/Backoffice.js';
13
+ import './types/WithdrawalMeta.js';
13
14
  import './endpoints/Backoffice/types.js';
package/dist/Client.js CHANGED
@@ -1 +1 @@
1
- 'use strict';var ApiClient=require('./ApiClient'),endpoints=require('./endpoints');var f=Object.defineProperty;var i=Object.getOwnPropertySymbols;var l=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable;var c=(r,e,n)=>e in r?f(r,e,{enumerable:true,configurable:true,writable:true,value:n}):r[e]=n,o=(r,e)=>{for(var n in e||(e={}))l.call(e,n)&&c(r,n,e[n]);if(i)for(var n of i(e))p.call(e,n)&&c(r,n,e[n]);return r};function x({baseUrl:r,apiKey:e,backofficeApiKey:n}){const t=ApiClient.createApiClient({baseUrl:r,apiKey:e}),a=ApiClient.createApiClient(o({baseUrl:r,apiKey:e},n?{backofficeApiKey:n}:{})),C=new endpoints.Backoffice.Client(a);return {api:t,orders:new endpoints.Orders.Client(t),partners:new endpoints.Partners.Client(t),currencies:new endpoints.Currencies.Client(t),networks:new endpoints.Networks.Client(t),backoffice:C}}exports.createClient=x;
1
+ 'use strict';var ApiClient=require('./ApiClient'),endpoints=require('./endpoints');var C=Object.defineProperty;var i=Object.getOwnPropertySymbols;var f=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var a=(r,e,n)=>e in r?C(r,e,{enumerable:true,configurable:true,writable:true,value:n}):r[e]=n,c=(r,e)=>{for(var n in e||(e={}))f.call(e,n)&&a(r,n,e[n]);if(i)for(var n of i(e))w.call(e,n)&&a(r,n,e[n]);return r};function h({baseUrl:r,apiKey:e,backofficeApiKey:n}){const t=ApiClient.createApiClient({baseUrl:r,apiKey:e}),o=ApiClient.createApiClient(c({baseUrl:r,apiKey:e},n?{backofficeApiKey:n}:{})),l=new endpoints.Backoffice.Client(o);return {api:t,withdrawalOrders:new endpoints.WithdrawalOrders.Client(t),partners:new endpoints.Partners.Client(t),currencies:new endpoints.Currencies.Client(t),networks:new endpoints.Networks.Client(t),backoffice:l}}exports.createClient=h;
@@ -1,13 +1,14 @@
1
1
  import 'axios';
2
- export { C as Client } from '../../ApiClient-CWwFZrLg.js';
2
+ export { C as Client } from '../../ApiClient-YcAJEgtc.js';
3
3
  import '../../types/Backoffice.js';
4
4
  import '../../types/Pagination.js';
5
5
  import './types.js';
6
- import '../../types/Order.js';
7
- import '../../types/OrderRef.js';
8
- import '../Orders/types.js';
6
+ import '../../types/WithdrawalOrder.js';
7
+ import '../../types/GetManyWithdrawalOrder.js';
8
+ import '../../types/PlaceWithdrawalOrder.js';
9
9
  import '../../types/Balance.js';
10
10
  import '../../types/Partner.js';
11
11
  import '../../types/Currency.js';
12
12
  import '../../types/CurrencyRef.js';
13
13
  import '../../types/Network.js';
14
+ import '../../types/WithdrawalMeta.js';
@@ -1,13 +1,14 @@
1
- export { C as Client } from '../../ApiClient-CWwFZrLg.js';
1
+ export { C as Client } from '../../ApiClient-YcAJEgtc.js';
2
2
  export { GetManyWebhookDeliveries, GetManyWithdrawalOrders } from './types.js';
3
3
  import 'axios';
4
- import '../../types/Order.js';
5
- import '../../types/OrderRef.js';
4
+ import '../../types/WithdrawalOrder.js';
5
+ import '../../types/GetManyWithdrawalOrder.js';
6
6
  import '../../types/Pagination.js';
7
- import '../Orders/types.js';
7
+ import '../../types/PlaceWithdrawalOrder.js';
8
8
  import '../../types/Balance.js';
9
9
  import '../../types/Partner.js';
10
10
  import '../../types/Currency.js';
11
11
  import '../../types/CurrencyRef.js';
12
12
  import '../../types/Network.js';
13
13
  import '../../types/Backoffice.js';
14
+ import '../../types/WithdrawalMeta.js';
@@ -1,12 +1,13 @@
1
1
  import { BackofficeWebhookEvent, BackofficeWebhookDeliveryStatus } from '../../types/Backoffice.js';
2
- import { Order } from '../../types/Order.js';
2
+ import { WithdrawalOrder } from '../../types/WithdrawalOrder.js';
3
+ import '../../types/WithdrawalMeta.js';
3
4
 
4
5
  declare namespace GetManyWithdrawalOrders {
5
6
  type Query = {
6
7
  limit?: number;
7
8
  page?: number;
8
9
  all?: boolean;
9
- status?: Order.Status;
10
+ status?: WithdrawalOrder.Status;
10
11
  refId?: string;
11
12
  owner?: string;
12
13
  partnerId?: number;
@@ -1,13 +1,14 @@
1
1
  import 'axios';
2
- export { a as Client } from '../../ApiClient-CWwFZrLg.js';
2
+ export { a as Client } from '../../ApiClient-YcAJEgtc.js';
3
3
  import '../../types/Currency.js';
4
- import '../../types/Order.js';
5
- import '../../types/OrderRef.js';
4
+ import '../../types/WithdrawalOrder.js';
5
+ import '../../types/GetManyWithdrawalOrder.js';
6
6
  import '../../types/Pagination.js';
7
- import '../Orders/types.js';
7
+ import '../../types/PlaceWithdrawalOrder.js';
8
8
  import '../../types/Balance.js';
9
9
  import '../../types/Partner.js';
10
10
  import '../../types/Network.js';
11
11
  import '../../types/CurrencyRef.js';
12
12
  import '../../types/Backoffice.js';
13
+ import '../../types/WithdrawalMeta.js';
13
14
  import '../Backoffice/types.js';
@@ -1,13 +1,14 @@
1
- export { a as Client } from '../../ApiClient-CWwFZrLg.js';
1
+ export { a as Client } from '../../ApiClient-YcAJEgtc.js';
2
2
  import 'axios';
3
- import '../../types/Order.js';
4
- import '../../types/OrderRef.js';
3
+ import '../../types/WithdrawalOrder.js';
4
+ import '../../types/GetManyWithdrawalOrder.js';
5
5
  import '../../types/Pagination.js';
6
- import '../Orders/types.js';
6
+ import '../../types/PlaceWithdrawalOrder.js';
7
7
  import '../../types/Balance.js';
8
8
  import '../../types/Partner.js';
9
9
  import '../../types/Currency.js';
10
10
  import '../../types/CurrencyRef.js';
11
11
  import '../../types/Network.js';
12
12
  import '../../types/Backoffice.js';
13
+ import '../../types/WithdrawalMeta.js';
13
14
  import '../Backoffice/types.js';
@@ -1,13 +1,14 @@
1
1
  import 'axios';
2
- export { d as Client } from '../../ApiClient-CWwFZrLg.js';
2
+ export { b as Client } from '../../ApiClient-YcAJEgtc.js';
3
3
  import '../../types/Network.js';
4
- import '../../types/Order.js';
5
- import '../../types/OrderRef.js';
4
+ import '../../types/WithdrawalOrder.js';
5
+ import '../../types/GetManyWithdrawalOrder.js';
6
6
  import '../../types/Pagination.js';
7
- import '../Orders/types.js';
7
+ import '../../types/PlaceWithdrawalOrder.js';
8
8
  import '../../types/Balance.js';
9
9
  import '../../types/Partner.js';
10
10
  import '../../types/Currency.js';
11
11
  import '../../types/CurrencyRef.js';
12
12
  import '../../types/Backoffice.js';
13
+ import '../../types/WithdrawalMeta.js';
13
14
  import '../Backoffice/types.js';
@@ -1,13 +1,14 @@
1
- export { d as Client } from '../../ApiClient-CWwFZrLg.js';
1
+ export { b as Client } from '../../ApiClient-YcAJEgtc.js';
2
2
  import 'axios';
3
- import '../../types/Order.js';
4
- import '../../types/OrderRef.js';
3
+ import '../../types/WithdrawalOrder.js';
4
+ import '../../types/GetManyWithdrawalOrder.js';
5
5
  import '../../types/Pagination.js';
6
- import '../Orders/types.js';
6
+ import '../../types/PlaceWithdrawalOrder.js';
7
7
  import '../../types/Balance.js';
8
8
  import '../../types/Partner.js';
9
9
  import '../../types/Currency.js';
10
10
  import '../../types/CurrencyRef.js';
11
11
  import '../../types/Network.js';
12
12
  import '../../types/Backoffice.js';
13
+ import '../../types/WithdrawalMeta.js';
13
14
  import '../Backoffice/types.js';
@@ -1,13 +1,14 @@
1
1
  import 'axios';
2
- export { c as Client } from '../../ApiClient-CWwFZrLg.js';
2
+ export { c as Client } from '../../ApiClient-YcAJEgtc.js';
3
3
  import '../../types/Balance.js';
4
4
  import '../../types/Partner.js';
5
- import '../../types/Order.js';
6
- import '../../types/OrderRef.js';
5
+ import '../../types/WithdrawalOrder.js';
6
+ import '../../types/GetManyWithdrawalOrder.js';
7
7
  import '../../types/Pagination.js';
8
- import '../Orders/types.js';
8
+ import '../../types/PlaceWithdrawalOrder.js';
9
9
  import '../../types/Currency.js';
10
10
  import '../../types/CurrencyRef.js';
11
11
  import '../../types/Network.js';
12
12
  import '../../types/Backoffice.js';
13
+ import '../../types/WithdrawalMeta.js';
13
14
  import '../Backoffice/types.js';
@@ -1,13 +1,14 @@
1
- export { c as Client } from '../../ApiClient-CWwFZrLg.js';
1
+ export { c as Client } from '../../ApiClient-YcAJEgtc.js';
2
2
  import 'axios';
3
- import '../../types/Order.js';
4
- import '../../types/OrderRef.js';
3
+ import '../../types/WithdrawalOrder.js';
4
+ import '../../types/GetManyWithdrawalOrder.js';
5
5
  import '../../types/Pagination.js';
6
- import '../Orders/types.js';
6
+ import '../../types/PlaceWithdrawalOrder.js';
7
7
  import '../../types/Balance.js';
8
8
  import '../../types/Partner.js';
9
9
  import '../../types/Currency.js';
10
10
  import '../../types/CurrencyRef.js';
11
11
  import '../../types/Network.js';
12
12
  import '../../types/Backoffice.js';
13
+ import '../../types/WithdrawalMeta.js';
13
14
  import '../Backoffice/types.js';
@@ -1,13 +1,14 @@
1
1
  import 'axios';
2
- export { b as Client } from '../../ApiClient-CWwFZrLg.js';
3
- import '../../types/Order.js';
4
- import '../../types/OrderRef.js';
2
+ export { d as Client } from '../../ApiClient-YcAJEgtc.js';
3
+ import '../../types/WithdrawalOrder.js';
4
+ import '../../types/GetManyWithdrawalOrder.js';
5
5
  import '../../types/Pagination.js';
6
- import './types.js';
6
+ import '../../types/PlaceWithdrawalOrder.js';
7
7
  import '../../types/Balance.js';
8
8
  import '../../types/Partner.js';
9
9
  import '../../types/Currency.js';
10
10
  import '../../types/CurrencyRef.js';
11
11
  import '../../types/Network.js';
12
12
  import '../../types/Backoffice.js';
13
+ import '../../types/WithdrawalMeta.js';
13
14
  import '../Backoffice/types.js';
@@ -0,0 +1 @@
1
+ 'use strict';var routing=require('../../routing');class n{constructor(r){this.apiClient=r;}placeOrder(r){const t=routing.routing.withdrawalOrders.placeOrder;return this.apiClient.post(t,r)}getMany(r){const t=routing.routing.withdrawalOrders.getMany;return this.apiClient.get(t,{params:r})}getOne(r){const t=routing.routing.withdrawalOrders.getOne(r);return this.apiClient.get(t)}}exports.Client=n;
@@ -1,13 +1,14 @@
1
- export { b as Client } from '../../ApiClient-CWwFZrLg.js';
1
+ export { d as Client } from '../../ApiClient-YcAJEgtc.js';
2
2
  import 'axios';
3
- import '../../types/Order.js';
4
- import '../../types/OrderRef.js';
3
+ import '../../types/WithdrawalOrder.js';
4
+ import '../../types/GetManyWithdrawalOrder.js';
5
5
  import '../../types/Pagination.js';
6
- import './types.js';
6
+ import '../../types/PlaceWithdrawalOrder.js';
7
7
  import '../../types/Balance.js';
8
8
  import '../../types/Partner.js';
9
9
  import '../../types/Currency.js';
10
10
  import '../../types/CurrencyRef.js';
11
11
  import '../../types/Network.js';
12
12
  import '../../types/Backoffice.js';
13
+ import '../../types/WithdrawalMeta.js';
13
14
  import '../Backoffice/types.js';
@@ -1,18 +1,19 @@
1
- export { i as Orders } from '../index-CO0zNEaF.js';
2
- export { i as Partners } from '../index-FMX04nfE.js';
3
- export { i as Currencies } from '../index-Ddpq6m3Y.js';
4
- export { i as Networks } from '../index-Dc3DD3A1.js';
5
- export { i as Backoffice } from '../index-CghKRuMZ.js';
6
- import '../ApiClient-CWwFZrLg.js';
1
+ export { i as WithdrawalOrders } from '../index-6Az0wEqj.js';
2
+ export { i as Partners } from '../index-n6Xc_D9h.js';
3
+ export { i as Currencies } from '../index-RYmKHYSW.js';
4
+ export { i as Networks } from '../index-QRwWK6Tg.js';
5
+ export { i as Backoffice } from '../index-gxIgyrPZ.js';
6
+ import '../ApiClient-YcAJEgtc.js';
7
7
  import 'axios';
8
- import '../types/Order.js';
9
- import '../types/OrderRef.js';
8
+ import '../types/WithdrawalOrder.js';
9
+ import '../types/GetManyWithdrawalOrder.js';
10
10
  import '../types/Pagination.js';
11
- import './Orders/types.js';
11
+ import '../types/PlaceWithdrawalOrder.js';
12
12
  import '../types/Balance.js';
13
13
  import '../types/Partner.js';
14
14
  import '../types/Currency.js';
15
15
  import '../types/CurrencyRef.js';
16
16
  import '../types/Network.js';
17
17
  import '../types/Backoffice.js';
18
+ import '../types/WithdrawalMeta.js';
18
19
  import './Backoffice/types.js';
@@ -1 +1 @@
1
- 'use strict';var Orders=require('./Orders'),Partners=require('./Partners'),Currencies=require('./Currencies'),Networks=require('./Networks'),Backoffice=require('./Backoffice');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var Orders__namespace=/*#__PURE__*/_interopNamespace(Orders);var Partners__namespace=/*#__PURE__*/_interopNamespace(Partners);var Currencies__namespace=/*#__PURE__*/_interopNamespace(Currencies);var Networks__namespace=/*#__PURE__*/_interopNamespace(Networks);var Backoffice__namespace=/*#__PURE__*/_interopNamespace(Backoffice);exports.Orders=Orders__namespace;exports.Partners=Partners__namespace;exports.Currencies=Currencies__namespace;exports.Networks=Networks__namespace;exports.Backoffice=Backoffice__namespace;
1
+ 'use strict';var WithdrawalOrders=require('./WithdrawalOrders'),Partners=require('./Partners'),Currencies=require('./Currencies'),Networks=require('./Networks'),Backoffice=require('./Backoffice');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var WithdrawalOrders__namespace=/*#__PURE__*/_interopNamespace(WithdrawalOrders);var Partners__namespace=/*#__PURE__*/_interopNamespace(Partners);var Currencies__namespace=/*#__PURE__*/_interopNamespace(Currencies);var Networks__namespace=/*#__PURE__*/_interopNamespace(Networks);var Backoffice__namespace=/*#__PURE__*/_interopNamespace(Backoffice);exports.WithdrawalOrders=WithdrawalOrders__namespace;exports.Partners=Partners__namespace;exports.Currencies=Currencies__namespace;exports.Networks=Networks__namespace;exports.Backoffice=Backoffice__namespace;
@@ -1,4 +1,4 @@
1
- import { b as Client } from './ApiClient-CWwFZrLg.js';
1
+ import { d as Client } from './ApiClient-YcAJEgtc.js';
2
2
 
3
3
  declare const index_Client: typeof Client;
4
4
  declare namespace index {
@@ -1,4 +1,4 @@
1
- import { d as Client } from './ApiClient-CWwFZrLg.js';
1
+ import { b as Client } from './ApiClient-YcAJEgtc.js';
2
2
 
3
3
  declare const index_Client: typeof Client;
4
4
  declare namespace index {
@@ -1,4 +1,4 @@
1
- import { a as Client } from './ApiClient-CWwFZrLg.js';
1
+ import { a as Client } from './ApiClient-YcAJEgtc.js';
2
2
 
3
3
  declare const index_Client: typeof Client;
4
4
  declare namespace index {
@@ -1,4 +1,4 @@
1
- import { C as Client } from './ApiClient-CWwFZrLg.js';
1
+ import { C as Client } from './ApiClient-YcAJEgtc.js';
2
2
  import { GetManyWebhookDeliveries, GetManyWithdrawalOrders } from './endpoints/Backoffice/types.js';
3
3
 
4
4
  declare const index_Client: typeof Client;
@@ -1,4 +1,4 @@
1
- import { c as Client } from './ApiClient-CWwFZrLg.js';
1
+ import { c as Client } from './ApiClient-YcAJEgtc.js';
2
2
 
3
3
  declare const index_Client: typeof Client;
4
4
  declare namespace index {
package/dist/index.d.ts CHANGED
@@ -1,21 +1,22 @@
1
- export { A as ApiClient, e as ClientParams, g as createClient } from './ApiClient-CWwFZrLg.js';
1
+ export { A as ApiClient, e as ClientParams, g as createClient } from './ApiClient-YcAJEgtc.js';
2
2
  export { TechnancePaymentWebhookValidationFailure, TechnancePaymentWebhookValidationFailureResult, TechnancePaymentWebhookValidationOutcome, TechnancePaymentWebhookValidationResult, ValidateTechnancePaymentWebhookParams, validateTechnancePaymentWebhook } from './webhooks/validator.js';
3
- export { i as Orders } from './index-CO0zNEaF.js';
4
- export { i as Partners } from './index-FMX04nfE.js';
5
- export { i as Currencies } from './index-Ddpq6m3Y.js';
6
- export { i as Networks } from './index-Dc3DD3A1.js';
7
- export { i as Backoffice } from './index-CghKRuMZ.js';
3
+ export { i as WithdrawalOrders } from './index-6Az0wEqj.js';
4
+ export { i as Partners } from './index-n6Xc_D9h.js';
5
+ export { i as Currencies } from './index-RYmKHYSW.js';
6
+ export { i as Networks } from './index-QRwWK6Tg.js';
7
+ export { i as Backoffice } from './index-gxIgyrPZ.js';
8
8
  export { Balance } from './types/Balance.js';
9
9
  export { BackofficePaymentProvider, BackofficeWebhookDelivery, BackofficeWebhookDeliveryStatus, BackofficeWebhookEvent, BackofficeWithdrawal, BackofficeWithdrawalOrder, BackofficeWithdrawalOrderDetail, BackofficeWithdrawalStatus, VaultBalance } from './types/Backoffice.js';
10
10
  export { Currency } from './types/Currency.js';
11
11
  export { CurrencyRef } from './types/CurrencyRef.js';
12
+ export { GetManyWithdrawalOrder } from './types/GetManyWithdrawalOrder.js';
12
13
  export { Network } from './types/Network.js';
13
- export { Order } from './types/Order.js';
14
- export { OrderRef } from './types/OrderRef.js';
15
14
  export { Pagination } from './types/Pagination.js';
16
15
  export { Partner } from './types/Partner.js';
17
- export { OrderResult } from './types/OrderResult.js';
16
+ export { PlaceWithdrawalOrder } from './types/PlaceWithdrawalOrder.js';
17
+ export { WithdrawalMeta } from './types/WithdrawalMeta.js';
18
+ export { WithdrawalOrder } from './types/WithdrawalOrder.js';
19
+ export { WithdrawalOrderResult } from './types/WithdrawalOrderResult.js';
18
20
  export { TechnancePaymentWebhookEvent, TechnancePaymentWebhookEventBase, TechnancePaymentWebhookEventByType, TechnancePaymentWebhookEventType } from './webhooks/types.js';
19
21
  import 'axios';
20
- import './endpoints/Orders/types.js';
21
22
  import './endpoints/Backoffice/types.js';
package/dist/routing.d.ts CHANGED
@@ -3,7 +3,7 @@ declare const routing: {
3
3
  me: string;
4
4
  balances: string;
5
5
  };
6
- orders: {
6
+ withdrawalOrders: {
7
7
  placeOrder: string;
8
8
  getMany: string;
9
9
  getOne: (orderId: string | number) => string;
package/dist/routing.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a={partners:{me:"/api/v1/partners",balances:"/api/v1/partner/balances"},orders:{placeOrder:"/api/v1/payment/withdrawals",getMany:"/api/v1/payment/withdrawals",getOne:e=>`/api/v1/payment/withdrawals/${encodeURIComponent(String(e))}`},currencies:{getAll:"/api/v1/currencies",getOne:e=>`/api/v1/currencies/${encodeURIComponent(String(e))}`},networks:{getAll:"/api/v1/networks",getOne:e=>`/api/v1/networks/${encodeURIComponent(String(e))}`},backoffice:{withdrawals:{getMany:"/api/v1/backoffice/withdrawals",getOne:e=>`/api/v1/backoffice/withdrawals/${encodeURIComponent(String(e))}`},vault:{balances:"/api/v1/backoffice/vault/balances"},webhooks:{getMany:"/api/v1/backoffice/webhooks",retry:e=>`/api/v1/backoffice/webhooks/${encodeURIComponent(String(e))}/retry`}}};exports.routing=a;
1
+ 'use strict';const a={partners:{me:"/api/v1/partners",balances:"/api/v1/partner/balances"},withdrawalOrders:{placeOrder:"/api/v1/payment/withdrawals",getMany:"/api/v1/payment/withdrawals",getOne:e=>`/api/v1/payment/withdrawals/${encodeURIComponent(String(e))}`},currencies:{getAll:"/api/v1/currencies",getOne:e=>`/api/v1/currencies/${encodeURIComponent(String(e))}`},networks:{getAll:"/api/v1/networks",getOne:e=>`/api/v1/networks/${encodeURIComponent(String(e))}`},backoffice:{withdrawals:{getMany:"/api/v1/backoffice/withdrawals",getOne:e=>`/api/v1/backoffice/withdrawals/${encodeURIComponent(String(e))}`},vault:{balances:"/api/v1/backoffice/vault/balances"},webhooks:{getMany:"/api/v1/backoffice/webhooks",retry:e=>`/api/v1/backoffice/webhooks/${encodeURIComponent(String(e))}/retry`}}};exports.routing=a;
@@ -1,4 +1,5 @@
1
- import { Order } from './Order.js';
1
+ import { WithdrawalMeta } from './WithdrawalMeta.js';
2
+ import { WithdrawalOrder } from './WithdrawalOrder.js';
2
3
 
3
4
  declare enum BackofficePaymentProvider {
4
5
  SELF_HOSTED = "self-hosted",
@@ -25,7 +26,7 @@ type BackofficeWithdrawalOrder = {
25
26
  id: number;
26
27
  partnerId: number;
27
28
  partnerName: string | null;
28
- status: Order.Status;
29
+ status: WithdrawalOrder.Status;
29
30
  destinationAddress: string;
30
31
  owner: string | null;
31
32
  amount: string;
@@ -57,7 +58,7 @@ type BackofficeWithdrawal = {
57
58
  retryCount: number;
58
59
  nextRetryAt: Date | null;
59
60
  lastError: string | null;
60
- meta: Record<string, unknown> | null;
61
+ meta: WithdrawalMeta | null;
61
62
  createdAt: Date;
62
63
  updatedAt: Date;
63
64
  };
@@ -1 +1 @@
1
- 'use strict';var l=(n=>(n.SELF_HOSTED="self-hosted",n.STRIDGE_UDA="stridge-uda",n))(l||{}),s=(t=>(t.CREATED="created",t.PROCESSING="processing",t.RETRY="retry",t.FINISHED="finished",t.FAILED="failed",t.REJECTED="rejected",t))(s||{}),a=(e=>(e.PENDING="pending",e.SUCCESS="success",e.FAILED="failed",e.FAILED_PERMANENT="failed-permanent",e))(a||{}),i=(r=>(r.WITHDRAWAL_COMPLETED="withdrawal.completed",r))(i||{});exports.BackofficePaymentProvider=l;exports.BackofficeWebhookDeliveryStatus=a;exports.BackofficeWebhookEvent=i;exports.BackofficeWithdrawalStatus=s;
1
+ 'use strict';var a=(e=>(e.SELF_HOSTED="self-hosted",e.STRIDGE_UDA="stridge-uda",e))(a||{}),l=(t=>(t.CREATED="created",t.PROCESSING="processing",t.RETRY="retry",t.FINISHED="finished",t.FAILED="failed",t.REJECTED="rejected",t))(l||{}),i=(r=>(r.PENDING="pending",r.SUCCESS="success",r.FAILED="failed",r.FAILED_PERMANENT="failed-permanent",r))(i||{}),s=(n=>(n.WITHDRAWAL_COMPLETED="withdrawal.completed",n))(s||{});exports.BackofficePaymentProvider=a;exports.BackofficeWebhookDeliveryStatus=i;exports.BackofficeWebhookEvent=s;exports.BackofficeWithdrawalStatus=l;
@@ -0,0 +1,13 @@
1
+ import { WithdrawalOrder } from './WithdrawalOrder.js';
2
+
3
+ declare namespace GetManyWithdrawalOrder {
4
+ type Query = {
5
+ limit?: number;
6
+ page?: number;
7
+ all?: boolean;
8
+ status?: WithdrawalOrder.Status;
9
+ refId?: string;
10
+ };
11
+ }
12
+
13
+ export { GetManyWithdrawalOrder };
@@ -1,6 +1,6 @@
1
1
  type Partner = {
2
2
  id: number;
3
- name: string;
3
+ name: string | null;
4
4
  status: Partner.Status;
5
5
  createdAt: Date;
6
6
  updatedAt: Date;
@@ -0,0 +1,13 @@
1
+ declare namespace PlaceWithdrawalOrder {
2
+ type Payload = {
3
+ address: string;
4
+ currency: string;
5
+ network: string;
6
+ amount: string;
7
+ usdAmount: string;
8
+ refId?: string;
9
+ owner?: string;
10
+ };
11
+ }
12
+
13
+ export { PlaceWithdrawalOrder };
@@ -0,0 +1,12 @@
1
+ type WithdrawalMeta = {
2
+ systemToUda?: WithdrawalMeta.TransactionMeta;
3
+ udaToDestination?: WithdrawalMeta.TransactionMeta;
4
+ };
5
+ declare namespace WithdrawalMeta {
6
+ type TransactionMeta = {
7
+ transactionHash: string;
8
+ raw?: Record<string, unknown>;
9
+ };
10
+ }
11
+
12
+ export { WithdrawalMeta };
@@ -1,6 +1,6 @@
1
- type Order = {
1
+ type WithdrawalOrder = {
2
2
  id: number;
3
- status: Order.Status;
3
+ status: WithdrawalOrder.Status;
4
4
  destinationAddress: string;
5
5
  owner: string | null;
6
6
  amount: string;
@@ -13,7 +13,7 @@ type Order = {
13
13
  refId: string | null;
14
14
  verifiedAt: Date | null;
15
15
  };
16
- declare namespace Order {
16
+ declare namespace WithdrawalOrder {
17
17
  enum Status {
18
18
  CREATED = "created",
19
19
  PENDING = "pending",
@@ -25,4 +25,4 @@ declare namespace Order {
25
25
  }
26
26
  }
27
27
 
28
- export { Order };
28
+ export { WithdrawalOrder };
@@ -0,0 +1 @@
1
+ 'use strict';exports.WithdrawalOrder=void 0;(e=>{(n=>(n.CREATED="created",n.PENDING="pending",n.PROCESSING="processing",n.SENDING="sending",n.FINISHED="finished",n.FAILED="failed",n.REJECTED="rejected"))(e.Status||(e.Status={}));})(exports.WithdrawalOrder||(exports.WithdrawalOrder={}));
@@ -1,8 +1,8 @@
1
- import { Order } from './Order.js';
1
+ import { WithdrawalOrder } from './WithdrawalOrder.js';
2
2
 
3
- type OrderResult = {
3
+ type WithdrawalOrderResult = {
4
4
  id: number;
5
- status: Order.Status;
5
+ status: WithdrawalOrder.Status;
6
6
  destinationAddress: string;
7
7
  amount: string;
8
8
  usdAmount: string;
@@ -14,4 +14,4 @@ type OrderResult = {
14
14
  verifiedAt: Date | null;
15
15
  };
16
16
 
17
- export type { OrderResult };
17
+ export type { WithdrawalOrderResult };
@@ -0,0 +1 @@
1
+ 'use strict';
@@ -2,9 +2,11 @@ export { Balance } from './Balance.js';
2
2
  export { BackofficePaymentProvider, BackofficeWebhookDelivery, BackofficeWebhookDeliveryStatus, BackofficeWebhookEvent, BackofficeWithdrawal, BackofficeWithdrawalOrder, BackofficeWithdrawalOrderDetail, BackofficeWithdrawalStatus, VaultBalance } from './Backoffice.js';
3
3
  export { Currency } from './Currency.js';
4
4
  export { CurrencyRef } from './CurrencyRef.js';
5
+ export { GetManyWithdrawalOrder } from './GetManyWithdrawalOrder.js';
5
6
  export { Network } from './Network.js';
6
- export { Order } from './Order.js';
7
- export { OrderRef } from './OrderRef.js';
8
7
  export { Pagination } from './Pagination.js';
9
8
  export { Partner } from './Partner.js';
10
- export { OrderResult } from './OrderResult.js';
9
+ export { PlaceWithdrawalOrder } from './PlaceWithdrawalOrder.js';
10
+ export { WithdrawalMeta } from './WithdrawalMeta.js';
11
+ export { WithdrawalOrder } from './WithdrawalOrder.js';
12
+ export { WithdrawalOrderResult } from './WithdrawalOrderResult.js';
@@ -1 +1 @@
1
- 'use strict';var Balance=require('./Balance'),Backoffice=require('./Backoffice'),Currency=require('./Currency'),CurrencyRef=require('./CurrencyRef'),Network=require('./Network'),Order=require('./Order'),OrderRef=require('./OrderRef'),Pagination=require('./Pagination'),Partner=require('./Partner'),OrderResult=require('./OrderResult');Object.keys(Balance).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return Balance[k]}})});Object.keys(Backoffice).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return Backoffice[k]}})});Object.keys(Currency).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return Currency[k]}})});Object.keys(CurrencyRef).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return CurrencyRef[k]}})});Object.keys(Network).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return Network[k]}})});Object.keys(Order).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return Order[k]}})});Object.keys(OrderRef).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return OrderRef[k]}})});Object.keys(Pagination).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return Pagination[k]}})});Object.keys(Partner).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return Partner[k]}})});Object.keys(OrderResult).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return OrderResult[k]}})});
1
+ 'use strict';var Balance=require('./Balance'),Backoffice=require('./Backoffice'),Currency=require('./Currency'),CurrencyRef=require('./CurrencyRef'),GetManyWithdrawalOrder=require('./GetManyWithdrawalOrder'),Network=require('./Network'),Pagination=require('./Pagination'),Partner=require('./Partner'),PlaceWithdrawalOrder=require('./PlaceWithdrawalOrder'),WithdrawalMeta=require('./WithdrawalMeta'),WithdrawalOrder=require('./WithdrawalOrder'),WithdrawalOrderResult=require('./WithdrawalOrderResult');Object.keys(Balance).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return Balance[k]}})});Object.keys(Backoffice).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return Backoffice[k]}})});Object.keys(Currency).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return Currency[k]}})});Object.keys(CurrencyRef).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return CurrencyRef[k]}})});Object.keys(GetManyWithdrawalOrder).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return GetManyWithdrawalOrder[k]}})});Object.keys(Network).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return Network[k]}})});Object.keys(Pagination).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return Pagination[k]}})});Object.keys(Partner).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return Partner[k]}})});Object.keys(PlaceWithdrawalOrder).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return PlaceWithdrawalOrder[k]}})});Object.keys(WithdrawalMeta).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return WithdrawalMeta[k]}})});Object.keys(WithdrawalOrder).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return WithdrawalOrder[k]}})});Object.keys(WithdrawalOrderResult).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return WithdrawalOrderResult[k]}})});
@@ -1,4 +1,4 @@
1
1
  export { TechnancePaymentWebhookEvent, TechnancePaymentWebhookEventBase, TechnancePaymentWebhookEventByType, TechnancePaymentWebhookEventType } from './types.js';
2
2
  export { TechnancePaymentWebhookValidationFailure, TechnancePaymentWebhookValidationFailureResult, TechnancePaymentWebhookValidationOutcome, TechnancePaymentWebhookValidationResult, ValidateTechnancePaymentWebhookParams, validateTechnancePaymentWebhook } from './validator.js';
3
- import '../types/OrderResult.js';
4
- import '../types/Order.js';
3
+ import '../types/WithdrawalOrderResult.js';
4
+ import '../types/WithdrawalOrder.js';
@@ -1,5 +1,5 @@
1
- import { OrderResult } from '../types/OrderResult.js';
2
- import '../types/Order.js';
1
+ import { WithdrawalOrderResult } from '../types/WithdrawalOrderResult.js';
2
+ import '../types/WithdrawalOrder.js';
3
3
 
4
4
  type TechnancePaymentWebhookEventType = "withdrawal.completed";
5
5
  interface TechnancePaymentWebhookEventBase<TPayload, TType extends string> {
@@ -10,7 +10,7 @@ interface TechnancePaymentWebhookEventBase<TPayload, TType extends string> {
10
10
  payload: TPayload;
11
11
  }
12
12
  interface TechnancePaymentWebhookEventByType {
13
- "withdrawal.completed": TechnancePaymentWebhookEventBase<OrderResult, "withdrawal.completed">;
13
+ "withdrawal.completed": TechnancePaymentWebhookEventBase<WithdrawalOrderResult, "withdrawal.completed">;
14
14
  }
15
15
  type TechnancePaymentWebhookEvent = TechnancePaymentWebhookEventByType[TechnancePaymentWebhookEventType];
16
16
 
package/package.json CHANGED
@@ -40,7 +40,12 @@
40
40
  "module": "./dist/index.js",
41
41
  "name": "@technance/technance-payment-sdk",
42
42
  "types": "./dist/index.d.ts",
43
- "version": "1.0.3",
43
+ "version": "1.0.7",
44
+ "repository": {
45
+ "type": "git",
46
+ "url": "git+https://github.com/technance-foundation/technance-payment.git",
47
+ "directory": "packages/sdk"
48
+ },
44
49
  "scripts": {
45
50
  "build": "tsup",
46
51
  "clean": "rimraf dist node_modules",
@@ -1 +0,0 @@
1
- 'use strict';var routing=require('../../routing');class o{constructor(r){this.apiClient=r;}placeOrder(r){const e=routing.routing.orders.placeOrder;return this.apiClient.post(e,r)}getMany(r){const e=routing.routing.orders.getMany;return this.apiClient.get(e,{params:r})}getOne(r){const e=routing.routing.orders.getOne(r);return this.apiClient.get(e)}}exports.Client=o;
@@ -1,28 +0,0 @@
1
- import { Order } from '../../types/Order.js';
2
-
3
- declare namespace PlaceOrder {
4
- type Payload = {
5
- description?: string;
6
- orders: OrderPayload[];
7
- };
8
- type OrderPayload = {
9
- address: string;
10
- currency: string;
11
- network: string;
12
- amount: string;
13
- usdAmount: string;
14
- refId?: string;
15
- owner?: string;
16
- };
17
- }
18
- declare namespace GetManyOrder {
19
- type Query = {
20
- limit?: number;
21
- page?: number;
22
- all?: boolean;
23
- status?: Order.Status;
24
- refId?: string;
25
- };
26
- }
27
-
28
- export { GetManyOrder, PlaceOrder };
@@ -1 +0,0 @@
1
- 'use strict';exports.Order=void 0;(e=>{(n=>(n.CREATED="created",n.PENDING="pending",n.PROCESSING="processing",n.SENDING="sending",n.FINISHED="finished",n.FAILED="failed",n.REJECTED="rejected"))(e.Status||(e.Status={}));})(exports.Order||(exports.Order={}));
@@ -1,10 +0,0 @@
1
- import { Order } from './Order.js';
2
-
3
- type OrderRef = {
4
- id: number;
5
- status: Order.Status;
6
- owner: string | null;
7
- refId: string | null;
8
- };
9
-
10
- export type { OrderRef };