@lightsparkdev/lightspark-sdk 1.1.6 → 1.2.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.
Files changed (123) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/{chunk-7UNNCH5S.js → chunk-VTPDR6P4.js} +1270 -342
  3. package/dist/{index-5235e43b.d.ts → index-f040db9f.d.ts} +707 -407
  4. package/dist/index.cjs +1247 -319
  5. package/dist/index.d.ts +2 -2
  6. package/dist/index.js +7 -7
  7. package/dist/objects/index.cjs +1180 -306
  8. package/dist/objects/index.d.ts +1 -1
  9. package/dist/objects/index.js +5 -5
  10. package/package.json +2 -2
  11. package/src/objects/Account.ts +175 -2
  12. package/src/objects/AccountToApiTokensConnection.ts +16 -5
  13. package/src/objects/AccountToChannelsConnection.ts +9 -0
  14. package/src/objects/AccountToNodesConnection.ts +19 -5
  15. package/src/objects/AccountToPaymentRequestsConnection.ts +21 -5
  16. package/src/objects/AccountToTransactionsConnection.ts +33 -9
  17. package/src/objects/AccountToWalletsConnection.ts +13 -4
  18. package/src/objects/ApiToken.ts +13 -3
  19. package/src/objects/Balances.ts +17 -3
  20. package/src/objects/BlockchainBalance.ts +34 -9
  21. package/src/objects/Channel.ts +61 -16
  22. package/src/objects/ChannelClosingTransaction.ts +81 -61
  23. package/src/objects/ChannelFees.ts +16 -5
  24. package/src/objects/ChannelOpeningTransaction.ts +81 -61
  25. package/src/objects/ChannelSnapshot.ts +66 -6
  26. package/src/objects/ChannelToTransactionsConnection.ts +26 -6
  27. package/src/objects/Connection.ts +205 -10
  28. package/src/objects/CreateApiTokenInput.ts +8 -2
  29. package/src/objects/CreateApiTokenOutput.ts +9 -3
  30. package/src/objects/CreateInvoiceInput.ts +14 -5
  31. package/src/objects/CreateInvoiceOutput.ts +7 -2
  32. package/src/objects/CreateLnurlInvoiceInput.ts +13 -3
  33. package/src/objects/CreateNodeWalletAddressInput.ts +9 -2
  34. package/src/objects/CreateNodeWalletAddressOutput.ts +10 -2
  35. package/src/objects/CreateTestModeInvoiceInput.ts +14 -4
  36. package/src/objects/CreateTestModeInvoiceOutput.ts +10 -2
  37. package/src/objects/CreateTestModePaymentInput.ts +12 -3
  38. package/src/objects/CreateTestModePaymentoutput.ts +12 -2
  39. package/src/objects/CreateUmaInvoiceInput.ts +13 -3
  40. package/src/objects/CurrencyAmount.ts +13 -2
  41. package/src/objects/DeclineToSignMessagesInput.ts +9 -2
  42. package/src/objects/DeclineToSignMessagesOutput.ts +15 -3
  43. package/src/objects/DeleteApiTokenInput.ts +7 -2
  44. package/src/objects/DeleteApiTokenOutput.ts +7 -2
  45. package/src/objects/Deposit.ts +77 -61
  46. package/src/objects/Entity.ts +184 -2
  47. package/src/objects/FeeEstimate.ts +12 -3
  48. package/src/objects/FundNodeInput.ts +9 -3
  49. package/src/objects/FundNodeOutput.ts +11 -3
  50. package/src/objects/GraphNode.ts +21 -5
  51. package/src/objects/Hop.ts +27 -9
  52. package/src/objects/HtlcAttemptFailureCode.ts +2 -0
  53. package/src/objects/IdAndSignature.ts +8 -2
  54. package/src/objects/IncomingPayment.ts +33 -7
  55. package/src/objects/IncomingPaymentAttempt.ts +21 -5
  56. package/src/objects/IncomingPaymentToAttemptsConnection.ts +21 -5
  57. package/src/objects/Invoice.ts +91 -24
  58. package/src/objects/InvoiceData.ts +75 -6
  59. package/src/objects/LightningFeeEstimateForInvoiceInput.ts +13 -3
  60. package/src/objects/LightningFeeEstimateForNodeInput.ts +12 -2
  61. package/src/objects/LightningFeeEstimateOutput.ts +15 -3
  62. package/src/objects/LightningTransaction.ts +171 -28
  63. package/src/objects/LightsparkNode.ts +311 -208
  64. package/src/objects/LightsparkNodeOwner.ts +35 -4
  65. package/src/objects/LightsparkNodeToChannelsConnection.ts +17 -4
  66. package/src/objects/LightsparkNodeWithOSK.ts +97 -15
  67. package/src/objects/LightsparkNodeWithRemoteSigning.ts +93 -13
  68. package/src/objects/Node.ts +269 -67
  69. package/src/objects/NodeAddress.ts +8 -2
  70. package/src/objects/NodeToAddressesConnection.ts +13 -3
  71. package/src/objects/OnChainTransaction.ts +156 -44
  72. package/src/objects/OutgoingPayment.ts +127 -14
  73. package/src/objects/OutgoingPaymentAttempt.ts +57 -8
  74. package/src/objects/OutgoingPaymentAttemptToHopsConnection.ts +18 -5
  75. package/src/objects/OutgoingPaymentToAttemptsConnection.ts +17 -4
  76. package/src/objects/OutgoingPaymentsForInvoiceQueryInput.ts +12 -3
  77. package/src/objects/OutgoingPaymentsForInvoiceQueryOutput.ts +11 -2
  78. package/src/objects/PageInfo.ts +14 -6
  79. package/src/objects/PayInvoiceInput.ts +12 -3
  80. package/src/objects/PayInvoiceOutput.ts +7 -2
  81. package/src/objects/PayUmaInvoiceInput.ts +12 -3
  82. package/src/objects/PaymentRequest.ts +81 -5
  83. package/src/objects/PaymentRequestData.ts +81 -4
  84. package/src/objects/PostTransactionData.ts +12 -3
  85. package/src/objects/RegisterPaymentInput.ts +10 -2
  86. package/src/objects/RegisterPaymentOutput.ts +9 -2
  87. package/src/objects/ReleaseChannelPerCommitmentSecretInput.ts +13 -2
  88. package/src/objects/ReleaseChannelPerCommitmentSecretOutput.ts +9 -2
  89. package/src/objects/ReleasePaymentPreimageInput.ts +10 -2
  90. package/src/objects/ReleasePaymentPreimageOutput.ts +9 -2
  91. package/src/objects/RequestWithdrawalInput.ts +12 -2
  92. package/src/objects/RequestWithdrawalOutput.ts +9 -2
  93. package/src/objects/RichText.ts +7 -2
  94. package/src/objects/RoutingTransaction.ts +62 -41
  95. package/src/objects/ScreenNodeInput.ts +8 -2
  96. package/src/objects/ScreenNodeOutput.ts +7 -2
  97. package/src/objects/Secret.ts +8 -2
  98. package/src/objects/SendPaymentInput.ts +11 -2
  99. package/src/objects/SendPaymentOutput.ts +7 -2
  100. package/src/objects/SetInvoicePaymentHashInput.ts +12 -3
  101. package/src/objects/SetInvoicePaymentHashOutput.ts +9 -2
  102. package/src/objects/SignInvoiceInput.ts +9 -2
  103. package/src/objects/SignInvoiceOutput.ts +7 -2
  104. package/src/objects/SignMessagesInput.ts +13 -3
  105. package/src/objects/SignMessagesOutput.ts +13 -3
  106. package/src/objects/Signable.ts +10 -3
  107. package/src/objects/SignablePayload.ts +18 -5
  108. package/src/objects/Transaction.ts +260 -9
  109. package/src/objects/TransactionFailures.ts +11 -4
  110. package/src/objects/UpdateChannelPerCommitmentPointInput.ts +13 -2
  111. package/src/objects/UpdateChannelPerCommitmentPointOutput.ts +9 -2
  112. package/src/objects/UpdateNodeSharedSecretInput.ts +10 -2
  113. package/src/objects/UpdateNodeSharedSecretOutput.ts +9 -2
  114. package/src/objects/Wallet.ts +130 -5
  115. package/src/objects/WalletToPaymentRequestsConnection.ts +21 -5
  116. package/src/objects/WalletToTransactionsConnection.ts +16 -5
  117. package/src/objects/Withdrawal.ts +77 -61
  118. package/src/objects/WithdrawalRequest.ts +25 -4
  119. package/src/objects/WithdrawalRequestToChannelClosingTransactionsConnection.ts +19 -4
  120. package/src/objects/WithdrawalRequestToChannelOpeningTransactionsConnection.ts +19 -4
  121. package/src/objects/index.ts +5 -2
  122. package/src/tests/integration/client.test.ts +46 -7
  123. package/src/tests/serialization.test.ts +18 -0
@@ -1,4 +1,4 @@
1
- export { A as Account, a as AccountToApiTokensConnection, b as AccountToChannelsConnection, c as AccountToNodesConnection, d as AccountToPaymentRequestsConnection, e as AccountToTransactionsConnection, f as AccountToWalletsConnection, g as ApiToken, B as Balances, i as BlockchainBalance, C as Channel, j as ChannelClosingTransaction, l as ChannelFees, m as ChannelOpeningTransaction, o as ChannelSnapshot, p as ChannelStatus, q as ChannelToTransactionsConnection, r as ComplianceProvider, s as Connection, t as CreateApiTokenInput, u as CreateApiTokenOutput, v as CreateInvoiceInput, w as CreateInvoiceOutput, x as CreateLnurlInvoiceInput, y as CreateNodeWalletAddressInput, z as CreateNodeWalletAddressOutput, D as CreateTestModeInvoiceInput, E as CreateTestModeInvoiceOutput, F as CreateTestModePaymentInput, G as CreateTestModePaymentoutput, H as CreateUmaInvoiceInput, I as CurrencyAmount, J as CurrencyUnit, K as DeclineToSignMessagesInput, M as DeclineToSignMessagesOutput, N as DeleteApiTokenInput, O as DeleteApiTokenOutput, P as Deposit, R as Entity, S as FeeEstimate, T as FundNodeInput, U as FundNodeOutput, V as GraphNode, X as Hop, Z as HtlcAttemptFailureCode, _ as IdAndSignature, $ as IncomingPayment, a0 as IncomingPaymentAttempt, a2 as IncomingPaymentAttemptStatus, a3 as IncomingPaymentToAttemptsConnection, a4 as Invoice, a6 as InvoiceData, a7 as InvoiceType, a8 as LightningFeeEstimateForInvoiceInput, a9 as LightningFeeEstimateForNodeInput, aa as LightningFeeEstimateOutput, ab as LightningTransaction, ad as LightsparkNode, ae as LightsparkNodeOwner, ag as LightsparkNodeStatus, ah as LightsparkNodeToChannelsConnection, ai as LightsparkNodeWithOSK, aj as LightsparkNodeWithRemoteSigning, ak as Node, al as NodeAddress, am as NodeAddressType, an as NodeToAddressesConnection, ao as OnChainTransaction, aq as OutgoingPayment, ar as OutgoingPaymentAttempt, as as OutgoingPaymentAttemptStatus, at as OutgoingPaymentAttemptToHopsConnection, aw as OutgoingPaymentToAttemptsConnection, au as OutgoingPaymentsForInvoiceQueryInput, av as OutgoingPaymentsForInvoiceQueryOutput, ax as PageInfo, ay as PayInvoiceInput, az as PayInvoiceOutput, aG as PayUmaInvoiceInput, aA as PaymentDirection, aB as PaymentFailureReason, aC as PaymentRequest, aE as PaymentRequestData, aF as PaymentRequestStatus, aH as Permission, aI as PostTransactionData, aJ as RegisterPaymentInput, aK as RegisterPaymentOutput, aL as ReleaseChannelPerCommitmentSecretInput, aM as ReleaseChannelPerCommitmentSecretOutput, aN as ReleasePaymentPreimageInput, aO as ReleasePaymentPreimageOutput, aP as RemoteSigningSubEventType, aQ as RequestWithdrawalInput, aR as RequestWithdrawalOutput, aS as RichText, aT as RiskRating, aU as RoutingTransaction, aW as RoutingTransactionFailureReason, aX as ScreenNodeInput, aY as ScreenNodeOutput, aZ as Secret, a_ as SendPaymentInput, a$ as SendPaymentOutput, b0 as SetInvoicePaymentHashInput, b1 as SetInvoicePaymentHashOutput, b7 as SignInvoiceInput, b8 as SignInvoiceOutput, b9 as SignMessagesInput, ba as SignMessagesOutput, b2 as Signable, b4 as SignablePayload, b6 as SignablePayloadStatus, bb as SingleNodeDashboard, bc as Transaction, be as TransactionFailures, bf as TransactionStatus, bg as TransactionType, bh as TransactionUpdate, bi as UpdateChannelPerCommitmentPointInput, bj as UpdateChannelPerCommitmentPointOutput, bk as UpdateNodeSharedSecretInput, bl as UpdateNodeSharedSecretOutput, bm as Wallet, bn as WalletStatus, bo as WalletToPaymentRequestsConnection, bp as WalletToTransactionsConnection, W as WebhookEventType, bq as Withdrawal, bs as WithdrawalMode, bt as WithdrawalRequest, bu as WithdrawalRequestStatus, bv as WithdrawalRequestToChannelClosingTransactionsConnection, bw as WithdrawalRequestToChannelOpeningTransactionsConnection, h as getApiTokenQuery, k as getChannelClosingTransactionQuery, n as getChannelOpeningTransactionQuery, Q as getDepositQuery, Y as getHopQuery, a1 as getIncomingPaymentAttemptQuery, a5 as getInvoiceQuery, ac as getLightningTransactionQuery, af as getLightsparkNodeOwnerQuery, ap as getOnChainTransactionQuery, aD as getPaymentRequestQuery, aV as getRoutingTransactionQuery, b5 as getSignablePayloadQuery, b3 as getSignableQuery, bd as getTransactionQuery, br as getWithdrawalQuery } from '../index-5235e43b.js';
1
+ export { A as Account, a as AccountToApiTokensConnection, b as AccountToChannelsConnection, c as AccountToNodesConnection, d as AccountToPaymentRequestsConnection, e as AccountToTransactionsConnection, f as AccountToWalletsConnection, g as ApiToken, B as Balances, i as BlockchainBalance, C as Channel, j as ChannelClosingTransaction, l as ChannelFees, m as ChannelOpeningTransaction, o as ChannelSnapshot, p as ChannelStatus, q as ChannelToTransactionsConnection, r as ComplianceProvider, s as Connection, t as CreateApiTokenInput, u as CreateApiTokenOutput, v as CreateInvoiceInput, w as CreateInvoiceOutput, x as CreateLnurlInvoiceInput, y as CreateNodeWalletAddressInput, z as CreateNodeWalletAddressOutput, D as CreateTestModeInvoiceInput, E as CreateTestModeInvoiceOutput, F as CreateTestModePaymentInput, G as CreateTestModePaymentoutput, H as CreateUmaInvoiceInput, I as CurrencyAmount, J as CurrencyUnit, K as DeclineToSignMessagesInput, M as DeclineToSignMessagesOutput, N as DeleteApiTokenInput, O as DeleteApiTokenOutput, P as Deposit, R as Entity, S as FeeEstimate, T as FundNodeInput, U as FundNodeOutput, V as GraphNode, X as Hop, Z as HtlcAttemptFailureCode, _ as IdAndSignature, $ as IncomingPayment, a0 as IncomingPaymentAttempt, a2 as IncomingPaymentAttemptStatus, a3 as IncomingPaymentToAttemptsConnection, a4 as Invoice, a6 as InvoiceData, a7 as InvoiceType, a8 as LightningFeeEstimateForInvoiceInput, a9 as LightningFeeEstimateForNodeInput, aa as LightningFeeEstimateOutput, ab as LightningTransaction, ad as LightsparkNode, af as LightsparkNodeOwner, ah as LightsparkNodeStatus, ai as LightsparkNodeToChannelsConnection, aj as LightsparkNodeWithOSK, ak as LightsparkNodeWithRemoteSigning, al as Node, an as NodeAddress, ao as NodeAddressType, ap as NodeToAddressesConnection, aq as OnChainTransaction, as as OutgoingPayment, at as OutgoingPaymentAttempt, au as OutgoingPaymentAttemptStatus, av as OutgoingPaymentAttemptToHopsConnection, ay as OutgoingPaymentToAttemptsConnection, aw as OutgoingPaymentsForInvoiceQueryInput, ax as OutgoingPaymentsForInvoiceQueryOutput, az as PageInfo, aA as PayInvoiceInput, aB as PayInvoiceOutput, aI as PayUmaInvoiceInput, aC as PaymentDirection, aD as PaymentFailureReason, aE as PaymentRequest, aG as PaymentRequestData, aH as PaymentRequestStatus, aJ as Permission, aK as PostTransactionData, aL as RegisterPaymentInput, aM as RegisterPaymentOutput, aN as ReleaseChannelPerCommitmentSecretInput, aO as ReleaseChannelPerCommitmentSecretOutput, aP as ReleasePaymentPreimageInput, aQ as ReleasePaymentPreimageOutput, aR as RemoteSigningSubEventType, aS as RequestWithdrawalInput, aT as RequestWithdrawalOutput, aU as RichText, aV as RiskRating, aW as RoutingTransaction, aY as RoutingTransactionFailureReason, aZ as ScreenNodeInput, a_ as ScreenNodeOutput, a$ as Secret, b0 as SendPaymentInput, b1 as SendPaymentOutput, b2 as SetInvoicePaymentHashInput, b3 as SetInvoicePaymentHashOutput, b9 as SignInvoiceInput, ba as SignInvoiceOutput, bb as SignMessagesInput, bc as SignMessagesOutput, b4 as Signable, b6 as SignablePayload, b8 as SignablePayloadStatus, bd as SingleNodeDashboard, be as Transaction, bg as TransactionFailures, bh as TransactionStatus, bi as TransactionType, bj as TransactionUpdate, bk as UpdateChannelPerCommitmentPointInput, bl as UpdateChannelPerCommitmentPointOutput, bm as UpdateNodeSharedSecretInput, bn as UpdateNodeSharedSecretOutput, bo as Wallet, bp as WalletStatus, bq as WalletToPaymentRequestsConnection, br as WalletToTransactionsConnection, W as WebhookEventType, bs as Withdrawal, bu as WithdrawalMode, bv as WithdrawalRequest, bw as WithdrawalRequestStatus, bx as WithdrawalRequestToChannelClosingTransactionsConnection, by as WithdrawalRequestToChannelOpeningTransactionsConnection, h as getApiTokenQuery, k as getChannelClosingTransactionQuery, n as getChannelOpeningTransactionQuery, Q as getDepositQuery, Y as getHopQuery, a1 as getIncomingPaymentAttemptQuery, a5 as getInvoiceQuery, ac as getLightningTransactionQuery, ag as getLightsparkNodeOwnerQuery, ae as getLightsparkNodeQuery, am as getNodeQuery, ar as getOnChainTransactionQuery, aF as getPaymentRequestQuery, aX as getRoutingTransactionQuery, b7 as getSignablePayloadQuery, b5 as getSignableQuery, bf as getTransactionQuery, bt as getWithdrawalQuery } from '../index-f040db9f.js';
2
2
  export { B as BitcoinNetwork } from '../BitcoinNetwork-a816c0be.js';
3
3
  import '@lightsparkdev/core';
4
4
  import 'zen-observable';
@@ -13,9 +13,7 @@ import {
13
13
  LightsparkNodeStatus_default,
14
14
  LightsparkNodeWithOSK_default,
15
15
  LightsparkNodeWithRemoteSigning_default,
16
- LightsparkNode_default,
17
16
  NodeAddressType_default,
18
- Node_default,
19
17
  OutgoingPaymentAttemptStatus_default,
20
18
  OutgoingPaymentAttempt_default,
21
19
  OutgoingPayment_default,
@@ -44,6 +42,8 @@ import {
44
42
  getInvoiceQuery,
45
43
  getLightningTransactionQuery,
46
44
  getLightsparkNodeOwnerQuery,
45
+ getLightsparkNodeQuery,
46
+ getNodeQuery,
47
47
  getOnChainTransactionQuery,
48
48
  getPaymentRequestQuery,
49
49
  getRoutingTransactionQuery,
@@ -51,7 +51,7 @@ import {
51
51
  getSignableQuery,
52
52
  getTransactionQuery,
53
53
  getWithdrawalQuery
54
- } from "../chunk-7UNNCH5S.js";
54
+ } from "../chunk-VTPDR6P4.js";
55
55
  import {
56
56
  BitcoinNetwork_default
57
57
  } from "../chunk-K6SAUSAX.js";
@@ -69,11 +69,9 @@ export {
69
69
  IncomingPayment_default as IncomingPayment,
70
70
  IncomingPaymentAttemptStatus_default as IncomingPaymentAttemptStatus,
71
71
  InvoiceType_default as InvoiceType,
72
- LightsparkNode_default as LightsparkNode,
73
72
  LightsparkNodeStatus_default as LightsparkNodeStatus,
74
73
  LightsparkNodeWithOSK_default as LightsparkNodeWithOSK,
75
74
  LightsparkNodeWithRemoteSigning_default as LightsparkNodeWithRemoteSigning,
76
- Node_default as Node,
77
75
  NodeAddressType_default as NodeAddressType,
78
76
  OutgoingPayment_default as OutgoingPayment,
79
77
  OutgoingPaymentAttempt_default as OutgoingPaymentAttempt,
@@ -103,6 +101,8 @@ export {
103
101
  getInvoiceQuery,
104
102
  getLightningTransactionQuery,
105
103
  getLightsparkNodeOwnerQuery,
104
+ getLightsparkNodeQuery,
105
+ getNodeQuery,
106
106
  getOnChainTransactionQuery,
107
107
  getPaymentRequestQuery,
108
108
  getRoutingTransactionQuery,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightsparkdev/lightspark-sdk",
3
- "version": "1.1.6",
3
+ "version": "1.2.0",
4
4
  "description": "Lightspark JS SDK",
5
5
  "author": "Lightspark Inc.",
6
6
  "keywords": [
@@ -109,7 +109,7 @@
109
109
  "eslint": "^8.3.0",
110
110
  "eslint-watch": "^8.0.0",
111
111
  "jest": "^29.6.2",
112
- "prettier": "3.0.2",
112
+ "prettier": "3.0.3",
113
113
  "prettier-plugin-organize-imports": "^3.2.2",
114
114
  "ts-jest": "^29.1.1",
115
115
  "tsc-absolute": "^1.0.1",
@@ -20,19 +20,20 @@ import type BlockchainBalance from "./BlockchainBalance.js";
20
20
  import { BlockchainBalanceFromJson } from "./BlockchainBalance.js";
21
21
  import type CurrencyAmount from "./CurrencyAmount.js";
22
22
  import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
23
+ import type Entity from "./Entity.js";
23
24
  import type LightsparkNodeOwner from "./LightsparkNodeOwner.js";
24
25
  import type TransactionFailures from "./TransactionFailures.js";
25
26
  import type TransactionStatus from "./TransactionStatus.js";
26
27
  import type TransactionType from "./TransactionType.js";
27
28
 
28
29
  /** This is an object representing the connected Lightspark account. You can retrieve this object to see your account information and objects tied to your account. **/
29
- class Account implements LightsparkNodeOwner {
30
+ class Account implements LightsparkNodeOwner, Entity {
30
31
  constructor(
31
32
  public readonly id: string,
32
33
  public readonly createdAt: string,
33
34
  public readonly updatedAt: string,
34
35
  public readonly typename: string,
35
- public readonly name?: string,
36
+ public readonly name?: string | undefined,
36
37
  ) {
37
38
  autoBind(this);
38
39
  }
@@ -328,6 +329,33 @@ query FetchAccountToNodesConnection($first: Int, $bitcoin_networks: [BitcoinNetw
328
329
  }
329
330
  }
330
331
  lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
332
+ lightspark_node_with_o_s_k_balances: balances {
333
+ __typename
334
+ balances_owned_balance: owned_balance {
335
+ __typename
336
+ currency_amount_original_value: original_value
337
+ currency_amount_original_unit: original_unit
338
+ currency_amount_preferred_currency_unit: preferred_currency_unit
339
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
340
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
341
+ }
342
+ balances_available_to_send_balance: available_to_send_balance {
343
+ __typename
344
+ currency_amount_original_value: original_value
345
+ currency_amount_original_unit: original_unit
346
+ currency_amount_preferred_currency_unit: preferred_currency_unit
347
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
348
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
349
+ }
350
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
351
+ __typename
352
+ currency_amount_original_value: original_value
353
+ currency_amount_original_unit: original_unit
354
+ currency_amount_preferred_currency_unit: preferred_currency_unit
355
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
356
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
357
+ }
358
+ }
331
359
  lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
332
360
  __typename
333
361
  secret_encrypted_value: encrypted_value
@@ -433,6 +461,33 @@ query FetchAccountToNodesConnection($first: Int, $bitcoin_networks: [BitcoinNetw
433
461
  }
434
462
  }
435
463
  lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
464
+ lightspark_node_with_remote_signing_balances: balances {
465
+ __typename
466
+ balances_owned_balance: owned_balance {
467
+ __typename
468
+ currency_amount_original_value: original_value
469
+ currency_amount_original_unit: original_unit
470
+ currency_amount_preferred_currency_unit: preferred_currency_unit
471
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
472
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
473
+ }
474
+ balances_available_to_send_balance: available_to_send_balance {
475
+ __typename
476
+ currency_amount_original_value: original_value
477
+ currency_amount_original_unit: original_unit
478
+ currency_amount_preferred_currency_unit: preferred_currency_unit
479
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
480
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
481
+ }
482
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
483
+ __typename
484
+ currency_amount_original_value: original_value
485
+ currency_amount_original_unit: original_unit
486
+ currency_amount_preferred_currency_unit: preferred_currency_unit
487
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
488
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
489
+ }
490
+ }
436
491
  }
437
492
  }
438
493
  }
@@ -987,6 +1042,33 @@ query FetchAccountToTransactionsConnection($first: Int, $after: String, $types:
987
1042
  }
988
1043
  }
989
1044
  lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
1045
+ lightspark_node_with_o_s_k_balances: balances {
1046
+ __typename
1047
+ balances_owned_balance: owned_balance {
1048
+ __typename
1049
+ currency_amount_original_value: original_value
1050
+ currency_amount_original_unit: original_unit
1051
+ currency_amount_preferred_currency_unit: preferred_currency_unit
1052
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1053
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1054
+ }
1055
+ balances_available_to_send_balance: available_to_send_balance {
1056
+ __typename
1057
+ currency_amount_original_value: original_value
1058
+ currency_amount_original_unit: original_unit
1059
+ currency_amount_preferred_currency_unit: preferred_currency_unit
1060
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1061
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1062
+ }
1063
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
1064
+ __typename
1065
+ currency_amount_original_value: original_value
1066
+ currency_amount_original_unit: original_unit
1067
+ currency_amount_preferred_currency_unit: preferred_currency_unit
1068
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1069
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1070
+ }
1071
+ }
990
1072
  lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
991
1073
  __typename
992
1074
  secret_encrypted_value: encrypted_value
@@ -1092,6 +1174,33 @@ query FetchAccountToTransactionsConnection($first: Int, $after: String, $types:
1092
1174
  }
1093
1175
  }
1094
1176
  lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
1177
+ lightspark_node_with_remote_signing_balances: balances {
1178
+ __typename
1179
+ balances_owned_balance: owned_balance {
1180
+ __typename
1181
+ currency_amount_original_value: original_value
1182
+ currency_amount_original_unit: original_unit
1183
+ currency_amount_preferred_currency_unit: preferred_currency_unit
1184
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1185
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1186
+ }
1187
+ balances_available_to_send_balance: available_to_send_balance {
1188
+ __typename
1189
+ currency_amount_original_value: original_value
1190
+ currency_amount_original_unit: original_unit
1191
+ currency_amount_preferred_currency_unit: preferred_currency_unit
1192
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1193
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1194
+ }
1195
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
1196
+ __typename
1197
+ currency_amount_original_value: original_value
1198
+ currency_amount_original_unit: original_unit
1199
+ currency_amount_preferred_currency_unit: preferred_currency_unit
1200
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1201
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1202
+ }
1203
+ }
1095
1204
  }
1096
1205
  }
1097
1206
  }
@@ -1367,6 +1476,33 @@ query FetchAccountToPaymentRequestsConnection($first: Int, $after: String, $afte
1367
1476
  }
1368
1477
  }
1369
1478
  lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos
1479
+ lightspark_node_with_o_s_k_balances: balances {
1480
+ __typename
1481
+ balances_owned_balance: owned_balance {
1482
+ __typename
1483
+ currency_amount_original_value: original_value
1484
+ currency_amount_original_unit: original_unit
1485
+ currency_amount_preferred_currency_unit: preferred_currency_unit
1486
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1487
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1488
+ }
1489
+ balances_available_to_send_balance: available_to_send_balance {
1490
+ __typename
1491
+ currency_amount_original_value: original_value
1492
+ currency_amount_original_unit: original_unit
1493
+ currency_amount_preferred_currency_unit: preferred_currency_unit
1494
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1495
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1496
+ }
1497
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
1498
+ __typename
1499
+ currency_amount_original_value: original_value
1500
+ currency_amount_original_unit: original_unit
1501
+ currency_amount_preferred_currency_unit: preferred_currency_unit
1502
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1503
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1504
+ }
1505
+ }
1370
1506
  lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key {
1371
1507
  __typename
1372
1508
  secret_encrypted_value: encrypted_value
@@ -1472,6 +1608,33 @@ query FetchAccountToPaymentRequestsConnection($first: Int, $after: String, $afte
1472
1608
  }
1473
1609
  }
1474
1610
  lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos
1611
+ lightspark_node_with_remote_signing_balances: balances {
1612
+ __typename
1613
+ balances_owned_balance: owned_balance {
1614
+ __typename
1615
+ currency_amount_original_value: original_value
1616
+ currency_amount_original_unit: original_unit
1617
+ currency_amount_preferred_currency_unit: preferred_currency_unit
1618
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1619
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1620
+ }
1621
+ balances_available_to_send_balance: available_to_send_balance {
1622
+ __typename
1623
+ currency_amount_original_value: original_value
1624
+ currency_amount_original_unit: original_unit
1625
+ currency_amount_preferred_currency_unit: preferred_currency_unit
1626
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1627
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1628
+ }
1629
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
1630
+ __typename
1631
+ currency_amount_original_value: original_value
1632
+ currency_amount_original_unit: original_unit
1633
+ currency_amount_preferred_currency_unit: preferred_currency_unit
1634
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
1635
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
1636
+ }
1637
+ }
1475
1638
  }
1476
1639
  }
1477
1640
  }
@@ -1596,6 +1759,16 @@ ${FRAGMENT}
1596
1759
  constructObject: (data: any) => AccountFromJson(data.current_account),
1597
1760
  };
1598
1761
  }
1762
+
1763
+ public toJson() {
1764
+ return {
1765
+ __typename: "Account",
1766
+ account_id: this.id,
1767
+ account_created_at: this.createdAt,
1768
+ account_updated_at: this.updatedAt,
1769
+ account_name: this.name,
1770
+ };
1771
+ }
1599
1772
  }
1600
1773
 
1601
1774
  export const AccountFromJson = (obj: any): Account => {
@@ -1,12 +1,11 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
3
  import type ApiToken from "./ApiToken.js";
4
- import { ApiTokenFromJson } from "./ApiToken.js";
5
- import type Connection from "./Connection.js";
4
+ import { ApiTokenFromJson, ApiTokenToJson } from "./ApiToken.js";
6
5
  import type PageInfo from "./PageInfo.js";
7
- import { PageInfoFromJson } from "./PageInfo.js";
6
+ import { PageInfoFromJson, PageInfoToJson } from "./PageInfo.js";
8
7
 
9
- type AccountToApiTokensConnection = Connection & {
8
+ interface AccountToApiTokensConnection {
10
9
  /**
11
10
  * The total count of objects in this connection, using the current filters. It is different from the
12
11
  * number of objects returned in the current page (in the `entities` field).
@@ -21,7 +20,7 @@ type AccountToApiTokensConnection = Connection & {
21
20
 
22
21
  /** The typename of the object **/
23
22
  typename: string;
24
- };
23
+ }
25
24
 
26
25
  export const AccountToApiTokensConnectionFromJson = (
27
26
  obj: any,
@@ -37,6 +36,18 @@ export const AccountToApiTokensConnectionFromJson = (
37
36
  typename: "AccountToApiTokensConnection",
38
37
  } as AccountToApiTokensConnection;
39
38
  };
39
+ export const AccountToApiTokensConnectionToJson = (
40
+ obj: AccountToApiTokensConnection,
41
+ ): any => {
42
+ return {
43
+ __typename: "AccountToApiTokensConnection",
44
+ account_to_api_tokens_connection_count: obj.count,
45
+ account_to_api_tokens_connection_page_info: PageInfoToJson(obj.pageInfo),
46
+ account_to_api_tokens_connection_entities: obj.entities.map((e) =>
47
+ ApiTokenToJson(e),
48
+ ),
49
+ };
50
+ };
40
51
 
41
52
  export const FRAGMENT = `
42
53
  fragment AccountToApiTokensConnectionFragment on AccountToApiTokensConnection {
@@ -11,6 +11,15 @@ class AccountToChannelsConnection {
11
11
  ) {
12
12
  autoBind(this);
13
13
  }
14
+
15
+ public toJson() {
16
+ return {
17
+ account_to_channels_connection_count: this.count,
18
+ account_to_channels_connection_entities: this.entities.map((e) =>
19
+ e.toJson(),
20
+ ),
21
+ };
22
+ }
14
23
  }
15
24
 
16
25
  export const AccountToChannelsConnectionFromJson = (
@@ -1,13 +1,15 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import type Connection from "./Connection.js";
4
3
  import type LightsparkNode from "./LightsparkNode.js";
5
- import { LightsparkNodeFromJson } from "./LightsparkNode.js";
4
+ import {
5
+ LightsparkNodeFromJson,
6
+ LightsparkNodeToJson,
7
+ } from "./LightsparkNode.js";
6
8
  import type PageInfo from "./PageInfo.js";
7
- import { PageInfoFromJson } from "./PageInfo.js";
9
+ import { PageInfoFromJson, PageInfoToJson } from "./PageInfo.js";
8
10
 
9
11
  /** A connection between an account and the nodes it manages. **/
10
- type AccountToNodesConnection = Connection & {
12
+ interface AccountToNodesConnection {
11
13
  /**
12
14
  * The total count of objects in this connection, using the current filters. It is different from the
13
15
  * number of objects returned in the current page (in the `entities` field).
@@ -22,7 +24,7 @@ type AccountToNodesConnection = Connection & {
22
24
 
23
25
  /** The typename of the object **/
24
26
  typename: string;
25
- };
27
+ }
26
28
 
27
29
  export const AccountToNodesConnectionFromJson = (
28
30
  obj: any,
@@ -36,6 +38,18 @@ export const AccountToNodesConnectionFromJson = (
36
38
  typename: "AccountToNodesConnection",
37
39
  } as AccountToNodesConnection;
38
40
  };
41
+ export const AccountToNodesConnectionToJson = (
42
+ obj: AccountToNodesConnection,
43
+ ): any => {
44
+ return {
45
+ __typename: "AccountToNodesConnection",
46
+ account_to_nodes_connection_count: obj.count,
47
+ account_to_nodes_connection_page_info: PageInfoToJson(obj.pageInfo),
48
+ account_to_nodes_connection_entities: obj.entities.map((e) =>
49
+ LightsparkNodeToJson(e),
50
+ ),
51
+ };
52
+ };
39
53
 
40
54
  export const FRAGMENT = `
41
55
  fragment AccountToNodesConnectionFragment on AccountToNodesConnection {
@@ -1,12 +1,14 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import type Connection from "./Connection.js";
4
3
  import type PageInfo from "./PageInfo.js";
5
- import { PageInfoFromJson } from "./PageInfo.js";
4
+ import { PageInfoFromJson, PageInfoToJson } from "./PageInfo.js";
6
5
  import type PaymentRequest from "./PaymentRequest.js";
7
- import { PaymentRequestFromJson } from "./PaymentRequest.js";
6
+ import {
7
+ PaymentRequestFromJson,
8
+ PaymentRequestToJson,
9
+ } from "./PaymentRequest.js";
8
10
 
9
- type AccountToPaymentRequestsConnection = Connection & {
11
+ interface AccountToPaymentRequestsConnection {
10
12
  /**
11
13
  * The total count of objects in this connection, using the current filters. It is different from the
12
14
  * number of objects returned in the current page (in the `entities` field).
@@ -21,7 +23,7 @@ type AccountToPaymentRequestsConnection = Connection & {
21
23
 
22
24
  /** The typename of the object **/
23
25
  typename: string;
24
- };
26
+ }
25
27
 
26
28
  export const AccountToPaymentRequestsConnectionFromJson = (
27
29
  obj: any,
@@ -37,6 +39,20 @@ export const AccountToPaymentRequestsConnectionFromJson = (
37
39
  typename: "AccountToPaymentRequestsConnection",
38
40
  } as AccountToPaymentRequestsConnection;
39
41
  };
42
+ export const AccountToPaymentRequestsConnectionToJson = (
43
+ obj: AccountToPaymentRequestsConnection,
44
+ ): any => {
45
+ return {
46
+ __typename: "AccountToPaymentRequestsConnection",
47
+ account_to_payment_requests_connection_count: obj.count,
48
+ account_to_payment_requests_connection_page_info: PageInfoToJson(
49
+ obj.pageInfo,
50
+ ),
51
+ account_to_payment_requests_connection_entities: obj.entities.map((e) =>
52
+ PaymentRequestToJson(e),
53
+ ),
54
+ };
55
+ };
40
56
 
41
57
  export const FRAGMENT = `
42
58
  fragment AccountToPaymentRequestsConnectionFragment on AccountToPaymentRequestsConnection {
@@ -1,14 +1,16 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import type Connection from "./Connection.js";
4
3
  import type CurrencyAmount from "./CurrencyAmount.js";
5
- import { CurrencyAmountFromJson } from "./CurrencyAmount.js";
4
+ import {
5
+ CurrencyAmountFromJson,
6
+ CurrencyAmountToJson,
7
+ } from "./CurrencyAmount.js";
6
8
  import type PageInfo from "./PageInfo.js";
7
- import { PageInfoFromJson } from "./PageInfo.js";
9
+ import { PageInfoFromJson, PageInfoToJson } from "./PageInfo.js";
8
10
  import type Transaction from "./Transaction.js";
9
- import { TransactionFromJson } from "./Transaction.js";
11
+ import { TransactionFromJson, TransactionToJson } from "./Transaction.js";
10
12
 
11
- type AccountToTransactionsConnection = Connection & {
13
+ interface AccountToTransactionsConnection {
12
14
  /**
13
15
  * The total count of objects in this connection, using the current filters. It is different from the
14
16
  * number of objects returned in the current page (in the `entities` field).
@@ -28,20 +30,20 @@ type AccountToTransactionsConnection = Connection & {
28
30
  * Profit (or loss) generated by the transactions in this connection, with the set of filters and
29
31
  * constraints provided.
30
32
  **/
31
- profitLoss?: CurrencyAmount;
33
+ profitLoss?: CurrencyAmount | undefined;
32
34
 
33
35
  /**
34
36
  * Average fee earned for the transactions in this connection, with the set of filters and constraints
35
37
  * provided.
36
38
  **/
37
- averageFeeEarned?: CurrencyAmount;
39
+ averageFeeEarned?: CurrencyAmount | undefined;
38
40
 
39
41
  /**
40
42
  * Total amount transacted by the transactions in this connection, with the set of filters and
41
43
  * constraints provided.
42
44
  **/
43
- totalAmountTransacted?: CurrencyAmount;
44
- };
45
+ totalAmountTransacted?: CurrencyAmount | undefined;
46
+ }
45
47
 
46
48
  export const AccountToTransactionsConnectionFromJson = (
47
49
  obj: any,
@@ -76,6 +78,28 @@ export const AccountToTransactionsConnectionFromJson = (
76
78
  : undefined,
77
79
  } as AccountToTransactionsConnection;
78
80
  };
81
+ export const AccountToTransactionsConnectionToJson = (
82
+ obj: AccountToTransactionsConnection,
83
+ ): any => {
84
+ return {
85
+ __typename: "AccountToTransactionsConnection",
86
+ account_to_transactions_connection_count: obj.count,
87
+ account_to_transactions_connection_page_info: PageInfoToJson(obj.pageInfo),
88
+ account_to_transactions_connection_profit_loss: obj.profitLoss
89
+ ? CurrencyAmountToJson(obj.profitLoss)
90
+ : undefined,
91
+ account_to_transactions_connection_average_fee_earned: obj.averageFeeEarned
92
+ ? CurrencyAmountToJson(obj.averageFeeEarned)
93
+ : undefined,
94
+ account_to_transactions_connection_total_amount_transacted:
95
+ obj.totalAmountTransacted
96
+ ? CurrencyAmountToJson(obj.totalAmountTransacted)
97
+ : undefined,
98
+ account_to_transactions_connection_entities: obj.entities.map((e) =>
99
+ TransactionToJson(e),
100
+ ),
101
+ };
102
+ };
79
103
 
80
104
  export const FRAGMENT = `
81
105
  fragment AccountToTransactionsConnectionFragment on AccountToTransactionsConnection {
@@ -1,12 +1,11 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
- import type Connection from "./Connection.js";
4
3
  import type PageInfo from "./PageInfo.js";
5
- import { PageInfoFromJson } from "./PageInfo.js";
4
+ import { PageInfoFromJson, PageInfoToJson } from "./PageInfo.js";
6
5
  import type Wallet from "./Wallet.js";
7
6
  import { WalletFromJson } from "./Wallet.js";
8
7
 
9
- type AccountToWalletsConnection = Connection & {
8
+ interface AccountToWalletsConnection {
10
9
  /**
11
10
  * The total count of objects in this connection, using the current filters. It is different from the
12
11
  * number of objects returned in the current page (in the `entities` field).
@@ -21,7 +20,7 @@ type AccountToWalletsConnection = Connection & {
21
20
 
22
21
  /** The typename of the object **/
23
22
  typename: string;
24
- };
23
+ }
25
24
 
26
25
  export const AccountToWalletsConnectionFromJson = (
27
26
  obj: any,
@@ -35,6 +34,16 @@ export const AccountToWalletsConnectionFromJson = (
35
34
  typename: "AccountToWalletsConnection",
36
35
  } as AccountToWalletsConnection;
37
36
  };
37
+ export const AccountToWalletsConnectionToJson = (
38
+ obj: AccountToWalletsConnection,
39
+ ): any => {
40
+ return {
41
+ __typename: "AccountToWalletsConnection",
42
+ account_to_wallets_connection_count: obj.count,
43
+ account_to_wallets_connection_page_info: PageInfoToJson(obj.pageInfo),
44
+ account_to_wallets_connection_entities: obj.entities.map((e) => e.toJson()),
45
+ };
46
+ };
38
47
 
39
48
  export const FRAGMENT = `
40
49
  fragment AccountToWalletsConnectionFragment on AccountToWalletsConnection {
@@ -1,11 +1,10 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
3
  import { type Query } from "@lightsparkdev/core";
4
- import type Entity from "./Entity.js";
5
4
  import Permission from "./Permission.js";
6
5
 
7
6
  /** This is an object representing a Lightspark API token, that can be used to authenticate this account when making API calls or using our SDKs. See the “Authentication” section of our API docs for more details on its usage. **/
8
- type ApiToken = Entity & {
7
+ interface ApiToken {
9
8
  /**
10
9
  * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
11
10
  * string.
@@ -35,7 +34,7 @@ type ApiToken = Entity & {
35
34
 
36
35
  /** The typename of the object **/
37
36
  typename: string;
38
- };
37
+ }
39
38
 
40
39
  export const ApiTokenFromJson = (obj: any): ApiToken => {
41
40
  return {
@@ -48,6 +47,17 @@ export const ApiTokenFromJson = (obj: any): ApiToken => {
48
47
  typename: "ApiToken",
49
48
  } as ApiToken;
50
49
  };
50
+ export const ApiTokenToJson = (obj: ApiToken): any => {
51
+ return {
52
+ __typename: "ApiToken",
53
+ api_token_id: obj.id,
54
+ api_token_created_at: obj.createdAt,
55
+ api_token_updated_at: obj.updatedAt,
56
+ api_token_client_id: obj.clientId,
57
+ api_token_name: obj.name,
58
+ api_token_permissions: obj.permissions,
59
+ };
60
+ };
51
61
 
52
62
  export const FRAGMENT = `
53
63
  fragment ApiTokenFragment on ApiToken {