@lightsparkdev/lightspark-sdk 0.2.2 → 0.2.4

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.
@@ -1,5 +1,10 @@
1
+ var __getOwnPropNames = Object.getOwnPropertyNames;
2
+ var __commonJS = (cb, mod) => function __require() {
3
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
4
+ };
5
+
1
6
  // src/objects/Account.ts
2
- import autoBind9 from "auto-bind";
7
+ import autoBind10 from "auto-bind";
3
8
 
4
9
  // src/objects/Permission.ts
5
10
  var Permission = /* @__PURE__ */ ((Permission2) => {
@@ -2889,6 +2894,168 @@ var AccountToTransactionsConnectionFromJson = (obj) => {
2889
2894
  };
2890
2895
  };
2891
2896
 
2897
+ // src/objects/Wallet.ts
2898
+ import autoBind9 from "auto-bind";
2899
+
2900
+ // src/objects/Balances.ts
2901
+ var BalancesFromJson = (obj) => {
2902
+ return {
2903
+ ownedBalance: CurrencyAmountFromJson(obj["balances_owned_balance"]),
2904
+ availableToSendBalance: CurrencyAmountFromJson(
2905
+ obj["balances_available_to_send_balance"]
2906
+ ),
2907
+ availableToWithdrawBalance: CurrencyAmountFromJson(
2908
+ obj["balances_available_to_withdraw_balance"]
2909
+ )
2910
+ };
2911
+ };
2912
+
2913
+ // src/objects/Wallet.ts
2914
+ var Wallet = class {
2915
+ constructor(id, createdAt, updatedAt, thirdPartyIdentifier, typename, lastLoginAt, balances) {
2916
+ this.id = id;
2917
+ this.createdAt = createdAt;
2918
+ this.updatedAt = updatedAt;
2919
+ this.thirdPartyIdentifier = thirdPartyIdentifier;
2920
+ this.typename = typename;
2921
+ this.lastLoginAt = lastLoginAt;
2922
+ this.balances = balances;
2923
+ autoBind9(this);
2924
+ }
2925
+ async getTotalAmountReceived(client, createdAfterDate = void 0, createdBeforeDate = void 0) {
2926
+ return await client.executeRawQuery({
2927
+ queryPayload: `
2928
+ query FetchWalletTotalAmountReceived($created_after_date: DateTime, $created_before_date: DateTime) {
2929
+ current_wallet {
2930
+ ... on Wallet {
2931
+ total_amount_received(, created_after_date: $created_after_date, created_before_date: $created_before_date) {
2932
+ __typename
2933
+ currency_amount_original_value: original_value
2934
+ currency_amount_original_unit: original_unit
2935
+ currency_amount_preferred_currency_unit: preferred_currency_unit
2936
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
2937
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
2938
+ }
2939
+ }
2940
+ }
2941
+ }
2942
+ `,
2943
+ variables: {
2944
+ created_after_date: createdAfterDate,
2945
+ created_before_date: createdBeforeDate
2946
+ },
2947
+ constructObject: (json) => {
2948
+ const connection = json["current_wallet"]["total_amount_received"];
2949
+ return CurrencyAmountFromJson(connection);
2950
+ }
2951
+ });
2952
+ }
2953
+ async getTotalAmountSent(client, createdAfterDate = void 0, createdBeforeDate = void 0) {
2954
+ return await client.executeRawQuery({
2955
+ queryPayload: `
2956
+ query FetchWalletTotalAmountSent($created_after_date: DateTime, $created_before_date: DateTime) {
2957
+ current_wallet {
2958
+ ... on Wallet {
2959
+ total_amount_sent(, created_after_date: $created_after_date, created_before_date: $created_before_date) {
2960
+ __typename
2961
+ currency_amount_original_value: original_value
2962
+ currency_amount_original_unit: original_unit
2963
+ currency_amount_preferred_currency_unit: preferred_currency_unit
2964
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
2965
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
2966
+ }
2967
+ }
2968
+ }
2969
+ }
2970
+ `,
2971
+ variables: {
2972
+ created_after_date: createdAfterDate,
2973
+ created_before_date: createdBeforeDate
2974
+ },
2975
+ constructObject: (json) => {
2976
+ const connection = json["current_wallet"]["total_amount_sent"];
2977
+ return CurrencyAmountFromJson(connection);
2978
+ }
2979
+ });
2980
+ }
2981
+ static getWalletQuery() {
2982
+ return {
2983
+ queryPayload: `
2984
+ query GetWallet {
2985
+ current_wallet {
2986
+ ... on Wallet {
2987
+ ...WalletFragment
2988
+ }
2989
+ }
2990
+ }
2991
+
2992
+ ${FRAGMENT15}
2993
+ `,
2994
+ variables: {},
2995
+ constructObject: (data) => WalletFromJson(data.current_wallet)
2996
+ };
2997
+ }
2998
+ };
2999
+ var WalletFromJson = (obj) => {
3000
+ return new Wallet(
3001
+ obj["wallet_id"],
3002
+ obj["wallet_created_at"],
3003
+ obj["wallet_updated_at"],
3004
+ obj["wallet_third_party_identifier"],
3005
+ "Wallet",
3006
+ obj["wallet_last_login_at"],
3007
+ !!obj["wallet_balances"] ? BalancesFromJson(obj["wallet_balances"]) : void 0
3008
+ );
3009
+ };
3010
+ var FRAGMENT15 = `
3011
+ fragment WalletFragment on Wallet {
3012
+ __typename
3013
+ wallet_id: id
3014
+ wallet_created_at: created_at
3015
+ wallet_updated_at: updated_at
3016
+ wallet_last_login_at: last_login_at
3017
+ wallet_balances: balances {
3018
+ __typename
3019
+ balances_owned_balance: owned_balance {
3020
+ __typename
3021
+ currency_amount_original_value: original_value
3022
+ currency_amount_original_unit: original_unit
3023
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3024
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3025
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3026
+ }
3027
+ balances_available_to_send_balance: available_to_send_balance {
3028
+ __typename
3029
+ currency_amount_original_value: original_value
3030
+ currency_amount_original_unit: original_unit
3031
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3032
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3033
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3034
+ }
3035
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
3036
+ __typename
3037
+ currency_amount_original_value: original_value
3038
+ currency_amount_original_unit: original_unit
3039
+ currency_amount_preferred_currency_unit: preferred_currency_unit
3040
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
3041
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
3042
+ }
3043
+ }
3044
+ wallet_third_party_identifier: third_party_identifier
3045
+ }`;
3046
+ var Wallet_default = Wallet;
3047
+
3048
+ // src/objects/AccountToWalletsConnection.ts
3049
+ var AccountToWalletsConnectionFromJson = (obj) => {
3050
+ return {
3051
+ pageInfo: PageInfoFromJson(obj["account_to_wallets_connection_page_info"]),
3052
+ count: obj["account_to_wallets_connection_count"],
3053
+ entities: obj["account_to_wallets_connection_entities"].map(
3054
+ (e) => WalletFromJson(e)
3055
+ )
3056
+ };
3057
+ };
3058
+
2892
3059
  // src/objects/Account.ts
2893
3060
  var Account = class {
2894
3061
  constructor(id, createdAt, updatedAt, typename, name) {
@@ -2897,7 +3064,7 @@ var Account = class {
2897
3064
  this.updatedAt = updatedAt;
2898
3065
  this.typename = typename;
2899
3066
  this.name = name;
2900
- autoBind9(this);
3067
+ autoBind10(this);
2901
3068
  }
2902
3069
  async getApiTokens(client, first = void 0) {
2903
3070
  return await client.executeRawQuery({
@@ -3975,6 +4142,69 @@ query FetchAccountToPaymentRequestsConnection($first: Int, $after: String, $afte
3975
4142
  }
3976
4143
  });
3977
4144
  }
4145
+ async getWallets(client, first = void 0) {
4146
+ return await client.executeRawQuery({
4147
+ queryPayload: `
4148
+ query FetchAccountToWalletsConnection($first: Int) {
4149
+ current_account {
4150
+ ... on Account {
4151
+ wallets(, first: $first) {
4152
+ __typename
4153
+ account_to_wallets_connection_page_info: page_info {
4154
+ __typename
4155
+ page_info_has_next_page: has_next_page
4156
+ page_info_has_previous_page: has_previous_page
4157
+ page_info_start_cursor: start_cursor
4158
+ page_info_end_cursor: end_cursor
4159
+ }
4160
+ account_to_wallets_connection_count: count
4161
+ account_to_wallets_connection_entities: entities {
4162
+ __typename
4163
+ wallet_id: id
4164
+ wallet_created_at: created_at
4165
+ wallet_updated_at: updated_at
4166
+ wallet_last_login_at: last_login_at
4167
+ wallet_balances: balances {
4168
+ __typename
4169
+ balances_owned_balance: owned_balance {
4170
+ __typename
4171
+ currency_amount_original_value: original_value
4172
+ currency_amount_original_unit: original_unit
4173
+ currency_amount_preferred_currency_unit: preferred_currency_unit
4174
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4175
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4176
+ }
4177
+ balances_available_to_send_balance: available_to_send_balance {
4178
+ __typename
4179
+ currency_amount_original_value: original_value
4180
+ currency_amount_original_unit: original_unit
4181
+ currency_amount_preferred_currency_unit: preferred_currency_unit
4182
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4183
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4184
+ }
4185
+ balances_available_to_withdraw_balance: available_to_withdraw_balance {
4186
+ __typename
4187
+ currency_amount_original_value: original_value
4188
+ currency_amount_original_unit: original_unit
4189
+ currency_amount_preferred_currency_unit: preferred_currency_unit
4190
+ currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
4191
+ currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
4192
+ }
4193
+ }
4194
+ wallet_third_party_identifier: third_party_identifier
4195
+ }
4196
+ }
4197
+ }
4198
+ }
4199
+ }
4200
+ `,
4201
+ variables: { first },
4202
+ constructObject: (json) => {
4203
+ const connection = json["current_account"]["wallets"];
4204
+ return AccountToWalletsConnectionFromJson(connection);
4205
+ }
4206
+ });
4207
+ }
3978
4208
  static getAccountQuery() {
3979
4209
  return {
3980
4210
  queryPayload: `
@@ -3986,7 +4216,7 @@ query GetAccount {
3986
4216
  }
3987
4217
  }
3988
4218
 
3989
- ${FRAGMENT15}
4219
+ ${FRAGMENT16}
3990
4220
  `,
3991
4221
  variables: {},
3992
4222
  constructObject: (data) => AccountFromJson(data.current_account)
@@ -4002,7 +4232,7 @@ var AccountFromJson = (obj) => {
4002
4232
  obj["account_name"]
4003
4233
  );
4004
4234
  };
4005
- var FRAGMENT15 = `
4235
+ var FRAGMENT16 = `
4006
4236
  fragment AccountFragment on Account {
4007
4237
  __typename
4008
4238
  account_id: id
@@ -4031,7 +4261,7 @@ var ChannelClosingTransactionFromJson = (obj) => {
4031
4261
  channelId: obj["channel_closing_transaction_channel"]?.id ?? void 0
4032
4262
  };
4033
4263
  };
4034
- var FRAGMENT16 = `
4264
+ var FRAGMENT17 = `
4035
4265
  fragment ChannelClosingTransactionFragment on ChannelClosingTransaction {
4036
4266
  __typename
4037
4267
  channel_closing_transaction_id: id
@@ -4075,7 +4305,7 @@ query GetChannelClosingTransaction($id: ID!) {
4075
4305
  }
4076
4306
  }
4077
4307
 
4078
- ${FRAGMENT16}
4308
+ ${FRAGMENT17}
4079
4309
  `,
4080
4310
  variables: { id },
4081
4311
  constructObject: (data) => ChannelClosingTransactionFromJson(data.entity)
@@ -4101,7 +4331,7 @@ var ChannelOpeningTransactionFromJson = (obj) => {
4101
4331
  channelId: obj["channel_opening_transaction_channel"]?.id ?? void 0
4102
4332
  };
4103
4333
  };
4104
- var FRAGMENT17 = `
4334
+ var FRAGMENT18 = `
4105
4335
  fragment ChannelOpeningTransactionFragment on ChannelOpeningTransaction {
4106
4336
  __typename
4107
4337
  channel_opening_transaction_id: id
@@ -4145,7 +4375,7 @@ query GetChannelOpeningTransaction($id: ID!) {
4145
4375
  }
4146
4376
  }
4147
4377
 
4148
- ${FRAGMENT17}
4378
+ ${FRAGMENT18}
4149
4379
  `,
4150
4380
  variables: { id },
4151
4381
  constructObject: (data) => ChannelOpeningTransactionFromJson(data.entity)
@@ -4180,7 +4410,7 @@ var DepositFromJson = (obj) => {
4180
4410
  numConfirmations: obj["deposit_num_confirmations"]
4181
4411
  };
4182
4412
  };
4183
- var FRAGMENT18 = `
4413
+ var FRAGMENT19 = `
4184
4414
  fragment DepositFragment on Deposit {
4185
4415
  __typename
4186
4416
  deposit_id: id
@@ -4224,7 +4454,7 @@ query GetDeposit($id: ID!) {
4224
4454
  }
4225
4455
  }
4226
4456
 
4227
- ${FRAGMENT18}
4457
+ ${FRAGMENT19}
4228
4458
  `,
4229
4459
  variables: { id },
4230
4460
  constructObject: (data) => DepositFromJson(data.entity)
@@ -4238,7 +4468,7 @@ var FeeEstimateFromJson = (obj) => {
4238
4468
  feeMin: CurrencyAmountFromJson(obj["fee_estimate_fee_min"])
4239
4469
  };
4240
4470
  };
4241
- var FRAGMENT19 = `
4471
+ var FRAGMENT20 = `
4242
4472
  fragment FeeEstimateFragment on FeeEstimate {
4243
4473
  __typename
4244
4474
  fee_estimate_fee_fast: fee_fast {
@@ -4271,7 +4501,7 @@ var InvoiceFromJson = (obj) => {
4271
4501
  amountPaid: !!obj["invoice_amount_paid"] ? CurrencyAmountFromJson(obj["invoice_amount_paid"]) : void 0
4272
4502
  };
4273
4503
  };
4274
- var FRAGMENT20 = `
4504
+ var FRAGMENT21 = `
4275
4505
  fragment InvoiceFragment on Invoice {
4276
4506
  __typename
4277
4507
  invoice_id: id
@@ -4435,7 +4665,7 @@ query GetInvoice($id: ID!) {
4435
4665
  }
4436
4666
  }
4437
4667
 
4438
- ${FRAGMENT20}
4668
+ ${FRAGMENT21}
4439
4669
  `,
4440
4670
  variables: { id },
4441
4671
  constructObject: (data) => InvoiceFromJson(data.entity)
@@ -4443,7 +4673,7 @@ ${FRAGMENT20}
4443
4673
  };
4444
4674
 
4445
4675
  // src/objects/LightningFeeEstimateOutput.ts
4446
- var FRAGMENT21 = `
4676
+ var FRAGMENT22 = `
4447
4677
  fragment LightningFeeEstimateOutputFragment on LightningFeeEstimateOutput {
4448
4678
  __typename
4449
4679
  lightning_fee_estimate_output_fee_estimate: fee_estimate {
@@ -4516,7 +4746,7 @@ var LightningTransactionFromJson = (obj) => {
4516
4746
  `Couldn't find a concrete type for interface LightningTransaction corresponding to the typename=${obj["__typename"]}`
4517
4747
  );
4518
4748
  };
4519
- var FRAGMENT22 = `
4749
+ var FRAGMENT23 = `
4520
4750
  fragment LightningTransactionFragment on LightningTransaction {
4521
4751
  __typename
4522
4752
  ... on IncomingPayment {
@@ -4769,7 +4999,7 @@ query GetLightningTransaction($id: ID!) {
4769
4999
  }
4770
5000
  }
4771
5001
 
4772
- ${FRAGMENT22}
5002
+ ${FRAGMENT23}
4773
5003
  `,
4774
5004
  variables: { id },
4775
5005
  constructObject: (data) => LightningTransactionFromJson(data.entity)
@@ -4856,7 +5086,7 @@ var OnChainTransactionFromJson = (obj) => {
4856
5086
  `Couldn't find a concrete type for interface OnChainTransaction corresponding to the typename=${obj["__typename"]}`
4857
5087
  );
4858
5088
  };
4859
- var FRAGMENT23 = `
5089
+ var FRAGMENT24 = `
4860
5090
  fragment OnChainTransactionFragment on OnChainTransaction {
4861
5091
  __typename
4862
5092
  ... on ChannelClosingTransaction {
@@ -4999,7 +5229,7 @@ query GetOnChainTransaction($id: ID!) {
4999
5229
  }
5000
5230
  }
5001
5231
 
5002
- ${FRAGMENT23}
5232
+ ${FRAGMENT24}
5003
5233
  `,
5004
5234
  variables: { id },
5005
5235
  constructObject: (data) => OnChainTransactionFromJson(data.entity)
@@ -5033,7 +5263,7 @@ var RoutingTransactionFromJson = (obj) => {
5033
5263
  failureReason: !!obj["routing_transaction_failure_reason"] ? RoutingTransactionFailureReason_default[obj["routing_transaction_failure_reason"]] ?? RoutingTransactionFailureReason_default.FUTURE_VALUE : null
5034
5264
  };
5035
5265
  };
5036
- var FRAGMENT24 = `
5266
+ var FRAGMENT25 = `
5037
5267
  fragment RoutingTransactionFragment on RoutingTransaction {
5038
5268
  __typename
5039
5269
  routing_transaction_id: id
@@ -5081,7 +5311,7 @@ query GetRoutingTransaction($id: ID!) {
5081
5311
  }
5082
5312
  }
5083
5313
 
5084
- ${FRAGMENT24}
5314
+ ${FRAGMENT25}
5085
5315
  `,
5086
5316
  variables: { id },
5087
5317
  constructObject: (data) => RoutingTransactionFromJson(data.entity)
@@ -5118,7 +5348,7 @@ var TransactionUpdateFromJson = (obj) => {
5118
5348
  transactionHash: obj["transaction_hash"]
5119
5349
  };
5120
5350
  };
5121
- var FRAGMENT25 = `
5351
+ var FRAGMENT26 = `
5122
5352
  fragment TransactionUpdateFragment on Transaction {
5123
5353
  __typename
5124
5354
  id
@@ -5170,7 +5400,7 @@ var WithdrawalFromJson = (obj) => {
5170
5400
  numConfirmations: obj["withdrawal_num_confirmations"]
5171
5401
  };
5172
5402
  };
5173
- var FRAGMENT26 = `
5403
+ var FRAGMENT27 = `
5174
5404
  fragment WithdrawalFragment on Withdrawal {
5175
5405
  __typename
5176
5406
  withdrawal_id: id
@@ -5214,7 +5444,7 @@ query GetWithdrawal($id: ID!) {
5214
5444
  }
5215
5445
  }
5216
5446
 
5217
- ${FRAGMENT26}
5447
+ ${FRAGMENT27}
5218
5448
  `,
5219
5449
  variables: { id },
5220
5450
  constructObject: (data) => WithdrawalFromJson(data.entity)
@@ -5222,7 +5452,7 @@ ${FRAGMENT26}
5222
5452
  };
5223
5453
 
5224
5454
  // src/objects/WithdrawalRequest.ts
5225
- import autoBind10 from "auto-bind";
5455
+ import autoBind11 from "auto-bind";
5226
5456
 
5227
5457
  // src/objects/WithdrawalRequestStatus.ts
5228
5458
  var WithdrawalRequestStatus = /* @__PURE__ */ ((WithdrawalRequestStatus2) => {
@@ -5270,7 +5500,7 @@ var WithdrawalRequest = class {
5270
5500
  this.estimatedAmount = estimatedAmount;
5271
5501
  this.completedAt = completedAt;
5272
5502
  this.withdrawalId = withdrawalId;
5273
- autoBind10(this);
5503
+ autoBind11(this);
5274
5504
  }
5275
5505
  async getChannelClosingTransactions(client, first = void 0) {
5276
5506
  return await client.executeRawQuery({
@@ -5407,7 +5637,7 @@ query GetWithdrawalRequest($id: ID!) {
5407
5637
  }
5408
5638
  }
5409
5639
 
5410
- ${FRAGMENT27}
5640
+ ${FRAGMENT28}
5411
5641
  `,
5412
5642
  variables: { id },
5413
5643
  constructObject: (data) => WithdrawalRequestFromJson(data.entity)
@@ -5429,7 +5659,7 @@ var WithdrawalRequestFromJson = (obj) => {
5429
5659
  obj["withdrawal_request_withdrawal"]?.id ?? void 0
5430
5660
  );
5431
5661
  };
5432
- var FRAGMENT27 = `
5662
+ var FRAGMENT28 = `
5433
5663
  fragment WithdrawalRequestFragment on WithdrawalRequest {
5434
5664
  __typename
5435
5665
  withdrawal_request_id: id
@@ -5462,11 +5692,12 @@ fragment WithdrawalRequestFragment on WithdrawalRequest {
5462
5692
  var WithdrawalRequest_default = WithdrawalRequest;
5463
5693
 
5464
5694
  export {
5695
+ __commonJS,
5465
5696
  CurrencyUnit_default,
5466
5697
  CurrencyAmountFromJson,
5467
5698
  FRAGMENT2 as FRAGMENT,
5468
5699
  FeeEstimateFromJson,
5469
- FRAGMENT19 as FRAGMENT2,
5700
+ FRAGMENT20 as FRAGMENT2,
5470
5701
  Permission_default,
5471
5702
  ApiTokenFromJson,
5472
5703
  FRAGMENT as FRAGMENT3,
@@ -5482,7 +5713,7 @@ export {
5482
5713
  Node_default,
5483
5714
  InvoiceDataFromJson,
5484
5715
  FRAGMENT7 as FRAGMENT4,
5485
- FRAGMENT21 as FRAGMENT5,
5716
+ FRAGMENT22 as FRAGMENT5,
5486
5717
  HtlcAttemptFailureCode_default,
5487
5718
  OutgoingPaymentAttemptStatus_default,
5488
5719
  getHopQuery,
@@ -5497,7 +5728,7 @@ export {
5497
5728
  getChannelClosingTransactionQuery,
5498
5729
  getChannelOpeningTransactionQuery,
5499
5730
  WithdrawalRequestFromJson,
5500
- FRAGMENT27 as FRAGMENT7,
5731
+ FRAGMENT28 as FRAGMENT7,
5501
5732
  WithdrawalRequest_default,
5502
5733
  IncomingPaymentAttemptStatus_default,
5503
5734
  getIncomingPaymentAttemptQuery,
@@ -5507,10 +5738,11 @@ export {
5507
5738
  FRAGMENT14 as FRAGMENT8,
5508
5739
  getTransactionQuery,
5509
5740
  TransactionUpdateFromJson,
5510
- FRAGMENT25 as FRAGMENT9,
5741
+ FRAGMENT26 as FRAGMENT9,
5511
5742
  AccountToChannelsConnection_default,
5512
5743
  PaymentRequestStatus_default,
5513
5744
  getPaymentRequestQuery,
5745
+ Wallet_default,
5514
5746
  Account_default,
5515
5747
  InvoiceType_default,
5516
5748
  getDepositQuery,