Skip to content

Updating SDKs with internal change of delete_login_factors mutation #223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -721,13 +721,15 @@ query FetchAccountToChannelsConnection(${'$'}bitcoin_network: BitcoinNetwork!, $
lightningNodeId: String? = null,
statuses: List<TransactionStatus>? = null,
excludeFailures: TransactionFailures? = null,
maxAmount: CurrencyAmountInput? = null,
minAmount: CurrencyAmountInput? = null,
): Query<AccountToTransactionsConnection> {
return Query(
queryPayload = """
query FetchAccountToTransactionsConnection(${'$'}first: Int, ${'$'}after: String, ${'$'}types: [TransactionType!], ${'$'}after_date: DateTime, ${'$'}before_date: DateTime, ${'$'}bitcoin_network: BitcoinNetwork, ${'$'}lightning_node_id: ID, ${'$'}statuses: [TransactionStatus!], ${'$'}exclude_failures: TransactionFailures) {
query FetchAccountToTransactionsConnection(${'$'}first: Int, ${'$'}after: String, ${'$'}types: [TransactionType!], ${'$'}after_date: DateTime, ${'$'}before_date: DateTime, ${'$'}bitcoin_network: BitcoinNetwork, ${'$'}lightning_node_id: ID, ${'$'}statuses: [TransactionStatus!], ${'$'}exclude_failures: TransactionFailures, ${'$'}max_amount: CurrencyAmountInput, ${'$'}min_amount: CurrencyAmountInput) {
current_account {
... on Account {
transactions(, first: ${'$'}first, after: ${'$'}after, types: ${'$'}types, after_date: ${'$'}after_date, before_date: ${'$'}before_date, bitcoin_network: ${'$'}bitcoin_network, lightning_node_id: ${'$'}lightning_node_id, statuses: ${'$'}statuses, exclude_failures: ${'$'}exclude_failures) {
transactions(, first: ${'$'}first, after: ${'$'}after, types: ${'$'}types, after_date: ${'$'}after_date, before_date: ${'$'}before_date, bitcoin_network: ${'$'}bitcoin_network, lightning_node_id: ${'$'}lightning_node_id, statuses: ${'$'}statuses, exclude_failures: ${'$'}exclude_failures, max_amount: ${'$'}max_amount, min_amount: ${'$'}min_amount) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There appears to be a stray comma in the transactions(, call that would cause a GraphQL syntax error. Please remove the comma after the opening parenthesis.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

type: __typename
account_to_transactions_connection_count: count
account_to_transactions_connection_page_info: page_info {
Expand Down Expand Up @@ -1326,6 +1328,8 @@ query FetchAccountToTransactionsConnection(${'$'}first: Int, ${'$'}after: String
add("lightning_node_id", lightningNodeId)
add("statuses", statuses)
add("exclude_failures", excludeFailures)
add("max_amount", maxAmount)
add("min_amount", minAmount)
}
) {
val connection =
Expand All @@ -1342,13 +1346,15 @@ query FetchAccountToTransactionsConnection(${'$'}first: Int, ${'$'}after: String
beforeDate: Instant? = null,
bitcoinNetwork: BitcoinNetwork? = null,
lightningNodeId: String? = null,
maxAmount: CurrencyAmountInput? = null,
minAmount: CurrencyAmountInput? = null,
): Query<AccountToPaymentRequestsConnection> {
return Query(
queryPayload = """
query FetchAccountToPaymentRequestsConnection(${'$'}first: Int, ${'$'}after: String, ${'$'}after_date: DateTime, ${'$'}before_date: DateTime, ${'$'}bitcoin_network: BitcoinNetwork, ${'$'}lightning_node_id: ID) {
query FetchAccountToPaymentRequestsConnection(${'$'}first: Int, ${'$'}after: String, ${'$'}after_date: DateTime, ${'$'}before_date: DateTime, ${'$'}bitcoin_network: BitcoinNetwork, ${'$'}lightning_node_id: ID, ${'$'}max_amount: CurrencyAmountInput, ${'$'}min_amount: CurrencyAmountInput) {
current_account {
... on Account {
payment_requests(, first: ${'$'}first, after: ${'$'}after, after_date: ${'$'}after_date, before_date: ${'$'}before_date, bitcoin_network: ${'$'}bitcoin_network, lightning_node_id: ${'$'}lightning_node_id) {
payment_requests(, first: ${'$'}first, after: ${'$'}after, after_date: ${'$'}after_date, before_date: ${'$'}before_date, bitcoin_network: ${'$'}bitcoin_network, lightning_node_id: ${'$'}lightning_node_id, max_amount: ${'$'}max_amount, min_amount: ${'$'}min_amount) {
type: __typename
account_to_payment_requests_connection_count: count
account_to_payment_requests_connection_page_info: page_info {
Expand Down Expand Up @@ -1681,6 +1687,8 @@ query FetchAccountToPaymentRequestsConnection(${'$'}first: Int, ${'$'}after: Str
add("before_date", beforeDate)
add("bitcoin_network", bitcoinNetwork)
add("lightning_node_id", lightningNodeId)
add("max_amount", maxAmount)
add("min_amount", minAmount)
}
) {
val connection =
Expand All @@ -1701,13 +1709,15 @@ query FetchAccountToPaymentRequestsConnection(${'$'}first: Int, ${'$'}after: Str
idempotencyKeys: List<String>? = null,
afterDate: Instant? = null,
beforeDate: Instant? = null,
maxAmount: CurrencyAmountInput? = null,
minAmount: CurrencyAmountInput? = null,
): Query<AccountToWithdrawalRequestsConnection> {
return Query(
queryPayload = """
query FetchAccountToWithdrawalRequestsConnection(${'$'}first: Int, ${'$'}after: String, ${'$'}bitcoin_networks: [BitcoinNetwork!], ${'$'}statuses: [WithdrawalRequestStatus!], ${'$'}node_ids: [ID!], ${'$'}idempotency_keys: [String!], ${'$'}after_date: DateTime, ${'$'}before_date: DateTime) {
query FetchAccountToWithdrawalRequestsConnection(${'$'}first: Int, ${'$'}after: String, ${'$'}bitcoin_networks: [BitcoinNetwork!], ${'$'}statuses: [WithdrawalRequestStatus!], ${'$'}node_ids: [ID!], ${'$'}idempotency_keys: [String!], ${'$'}after_date: DateTime, ${'$'}before_date: DateTime, ${'$'}max_amount: CurrencyAmountInput, ${'$'}min_amount: CurrencyAmountInput) {
current_account {
... on Account {
withdrawal_requests(, first: ${'$'}first, after: ${'$'}after, bitcoin_networks: ${'$'}bitcoin_networks, statuses: ${'$'}statuses, node_ids: ${'$'}node_ids, idempotency_keys: ${'$'}idempotency_keys, after_date: ${'$'}after_date, before_date: ${'$'}before_date) {
withdrawal_requests(, first: ${'$'}first, after: ${'$'}after, bitcoin_networks: ${'$'}bitcoin_networks, statuses: ${'$'}statuses, node_ids: ${'$'}node_ids, idempotency_keys: ${'$'}idempotency_keys, after_date: ${'$'}after_date, before_date: ${'$'}before_date, max_amount: ${'$'}max_amount, min_amount: ${'$'}min_amount) {
type: __typename
account_to_withdrawal_requests_connection_count: count
account_to_withdrawal_requests_connection_page_info: page_info {
Expand Down Expand Up @@ -1786,6 +1796,8 @@ query FetchAccountToWithdrawalRequestsConnection(${'$'}first: Int, ${'$'}after:
add("idempotency_keys", idempotencyKeys)
add("after_date", afterDate)
add("before_date", beforeDate)
add("max_amount", maxAmount)
add("min_amount", minAmount)
}
) {
val connection =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import kotlinx.serialization.Serializable
*
* @param nodeId The node from which to create the invoice.
* @param amountMsats The amount for which the invoice should be created, in millisatoshis. Setting the amount to 0 will allow the payer to specify an amount.
* @param expirySecs The expiry of the invoice in seconds. Default value is 86400 (1 day).
* @param expirySecs The expiry of the invoice in seconds. Default value is 86400 (1 day) for AMP invoice, or 3600 (1 hour) for STANDARD invoice.
* @param paymentHash The payment hash of the invoice. It should only be set if your node is a remote signing node. If not set, it will be requested through REMOTE_SIGNING webhooks with sub event type REQUEST_INVOICE_PAYMENT_HASH.
*/
@Serializable
@SerialName("CreateInvoiceInput")
Expand All @@ -20,6 +21,7 @@ data class CreateInvoiceInput(
val memo: String? = null,
val invoiceType: InvoiceType? = null,
val expirySecs: Int? = null,
val paymentHash: String? = null,
) {
companion object {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ import kotlinx.serialization.Serializable

/**
*
* @param localNodeId The local node from which to create the invoice.
* @param amountMsats The amount for which the invoice should be created, in millisatoshis. Setting the amount to 0 will allow the payer to specify an amount.
* @param memo An optional memo to include in the invoice.
* @param invoiceType The type of invoice to create.
*/
@Serializable
@SerialName("CreateTestModeInvoiceInput")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
@file:Suppress("ktlint:standard:max-line-length")

package com.lightspark.sdk.model

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

/**
*
*/
@Serializable
@SerialName("CurrencyAmountInput")
data class CurrencyAmountInput(
val value: Long,
val unit: CurrencyUnit,
) {
companion object {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ enum class CurrencyUnit(
/** Mexican Peso. **/
MXN("MXN"),

/** Philippine Peso. **/
PHP("PHP"),

/** 0.000000001 (10e-9) Bitcoin or a billionth of a Bitcoin. We recommend using the Satoshi unit instead when possible. **/
NANOBITCOIN("NANOBITCOIN"),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import kotlinx.serialization.Serializable
import kotlinx.serialization.json.decodeFromJsonElement

/**
* This object represents a BOLT #11 invoice (https://github.com/lightning/bolts/blob/master/11-payment-encoding.md) created by a Lightspark Node. You can retrieve this object to receive relevant payment information for a specific invoice generated by a Lightspark node.
* This object represents a Bolt #11 or Bolt #12 invoice created by a Lightspark Node. You can retrieve this object to receive relevant payment information for a specific invoice generated by a Lightspark node.
* @param id The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque string.
* @param createdAt The date and time when the entity was first created.
* @param updatedAt The date and time when the entity was last updated.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

/**
* This object represents the data associated with a BOLT #11 invoice. You can retrieve this object to receive the relevant data associated with a specific invoice.
* This object represents the data associated with a Bolt #11 or Bolt #12 invoice. You can retrieve this object to receive the relevant data associated with a specific invoice.
* @param paymentHash The payment hash of this invoice.
* @param amount The requested amount in this invoice. If it is equal to 0, the sender should choose the amount to send.
* @param createdAt The date and time when this invoice was created.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
@file:Suppress("ktlint:standard:max-line-length")

package com.lightspark.sdk.model

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

/**
*
* @param nodeId The node from where you want to send the payment.
* @param encodedInvoice The invoice you want to pay (as defined by the BOLT11 standard).
* @param timeoutSecs The timeout in seconds that we will try to make the payment.
* @param maximumFeesMsats The maximum amount of fees that you want to pay for this payment to be sent, expressed in msats.
* @param failureReason The failure reason to trigger for the payment. If not set, pay_invoice will be called.
* @param amountMsats The amount you will pay for this invoice, expressed in msats. It should ONLY be set when the invoice amount is zero.
* @param idempotencyKey The idempotency key of the request. The same result will be returned for the same idempotency key.
*/
@Serializable
@SerialName("PayTestModeInvoiceInput")
data class PayTestModeInvoiceInput(
val nodeId: String,
val encodedInvoice: String,
val timeoutSecs: Int,
val maximumFeesMsats: Long,
val failureReason: PaymentFailureReason? = null,
val amountMsats: Long? = null,
val idempotencyKey: String? = null,
) {
companion object {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package com.lightspark.sdk.model
import kotlinx.serialization.SerialName

/**
* This object is an interface of a payment request on the Lightning Network (i.e., a Lightning Invoice). It contains data related to parsing the payment details of a Lightning Invoice.
* This object is an interface of a payment request on the Lightning Network (i.e., Invoice or Bolt12Invoice). It contains data related to parsing the payment details of a Lightning Invoice.
*/
interface PaymentRequestData {
@SerialName("payment_request_data_encoded_payment_request")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ enum class CurrencyUnit(
/** Mexican Peso. **/
MXN("MXN"),

/** Philippine Peso. **/
PHP("PHP"),

/** 0.000000001 (10e-9) Bitcoin or a billionth of a Bitcoin. We recommend using the Satoshi unit instead when possible. **/
NANOBITCOIN("NANOBITCOIN"),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import kotlinx.serialization.Serializable
import kotlinx.serialization.json.decodeFromJsonElement

/**
* This object represents a BOLT #11 invoice (https://github.com/lightning/bolts/blob/master/11-payment-encoding.md) created by a Lightspark Node. You can retrieve this object to receive relevant payment information for a specific invoice generated by a Lightspark node.
* This object represents a Bolt #11 or Bolt #12 invoice created by a Lightspark Node. You can retrieve this object to receive relevant payment information for a specific invoice generated by a Lightspark node.
* @param id The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque string.
* @param createdAt The date and time when the entity was first created.
* @param updatedAt The date and time when the entity was last updated.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

/**
* This object represents the data associated with a BOLT #11 invoice. You can retrieve this object to receive the relevant data associated with a specific invoice.
* This object represents the data associated with a Bolt #11 or Bolt #12 invoice. You can retrieve this object to receive the relevant data associated with a specific invoice.
* @param paymentHash The payment hash of this invoice.
* @param amount The requested amount in this invoice. If it is equal to 0, the sender should choose the amount to send.
* @param createdAt The date and time when this invoice was created.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package com.lightspark.sdk.wallet.model
import kotlinx.serialization.SerialName

/**
* This object is an interface of a payment request on the Lightning Network (i.e., a Lightning Invoice). It contains data related to parsing the payment details of a Lightning Invoice.
* This object is an interface of a payment request on the Lightning Network (i.e., Invoice or Bolt12Invoice). It contains data related to parsing the payment details of a Lightning Invoice.
*/
interface PaymentRequestData {
@SerialName("payment_request_data_encoded_payment_request")
Expand Down