@lightsparkdev/lightspark-sdk 1.2.0 → 1.2.2

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 (57) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/{chunk-5RDIWPBE.js → chunk-D32EWIPX.js} +3 -1
  3. package/dist/{chunk-VTPDR6P4.js → chunk-GLL4KTUT.js} +353 -15
  4. package/dist/env.cjs +3 -1
  5. package/dist/env.d.cts +17 -0
  6. package/dist/env.js +2 -2
  7. package/dist/{index-f040db9f.d.ts → index-eb604025.d.ts} +1377 -15
  8. package/dist/index.cjs +682 -94
  9. package/dist/index.d.cts +41 -0
  10. package/dist/index.d.ts +3 -3
  11. package/dist/index.js +290 -37
  12. package/dist/objects/index.cjs +345 -5
  13. package/dist/objects/index.d.cts +4 -0
  14. package/dist/objects/index.d.ts +1 -1
  15. package/dist/objects/index.js +10 -2
  16. package/dist/{text-encoding-MDIPJAHL.js → text-encoding-26SMKBAQ.js} +3 -1
  17. package/package.json +4 -4
  18. package/src/auth/AccountTokenAuthProvider.ts +15 -11
  19. package/src/client.ts +201 -7
  20. package/src/graphql/ClaimUmaInvitation.ts +21 -0
  21. package/src/graphql/ClaimUmaInvitationWithIncentives.ts +25 -0
  22. package/src/graphql/CreateUmaInvitation.ts +19 -0
  23. package/src/graphql/CreateUmaInvitationWithIncentives.ts +23 -0
  24. package/src/graphql/FetchUmaInvitation.ts +15 -0
  25. package/src/helpers.ts +3 -1
  26. package/src/objects/Account.ts +8 -0
  27. package/src/objects/AccountToChannelsConnection.ts +5 -0
  28. package/src/objects/Channel.ts +31 -0
  29. package/src/objects/ClaimUmaInvitationInput.ts +26 -0
  30. package/src/objects/ClaimUmaInvitationOutput.ts +30 -0
  31. package/src/objects/ClaimUmaInvitationWithIncentivesInput.ts +44 -0
  32. package/src/objects/ClaimUmaInvitationWithIncentivesOutput.ts +33 -0
  33. package/src/objects/CreateInvitationWithIncentivesInput.ts +37 -0
  34. package/src/objects/CreateInvitationWithIncentivesOutput.ts +32 -0
  35. package/src/objects/CreateUmaInvitationInput.ts +22 -0
  36. package/src/objects/CreateUmaInvitationOutput.ts +30 -0
  37. package/src/objects/Entity.ts +13 -0
  38. package/src/objects/GraphNode.ts +28 -0
  39. package/src/objects/IncentivesIneligibilityReason.ts +24 -0
  40. package/src/objects/IncentivesStatus.ts +18 -0
  41. package/src/objects/IncomingPayment.ts +17 -0
  42. package/src/objects/LightsparkNodeWithOSK.ts +61 -0
  43. package/src/objects/LightsparkNodeWithRemoteSigning.ts +60 -0
  44. package/src/objects/OutgoingPayment.ts +20 -0
  45. package/src/objects/OutgoingPaymentAttempt.ts +31 -0
  46. package/src/objects/RegionCode.ts +510 -0
  47. package/src/objects/UmaInvitation.ts +113 -0
  48. package/src/objects/Wallet.ts +12 -0
  49. package/src/objects/WebhookEventType.ts +4 -0
  50. package/src/objects/WithdrawalRequest.ts +17 -0
  51. package/src/objects/index.ts +15 -0
  52. package/src/tests/integration/constants.ts +10 -0
  53. package/src/tests/integration/general-regtest.test.ts +633 -0
  54. package/src/tests/serialization.test.ts +5 -2
  55. package/src/webhooks.ts +1 -1
  56. package/src/tests/integration/client.test.ts +0 -207
  57. /package/dist/{chunk-NIMBE7W3.js → chunk-BMTV3EA2.js} +0 -0
@@ -0,0 +1,510 @@
1
+ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
+
3
+ /** The alpha-2 representation of a country, as defined by the ISO 3166-1 standard. **/
4
+ export enum RegionCode {
5
+ /**
6
+ * This is an enum value that represents values that could be added in the future.
7
+ * Clients should support unknown values as more of them could be added without notice.
8
+ */
9
+ FUTURE_VALUE = "FUTURE_VALUE",
10
+ /** The code representing the country of Afghanistan. **/
11
+ AF = "AF",
12
+ /** The code representing the country of Åland Islands. **/
13
+ AX = "AX",
14
+ /** The code representing the country of Albania. **/
15
+ AL = "AL",
16
+ /** The code representing the country of Algeria. **/
17
+ DZ = "DZ",
18
+ /** The code representing the country of American Samoa. **/
19
+ AS = "AS",
20
+ /** The code representing the country of Andorra. **/
21
+ AD = "AD",
22
+ /** The code representing the country of Angola. **/
23
+ AO = "AO",
24
+ /** The code representing the country of Anguilla. **/
25
+ AI = "AI",
26
+ /** The code representing the country of Antarctica. **/
27
+ AQ = "AQ",
28
+ /** The code representing the country of Antigua and Barbuda. **/
29
+ AG = "AG",
30
+ /** The code representing the country of Argentina. **/
31
+ AR = "AR",
32
+ /** The code representing the country of Armenia. **/
33
+ AM = "AM",
34
+ /** The code representing the country of Aruba. **/
35
+ AW = "AW",
36
+ /** The code representing the country of Australia. **/
37
+ AU = "AU",
38
+ /** The code representing the country of Austria. **/
39
+ AT = "AT",
40
+ /** The code representing the country of Azerbaijan. **/
41
+ AZ = "AZ",
42
+ /** The code representing the country of Bahamas. **/
43
+ BS = "BS",
44
+ /** The code representing the country of Bahrain. **/
45
+ BH = "BH",
46
+ /** The code representing the country of Bangladesh. **/
47
+ BD = "BD",
48
+ /** The code representing the country of Barbados. **/
49
+ BB = "BB",
50
+ /** The code representing the country of Belarus. **/
51
+ BY = "BY",
52
+ /** The code representing the country of Belgium. **/
53
+ BE = "BE",
54
+ /** The code representing the country of Belize. **/
55
+ BZ = "BZ",
56
+ /** The code representing the country of Benin. **/
57
+ BJ = "BJ",
58
+ /** The code representing the country of Bermuda. **/
59
+ BM = "BM",
60
+ /** The code representing the country of Bhutan. **/
61
+ BT = "BT",
62
+ /** The code representing the country of The Plurinational State of Bolivia. **/
63
+ BO = "BO",
64
+ /** The code representing the country of Bonaire, Sint Eustatius, and Saba. **/
65
+ BQ = "BQ",
66
+ /** The code representing the country of Bosnia and Herzegovina. **/
67
+ BA = "BA",
68
+ /** The code representing the country of Botswana. **/
69
+ BW = "BW",
70
+ /** The code representing the country of Bouvet Island. **/
71
+ BV = "BV",
72
+ /** The code representing the country of Brazil. **/
73
+ BR = "BR",
74
+ /** The code representing the country of British Indian Ocean Territory. **/
75
+ IO = "IO",
76
+ /** The code representing the country of Brunei Darussalam. **/
77
+ BN = "BN",
78
+ /** The code representing the country of Bulgaria. **/
79
+ BG = "BG",
80
+ /** The code representing the country of Burkina Faso. **/
81
+ BF = "BF",
82
+ /** The code representing the country of Burundi. **/
83
+ BI = "BI",
84
+ /** The code representing the country of Cambodia. **/
85
+ KH = "KH",
86
+ /** The code representing the country of Cameroon. **/
87
+ CM = "CM",
88
+ /** The code representing the country of Canada. **/
89
+ CA = "CA",
90
+ /** The code representing the country of Cape Verde. **/
91
+ CV = "CV",
92
+ /** The code representing the country of Cayman Islands. **/
93
+ KY = "KY",
94
+ /** The code representing the country of Central African Republic. **/
95
+ CF = "CF",
96
+ /** The code representing the country of Chad. **/
97
+ TD = "TD",
98
+ /** The code representing the country of Chile. **/
99
+ CL = "CL",
100
+ /** The code representing the country of China. **/
101
+ CN = "CN",
102
+ /** The code representing the country of Christmas Island. **/
103
+ CX = "CX",
104
+ /** The code representing the country of Cocos (Keeling) Islands. **/
105
+ CC = "CC",
106
+ /** The code representing the country of Colombia. **/
107
+ CO = "CO",
108
+ /** The code representing the country of Comoros. **/
109
+ KM = "KM",
110
+ /** The code representing the country of Congo. **/
111
+ CG = "CG",
112
+ /** The code representing the country of The Democratic Republic of the Congo. **/
113
+ CD = "CD",
114
+ /** The code representing the country of Cook Islands. **/
115
+ CK = "CK",
116
+ /** The code representing the country of Costa Rica. **/
117
+ CR = "CR",
118
+ /** The code representing the country of Côte d'Ivoire. **/
119
+ CI = "CI",
120
+ /** The code representing the country of Croatia. **/
121
+ HR = "HR",
122
+ /** The code representing the country of Cuba. **/
123
+ CU = "CU",
124
+ /** The code representing the country of Curaçao. **/
125
+ CW = "CW",
126
+ /** The code representing the country of Cyprus. **/
127
+ CY = "CY",
128
+ /** The code representing the country of Czech Republic. **/
129
+ CZ = "CZ",
130
+ /** The code representing the country of Denmark. **/
131
+ DK = "DK",
132
+ /** The code representing the country of Djibouti. **/
133
+ DJ = "DJ",
134
+ /** The code representing the country of Dominica. **/
135
+ DM = "DM",
136
+ /** The code representing the country of Dominican Republic. **/
137
+ DO = "DO",
138
+ /** The code representing the country of Ecuador. **/
139
+ EC = "EC",
140
+ /** The code representing the country of Egypt. **/
141
+ EG = "EG",
142
+ /** The code representing the country of El Salvador. **/
143
+ SV = "SV",
144
+ /** The code representing the country of Equatorial Guinea. **/
145
+ GQ = "GQ",
146
+ /** The code representing the country of Eritrea. **/
147
+ ER = "ER",
148
+ /** The code representing the country of Estonia. **/
149
+ EE = "EE",
150
+ /** The code representing the country of Ethiopia. **/
151
+ ET = "ET",
152
+ /** The code representing the country of Falkland Islands (Malvinas). **/
153
+ FK = "FK",
154
+ /** The code representing the country of Faroe Islands. **/
155
+ FO = "FO",
156
+ /** The code representing the country of Fiji. **/
157
+ FJ = "FJ",
158
+ /** The code representing the country of Finland. **/
159
+ FI = "FI",
160
+ /** The code representing the country of France. **/
161
+ FR = "FR",
162
+ /** The code representing the country of French Guiana. **/
163
+ GF = "GF",
164
+ /** The code representing the country of French Polynesia. **/
165
+ PF = "PF",
166
+ /** The code representing the country of French Southern Territories. **/
167
+ TF = "TF",
168
+ /** The code representing the country of Gabon. **/
169
+ GA = "GA",
170
+ /** The code representing the country of Gambia. **/
171
+ GM = "GM",
172
+ /** The code representing the country of Georgia. **/
173
+ GE = "GE",
174
+ /** The code representing the country of Germany. **/
175
+ DE = "DE",
176
+ /** The code representing the country of Ghana. **/
177
+ GH = "GH",
178
+ /** The code representing the country of Gibraltar. **/
179
+ GI = "GI",
180
+ /** The code representing the country of Greece. **/
181
+ GR = "GR",
182
+ /** The code representing the country of Greenland. **/
183
+ GL = "GL",
184
+ /** The code representing the country of Grenada. **/
185
+ GD = "GD",
186
+ /** The code representing the country of Guadeloupe. **/
187
+ GP = "GP",
188
+ /** The code representing the country of Guam. **/
189
+ GU = "GU",
190
+ /** The code representing the country of Guatemala. **/
191
+ GT = "GT",
192
+ /** The code representing the country of Guernsey. **/
193
+ GG = "GG",
194
+ /** The code representing the country of Guinea. **/
195
+ GN = "GN",
196
+ /** The code representing the country of Guinea-Bissau. **/
197
+ GW = "GW",
198
+ /** The code representing the country of Guyana. **/
199
+ GY = "GY",
200
+ /** The code representing the country of Haiti. **/
201
+ HT = "HT",
202
+ /** The code representing the country of Heard Island and McDonald Islands. **/
203
+ HM = "HM",
204
+ /** The code representing the country of Holy See (Vatican City State). **/
205
+ VA = "VA",
206
+ /** The code representing the country of Honduras. **/
207
+ HN = "HN",
208
+ /** The code representing the country of Hong Kong. **/
209
+ HK = "HK",
210
+ /** The code representing the country of Hungary. **/
211
+ HU = "HU",
212
+ /** The code representing the country of Iceland. **/
213
+ IS = "IS",
214
+ /** The code representing the country of India. **/
215
+ IN = "IN",
216
+ /** The code representing the country of Indonesia. **/
217
+ ID = "ID",
218
+ /** The code representing the country of Islamic Republic of Iran. **/
219
+ IR = "IR",
220
+ /** The code representing the country of Iraq. **/
221
+ IQ = "IQ",
222
+ /** The code representing the country of Ireland. **/
223
+ IE = "IE",
224
+ /** The code representing the country of Isle of Man. **/
225
+ IM = "IM",
226
+ /** The code representing the country of Israel. **/
227
+ IL = "IL",
228
+ /** The code representing the country of Italy. **/
229
+ IT = "IT",
230
+ /** The code representing the country of Jamaica. **/
231
+ JM = "JM",
232
+ /** The code representing the country of Japan. **/
233
+ JP = "JP",
234
+ /** The code representing the country of Jersey. **/
235
+ JE = "JE",
236
+ /** The code representing the country of Jordan. **/
237
+ JO = "JO",
238
+ /** The code representing the country of Kazakhstan. **/
239
+ KZ = "KZ",
240
+ /** The code representing the country of Kenya. **/
241
+ KE = "KE",
242
+ /** The code representing the country of Kiribati. **/
243
+ KI = "KI",
244
+ /** The code representing the country of Democratic People's Republic ofKorea. **/
245
+ KP = "KP",
246
+ /** The code representing the country of Republic of Korea. **/
247
+ KR = "KR",
248
+ /** The code representing the country of Kuwait. **/
249
+ KW = "KW",
250
+ /** The code representing the country of Kyrgyzstan. **/
251
+ KG = "KG",
252
+ /** The code representing the country of Lao People's Democratic Republic. **/
253
+ LA = "LA",
254
+ /** The code representing the country of Latvia. **/
255
+ LV = "LV",
256
+ /** The code representing the country of Lebanon. **/
257
+ LB = "LB",
258
+ /** The code representing the country of Lesotho. **/
259
+ LS = "LS",
260
+ /** The code representing the country of Liberia. **/
261
+ LR = "LR",
262
+ /** The code representing the country of Libya. **/
263
+ LY = "LY",
264
+ /** The code representing the country of Liechtenstein. **/
265
+ LI = "LI",
266
+ /** The code representing the country of Lithuania. **/
267
+ LT = "LT",
268
+ /** The code representing the country of Luxembourg. **/
269
+ LU = "LU",
270
+ /** The code representing the country of Macao. **/
271
+ MO = "MO",
272
+ /** The code representing the country of The Former Yugoslav Republic of Macedonia. **/
273
+ MK = "MK",
274
+ /** The code representing the country of Madagascar. **/
275
+ MG = "MG",
276
+ /** The code representing the country of Malawi. **/
277
+ MW = "MW",
278
+ /** The code representing the country of Malaysia. **/
279
+ MY = "MY",
280
+ /** The code representing the country of Maldives. **/
281
+ MV = "MV",
282
+ /** The code representing the country of Mali. **/
283
+ ML = "ML",
284
+ /** The code representing the country of Malta. **/
285
+ MT = "MT",
286
+ /** The code representing the country of Marshall Islands. **/
287
+ MH = "MH",
288
+ /** The code representing the country of Martinique. **/
289
+ MQ = "MQ",
290
+ /** The code representing the country of Mauritania. **/
291
+ MR = "MR",
292
+ /** The code representing the country of Mauritius. **/
293
+ MU = "MU",
294
+ /** The code representing the country of Mayotte. **/
295
+ YT = "YT",
296
+ /** The code representing the country of Mexico. **/
297
+ MX = "MX",
298
+ /** The code representing the country of Federated States ofMicronesia. **/
299
+ FM = "FM",
300
+ /** The code representing the country of Republic of Moldova. **/
301
+ MD = "MD",
302
+ /** The code representing the country of Monaco. **/
303
+ MC = "MC",
304
+ /** The code representing the country of Mongolia. **/
305
+ MN = "MN",
306
+ /** The code representing the country of Montenegro. **/
307
+ ME = "ME",
308
+ /** The code representing the country of Montserrat. **/
309
+ MS = "MS",
310
+ /** The code representing the country of Morocco. **/
311
+ MA = "MA",
312
+ /** The code representing the country of Mozambique. **/
313
+ MZ = "MZ",
314
+ /** The code representing the country of Myanmar. **/
315
+ MM = "MM",
316
+ /** The code representing the country of Namibia. **/
317
+ NA = "NA",
318
+ /** The code representing the country of Nauru. **/
319
+ NR = "NR",
320
+ /** The code representing the country of Nepal. **/
321
+ NP = "NP",
322
+ /** The code representing the country of Netherlands. **/
323
+ NL = "NL",
324
+ /** The code representing the country of New Caledonia. **/
325
+ NC = "NC",
326
+ /** The code representing the country of New Zealand. **/
327
+ NZ = "NZ",
328
+ /** The code representing the country of Nicaragua. **/
329
+ NI = "NI",
330
+ /** The code representing the country of Niger. **/
331
+ NE = "NE",
332
+ /** The code representing the country of Nigeria. **/
333
+ NG = "NG",
334
+ /** The code representing the country of Niue. **/
335
+ NU = "NU",
336
+ /** The code representing the country of Norfolk Island. **/
337
+ NF = "NF",
338
+ /** The code representing the country of Northern Mariana Islands. **/
339
+ MP = "MP",
340
+ /** The code representing the country of Norway. **/
341
+ NO = "NO",
342
+ /** The code representing the country of Oman. **/
343
+ OM = "OM",
344
+ /** The code representing the country of Pakistan. **/
345
+ PK = "PK",
346
+ /** The code representing the country of Palau. **/
347
+ PW = "PW",
348
+ /** The code representing the country of State of Palestine. **/
349
+ PS = "PS",
350
+ /** The code representing the country of Panama. **/
351
+ PA = "PA",
352
+ /** The code representing the country of Papua New Guinea. **/
353
+ PG = "PG",
354
+ /** The code representing the country of Paraguay. **/
355
+ PY = "PY",
356
+ /** The code representing the country of Peru. **/
357
+ PE = "PE",
358
+ /** The code representing the country of Philippines. **/
359
+ PH = "PH",
360
+ /** The code representing the country of Pitcairn. **/
361
+ PN = "PN",
362
+ /** The code representing the country of Poland. **/
363
+ PL = "PL",
364
+ /** The code representing the country of Portugal. **/
365
+ PT = "PT",
366
+ /** The code representing the country of Puerto Rico. **/
367
+ PR = "PR",
368
+ /** The code representing the country of Qatar. **/
369
+ QA = "QA",
370
+ /** The code representing the country of Réunion. **/
371
+ RE = "RE",
372
+ /** The code representing the country of Romania. **/
373
+ RO = "RO",
374
+ /** The code representing the country of Russian Federation. **/
375
+ RU = "RU",
376
+ /** The code representing the country of Rwanda. **/
377
+ RW = "RW",
378
+ /** The code representing the country of Saint Barthélemy. **/
379
+ BL = "BL",
380
+ /** The code representing the country of Saint Helena Ascension and Tristan da Cunha. **/
381
+ SH = "SH",
382
+ /** The code representing the country of Saint Kitts and Nevis. **/
383
+ KN = "KN",
384
+ /** The code representing the country of Saint Lucia. **/
385
+ LC = "LC",
386
+ /** The code representing the country of Saint Martin (French part). **/
387
+ MF = "MF",
388
+ /** The code representing the country of Saint Pierre and Miquelon. **/
389
+ PM = "PM",
390
+ /** The code representing the country of Saint Vincent and the Grenadines. **/
391
+ VC = "VC",
392
+ /** The code representing the country of Samoa. **/
393
+ WS = "WS",
394
+ /** The code representing the country of San Marino. **/
395
+ SM = "SM",
396
+ /** The code representing the country of Sao Tome and Principe. **/
397
+ ST = "ST",
398
+ /** The code representing the country of Saudi Arabia. **/
399
+ SA = "SA",
400
+ /** The code representing the country of Senegal. **/
401
+ SN = "SN",
402
+ /** The code representing the country of Serbia. **/
403
+ RS = "RS",
404
+ /** The code representing the country of Seychelles. **/
405
+ SC = "SC",
406
+ /** The code representing the country of Sierra Leone. **/
407
+ SL = "SL",
408
+ /** The code representing the country of Singapore. **/
409
+ SG = "SG",
410
+ /** The code representing the country of Sint Maarten (Dutch part). **/
411
+ SX = "SX",
412
+ /** The code representing the country of Slovakia. **/
413
+ SK = "SK",
414
+ /** The code representing the country of Slovenia. **/
415
+ SI = "SI",
416
+ /** The code representing the country of Solomon Islands. **/
417
+ SB = "SB",
418
+ /** The code representing the country of Somalia. **/
419
+ SO = "SO",
420
+ /** The code representing the country of South Africa. **/
421
+ ZA = "ZA",
422
+ /** The code representing the country of South Georgia and the South Sandwich Islands. **/
423
+ GS = "GS",
424
+ /** The code representing the country of South Sudan. **/
425
+ SS = "SS",
426
+ /** The code representing the country of Spain. **/
427
+ ES = "ES",
428
+ /** The code representing the country of Sri Lanka. **/
429
+ LK = "LK",
430
+ /** The code representing the country of Sudan. **/
431
+ SD = "SD",
432
+ /** The code representing the country of Suriname. **/
433
+ SR = "SR",
434
+ /** The code representing the country of Svalbard and Jan Mayen. **/
435
+ SJ = "SJ",
436
+ /** The code representing the country of Swaziland. **/
437
+ SZ = "SZ",
438
+ /** The code representing the country of Sweden. **/
439
+ SE = "SE",
440
+ /** The code representing the country of Switzerland. **/
441
+ CH = "CH",
442
+ /** The code representing the country of Syrian Arab Republic. **/
443
+ SY = "SY",
444
+ /** The code representing the country of Taiwan, Province of China. **/
445
+ TW = "TW",
446
+ /** The code representing the country of Tajikistan. **/
447
+ TJ = "TJ",
448
+ /** The code representing the country of United Republic of Tanzania. **/
449
+ TZ = "TZ",
450
+ /** The code representing the country of Thailand. **/
451
+ TH = "TH",
452
+ /** The code representing the country of Timor-Leste. **/
453
+ TL = "TL",
454
+ /** The code representing the country of Togo. **/
455
+ TG = "TG",
456
+ /** The code representing the country of Tokelau. **/
457
+ TK = "TK",
458
+ /** The code representing the country of Tonga. **/
459
+ TO = "TO",
460
+ /** The code representing the country of Trinidad and Tobago. **/
461
+ TT = "TT",
462
+ /** The code representing the country of Tunisia. **/
463
+ TN = "TN",
464
+ /** The code representing the country of Turkey. **/
465
+ TR = "TR",
466
+ /** The code representing the country of Turkmenistan. **/
467
+ TM = "TM",
468
+ /** The code representing the country of Turks and Caicos Islands. **/
469
+ TC = "TC",
470
+ /** The code representing the country of Tuvalu. **/
471
+ TV = "TV",
472
+ /** The code representing the country of Uganda. **/
473
+ UG = "UG",
474
+ /** The code representing the country of Ukraine. **/
475
+ UA = "UA",
476
+ /** The code representing the country of United Arab Emirates. **/
477
+ AE = "AE",
478
+ /** The code representing the country of United Kingdom. **/
479
+ GB = "GB",
480
+ /** The code representing the country of United States. **/
481
+ US = "US",
482
+ /** The code representing the country of United States Minor Outlying Islands. **/
483
+ UM = "UM",
484
+ /** The code representing the country of Uruguay. **/
485
+ UY = "UY",
486
+ /** The code representing the country of Uzbekistan. **/
487
+ UZ = "UZ",
488
+ /** The code representing the country of Vanuatu. **/
489
+ VU = "VU",
490
+ /** The code representing the country of Bolivarian Republic of Venezuela. **/
491
+ VE = "VE",
492
+ /** The code representing the country of Viet Nam. **/
493
+ VN = "VN",
494
+ /** The code representing the country of British Virgin Islands. **/
495
+ VG = "VG",
496
+ /** The code representing the country of U.S. Virgin Islands. **/
497
+ VI = "VI",
498
+ /** The code representing the country of Wallis and Futuna. **/
499
+ WF = "WF",
500
+ /** The code representing the country of Western Sahara. **/
501
+ EH = "EH",
502
+ /** The code representing the country of Yemen. **/
503
+ YE = "YE",
504
+ /** The code representing the country of Zambia. **/
505
+ ZM = "ZM",
506
+ /** The code representing the country of Zimbabwe. **/
507
+ ZW = "ZW",
508
+ }
509
+
510
+ export default RegionCode;
@@ -0,0 +1,113 @@
1
+ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
+
3
+ import { type Query } from "@lightsparkdev/core";
4
+ import IncentivesIneligibilityReason from "./IncentivesIneligibilityReason.js";
5
+ import IncentivesStatus from "./IncentivesStatus.js";
6
+
7
+ /** This is an object representing an UMA.ME invitation. **/
8
+ interface UmaInvitation {
9
+ /**
10
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
11
+ * string.
12
+ **/
13
+ id: string;
14
+
15
+ /** The date and time when the entity was first created. **/
16
+ createdAt: string;
17
+
18
+ /** The date and time when the entity was last updated. **/
19
+ updatedAt: string;
20
+
21
+ /** The code that uniquely identifies this invitation. **/
22
+ code: string;
23
+
24
+ /** The URL where this invitation can be claimed. **/
25
+ url: string;
26
+
27
+ /** The UMA of the user who created the invitation. **/
28
+ inviterUma: string;
29
+
30
+ /** The current status of the incentives that may be tied to this invitation. **/
31
+ incentivesStatus: IncentivesStatus;
32
+
33
+ /** The typename of the object **/
34
+ typename: string;
35
+
36
+ /** The UMA of the user who claimed the invitation. **/
37
+ inviteeUma?: string | undefined;
38
+
39
+ /** The reason why the invitation is not eligible for incentives, if applicable. **/
40
+ incentivesIneligibilityReason?: IncentivesIneligibilityReason | undefined;
41
+ }
42
+
43
+ export const UmaInvitationFromJson = (obj: any): UmaInvitation => {
44
+ return {
45
+ id: obj["uma_invitation_id"],
46
+ createdAt: obj["uma_invitation_created_at"],
47
+ updatedAt: obj["uma_invitation_updated_at"],
48
+ code: obj["uma_invitation_code"],
49
+ url: obj["uma_invitation_url"],
50
+ inviterUma: obj["uma_invitation_inviter_uma"],
51
+ incentivesStatus:
52
+ IncentivesStatus[obj["uma_invitation_incentives_status"]] ??
53
+ IncentivesStatus.FUTURE_VALUE,
54
+ typename: "UmaInvitation",
55
+ inviteeUma: obj["uma_invitation_invitee_uma"],
56
+ incentivesIneligibilityReason: !!obj[
57
+ "uma_invitation_incentives_ineligibility_reason"
58
+ ]
59
+ ? IncentivesIneligibilityReason[
60
+ obj["uma_invitation_incentives_ineligibility_reason"]
61
+ ] ?? IncentivesIneligibilityReason.FUTURE_VALUE
62
+ : null,
63
+ } as UmaInvitation;
64
+ };
65
+ export const UmaInvitationToJson = (obj: UmaInvitation): any => {
66
+ return {
67
+ __typename: "UmaInvitation",
68
+ uma_invitation_id: obj.id,
69
+ uma_invitation_created_at: obj.createdAt,
70
+ uma_invitation_updated_at: obj.updatedAt,
71
+ uma_invitation_code: obj.code,
72
+ uma_invitation_url: obj.url,
73
+ uma_invitation_inviter_uma: obj.inviterUma,
74
+ uma_invitation_invitee_uma: obj.inviteeUma,
75
+ uma_invitation_incentives_status: obj.incentivesStatus,
76
+ uma_invitation_incentives_ineligibility_reason:
77
+ obj.incentivesIneligibilityReason,
78
+ };
79
+ };
80
+
81
+ export const FRAGMENT = `
82
+ fragment UmaInvitationFragment on UmaInvitation {
83
+ __typename
84
+ uma_invitation_id: id
85
+ uma_invitation_created_at: created_at
86
+ uma_invitation_updated_at: updated_at
87
+ uma_invitation_code: code
88
+ uma_invitation_url: url
89
+ uma_invitation_inviter_uma: inviter_uma
90
+ uma_invitation_invitee_uma: invitee_uma
91
+ uma_invitation_incentives_status: incentives_status
92
+ uma_invitation_incentives_ineligibility_reason: incentives_ineligibility_reason
93
+ }`;
94
+
95
+ export const getUmaInvitationQuery = (id: string): Query<UmaInvitation> => {
96
+ return {
97
+ queryPayload: `
98
+ query GetUmaInvitation($id: ID!) {
99
+ entity(id: $id) {
100
+ ... on UmaInvitation {
101
+ ...UmaInvitationFragment
102
+ }
103
+ }
104
+ }
105
+
106
+ ${FRAGMENT}
107
+ `,
108
+ variables: { id },
109
+ constructObject: (data: any) => UmaInvitationFromJson(data.entity),
110
+ };
111
+ };
112
+
113
+ export default UmaInvitation;
@@ -20,14 +20,26 @@ import { WalletToTransactionsConnectionFromJson } from "./WalletToTransactionsCo
20
20
  /** This object represents a Lightspark Wallet, tied to your Lightspark account. Wallets can be used to send or receive funds over the Lightning Network. You can retrieve this object to receive information about a specific wallet tied to your Lightspark account. **/
21
21
  class Wallet implements LightsparkNodeOwner, Entity {
22
22
  constructor(
23
+ /**
24
+ * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
25
+ * string.
26
+ **/
23
27
  public readonly id: string,
28
+ /** The date and time when the entity was first created. **/
24
29
  public readonly createdAt: string,
30
+ /** The date and time when the entity was last updated. **/
25
31
  public readonly updatedAt: string,
32
+ /** The unique identifier of this wallet, as provided by the Lightspark Customer during login. **/
26
33
  public readonly thirdPartyIdentifier: string,
34
+ /** The status of this wallet. **/
27
35
  public readonly status: WalletStatus,
36
+ /** The typename of the object **/
28
37
  public readonly typename: string,
38
+ /** The date and time when the wallet user last logged in. **/
29
39
  public readonly lastLoginAt?: string | undefined,
40
+ /** The balances that describe the funds in this wallet. **/
30
41
  public readonly balances?: Balances | undefined,
42
+ /** The account this wallet belongs to. **/
31
43
  public readonly accountId?: string | undefined,
32
44
  ) {
33
45
  autoBind(this);
@@ -10,12 +10,16 @@ export enum WebhookEventType {
10
10
 
11
11
  PAYMENT_FINISHED = "PAYMENT_FINISHED",
12
12
 
13
+ FORCE_CLOSURE = "FORCE_CLOSURE",
14
+
13
15
  WITHDRAWAL_FINISHED = "WITHDRAWAL_FINISHED",
14
16
 
15
17
  FUNDS_RECEIVED = "FUNDS_RECEIVED",
16
18
 
17
19
  NODE_STATUS = "NODE_STATUS",
18
20
 
21
+ UMA_INVITATION_CLAIMED = "UMA_INVITATION_CLAIMED",
22
+
19
23
  WALLET_STATUS = "WALLET_STATUS",
20
24
 
21
25
  WALLET_OUTGOING_PAYMENT_FINISHED = "WALLET_OUTGOING_PAYMENT_FINISHED",