-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathConnection.py
More file actions
275 lines (265 loc) · 10.5 KB
/
Connection.py
File metadata and controls
275 lines (265 loc) · 10.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
# Copyright ©, 2022-present, Lightspark Group, Inc. - All Rights Reserved
from dataclasses import dataclass
from lightspark.requests.requester import Requester
from .PageInfo import PageInfo
@dataclass
class Connection:
requester: Requester
count: int
"""The total count of objects in this connection, using the current filters. It is different from the number of objects returned in the current page (in the `entities` field)."""
page_info: PageInfo
"""An object that holds pagination information about the objects in this connection."""
typename: str
FRAGMENT = """
fragment ConnectionFragment on Connection {
__typename
... on AccountToApiTokensConnection {
__typename
account_to_api_tokens_connection_count: count
account_to_api_tokens_connection_page_info: page_info {
__typename
page_info_has_next_page: has_next_page
page_info_has_previous_page: has_previous_page
page_info_start_cursor: start_cursor
page_info_end_cursor: end_cursor
}
account_to_api_tokens_connection_entities: entities {
id
}
}
... on AccountToChannelsConnection {
__typename
account_to_channels_connection_count: count
account_to_channels_connection_page_info: page_info {
__typename
page_info_has_next_page: has_next_page
page_info_has_previous_page: has_previous_page
page_info_start_cursor: start_cursor
page_info_end_cursor: end_cursor
}
account_to_channels_connection_entities: entities {
id
}
}
... on AccountToNodesConnection {
__typename
account_to_nodes_connection_count: count
account_to_nodes_connection_page_info: page_info {
__typename
page_info_has_next_page: has_next_page
page_info_has_previous_page: has_previous_page
page_info_start_cursor: start_cursor
page_info_end_cursor: end_cursor
}
account_to_nodes_connection_entities: entities {
id
}
}
... on AccountToPaymentRequestsConnection {
__typename
account_to_payment_requests_connection_count: count
account_to_payment_requests_connection_page_info: page_info {
__typename
page_info_has_next_page: has_next_page
page_info_has_previous_page: has_previous_page
page_info_start_cursor: start_cursor
page_info_end_cursor: end_cursor
}
account_to_payment_requests_connection_entities: entities {
id
}
}
... on AccountToTransactionsConnection {
__typename
account_to_transactions_connection_count: count
account_to_transactions_connection_page_info: page_info {
__typename
page_info_has_next_page: has_next_page
page_info_has_previous_page: has_previous_page
page_info_start_cursor: start_cursor
page_info_end_cursor: end_cursor
}
account_to_transactions_connection_profit_loss: profit_loss {
__typename
currency_amount_original_value: original_value
currency_amount_original_unit: original_unit
currency_amount_preferred_currency_unit: preferred_currency_unit
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
}
account_to_transactions_connection_average_fee_earned: average_fee_earned {
__typename
currency_amount_original_value: original_value
currency_amount_original_unit: original_unit
currency_amount_preferred_currency_unit: preferred_currency_unit
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
}
account_to_transactions_connection_total_amount_transacted: total_amount_transacted {
__typename
currency_amount_original_value: original_value
currency_amount_original_unit: original_unit
currency_amount_preferred_currency_unit: preferred_currency_unit
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
}
account_to_transactions_connection_entities: entities {
id
}
}
... on AccountToWalletsConnection {
__typename
account_to_wallets_connection_count: count
account_to_wallets_connection_page_info: page_info {
__typename
page_info_has_next_page: has_next_page
page_info_has_previous_page: has_previous_page
page_info_start_cursor: start_cursor
page_info_end_cursor: end_cursor
}
account_to_wallets_connection_entities: entities {
id
}
}
... on AccountToWithdrawalRequestsConnection {
__typename
account_to_withdrawal_requests_connection_count: count
account_to_withdrawal_requests_connection_page_info: page_info {
__typename
page_info_has_next_page: has_next_page
page_info_has_previous_page: has_previous_page
page_info_start_cursor: start_cursor
page_info_end_cursor: end_cursor
}
account_to_withdrawal_requests_connection_entities: entities {
id
}
}
... on IncomingPaymentToAttemptsConnection {
__typename
incoming_payment_to_attempts_connection_count: count
incoming_payment_to_attempts_connection_page_info: page_info {
__typename
page_info_has_next_page: has_next_page
page_info_has_previous_page: has_previous_page
page_info_start_cursor: start_cursor
page_info_end_cursor: end_cursor
}
incoming_payment_to_attempts_connection_entities: entities {
id
}
}
... on LightsparkNodeToChannelsConnection {
__typename
lightspark_node_to_channels_connection_count: count
lightspark_node_to_channels_connection_page_info: page_info {
__typename
page_info_has_next_page: has_next_page
page_info_has_previous_page: has_previous_page
page_info_start_cursor: start_cursor
page_info_end_cursor: end_cursor
}
lightspark_node_to_channels_connection_entities: entities {
id
}
}
... on OutgoingPaymentAttemptToHopsConnection {
__typename
outgoing_payment_attempt_to_hops_connection_count: count
outgoing_payment_attempt_to_hops_connection_page_info: page_info {
__typename
page_info_has_next_page: has_next_page
page_info_has_previous_page: has_previous_page
page_info_start_cursor: start_cursor
page_info_end_cursor: end_cursor
}
outgoing_payment_attempt_to_hops_connection_entities: entities {
id
}
}
... on OutgoingPaymentToAttemptsConnection {
__typename
outgoing_payment_to_attempts_connection_count: count
outgoing_payment_to_attempts_connection_page_info: page_info {
__typename
page_info_has_next_page: has_next_page
page_info_has_previous_page: has_previous_page
page_info_start_cursor: start_cursor
page_info_end_cursor: end_cursor
}
outgoing_payment_to_attempts_connection_entities: entities {
id
}
}
... on WalletToPaymentRequestsConnection {
__typename
wallet_to_payment_requests_connection_count: count
wallet_to_payment_requests_connection_page_info: page_info {
__typename
page_info_has_next_page: has_next_page
page_info_has_previous_page: has_previous_page
page_info_start_cursor: start_cursor
page_info_end_cursor: end_cursor
}
wallet_to_payment_requests_connection_entities: entities {
id
}
}
... on WalletToTransactionsConnection {
__typename
wallet_to_transactions_connection_count: count
wallet_to_transactions_connection_page_info: page_info {
__typename
page_info_has_next_page: has_next_page
page_info_has_previous_page: has_previous_page
page_info_start_cursor: start_cursor
page_info_end_cursor: end_cursor
}
wallet_to_transactions_connection_entities: entities {
id
}
}
... on WalletToWithdrawalRequestsConnection {
__typename
wallet_to_withdrawal_requests_connection_count: count
wallet_to_withdrawal_requests_connection_page_info: page_info {
__typename
page_info_has_next_page: has_next_page
page_info_has_previous_page: has_previous_page
page_info_start_cursor: start_cursor
page_info_end_cursor: end_cursor
}
wallet_to_withdrawal_requests_connection_entities: entities {
id
}
}
... on WithdrawalRequestToChannelClosingTransactionsConnection {
__typename
withdrawal_request_to_channel_closing_transactions_connection_count: count
withdrawal_request_to_channel_closing_transactions_connection_page_info: page_info {
__typename
page_info_has_next_page: has_next_page
page_info_has_previous_page: has_previous_page
page_info_start_cursor: start_cursor
page_info_end_cursor: end_cursor
}
withdrawal_request_to_channel_closing_transactions_connection_entities: entities {
id
}
}
... on WithdrawalRequestToChannelOpeningTransactionsConnection {
__typename
withdrawal_request_to_channel_opening_transactions_connection_count: count
withdrawal_request_to_channel_opening_transactions_connection_page_info: page_info {
__typename
page_info_has_next_page: has_next_page
page_info_has_previous_page: has_previous_page
page_info_start_cursor: start_cursor
page_info_end_cursor: end_cursor
}
withdrawal_request_to_channel_opening_transactions_connection_entities: entities {
id
}
}
}
"""