nordlet 0.6.4 → 0.6.5

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 (34) hide show
  1. checksums.yaml +4 -4
  2. data/lib/nordlet/account/client.rb +252 -19
  3. data/lib/nordlet/account/types/api_keys_list_account_response_rows_item.rb +2 -0
  4. data/lib/nordlet/account/types/export_account_response.rb +8 -0
  5. data/lib/nordlet/account/types/export_account_response_api_keys_item.rb +25 -0
  6. data/lib/nordlet/account/types/export_account_response_auth_events_item.rb +17 -0
  7. data/lib/nordlet/account/types/export_account_response_oauth_grants_item.rb +17 -0
  8. data/lib/nordlet/account/types/export_account_response_referral_points_item.rb +15 -0
  9. data/lib/nordlet/account/types/invites_accept_account_response.rb +2 -0
  10. data/lib/nordlet/account/types/login_link_consume_account_response.rb +2 -0
  11. data/lib/nordlet/account/types/two_factor_disable_account_request.rb +11 -0
  12. data/lib/nordlet/account/types/two_factor_disable_account_response.rb +11 -0
  13. data/lib/nordlet/account/types/two_factor_enable_account_request.rb +11 -0
  14. data/lib/nordlet/account/types/two_factor_enable_account_response.rb +11 -0
  15. data/lib/nordlet/account/types/two_factor_get_account_request.rb +9 -0
  16. data/lib/nordlet/account/types/two_factor_get_account_response.rb +17 -0
  17. data/lib/nordlet/account/types/two_factor_get_account_response_setup.rb +13 -0
  18. data/lib/nordlet/account/types/two_factor_recovery_codes_regenerate_account_request.rb +11 -0
  19. data/lib/nordlet/account/types/two_factor_recovery_codes_regenerate_account_response.rb +11 -0
  20. data/lib/nordlet/account/types/two_factor_setup_account_request.rb +9 -0
  21. data/lib/nordlet/account/types/two_factor_setup_account_response.rb +13 -0
  22. data/lib/nordlet/account/types/two_factor_verify_account_request.rb +11 -0
  23. data/lib/nordlet/account/types/two_factor_verify_account_response.rb +11 -0
  24. data/lib/nordlet/declarations/types/configs_list_declarations_response_rows_item_fields_item_kind.rb +1 -0
  25. data/lib/nordlet/declarations/types/configs_update_declarations_response_fields_item_kind.rb +1 -0
  26. data/lib/nordlet/peppol/client.rb +4 -1
  27. data/lib/nordlet/version.rb +1 -1
  28. data/lib/nordlet/webhooks/client.rb +41 -2
  29. data/lib/nordlet/webhooks/types/subscriptions_rotate_secret_webhooks_request.rb +13 -0
  30. data/lib/nordlet/webhooks/types/subscriptions_rotate_secret_webhooks_response.rb +31 -0
  31. data/lib/nordlet/webhooks/types/subscriptions_rotate_secret_webhooks_response_last_delivery_status.rb +15 -0
  32. data/lib/nordlet.rb +20 -0
  33. data/reference.md +437 -11
  34. metadata +22 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b2a99ed314ff319f8fd9de0fd3e84da6fe728abef2f14178af59de3cb711b35e
4
- data.tar.gz: 74d13ec231b2c9e75520f436b86b1331573f765c9732d3bd38ed383ddd69977e
3
+ metadata.gz: a3eb06f95a095c09229898cf71175e3cdc73b61072d6c4c790a25a39bd085f8c
4
+ data.tar.gz: 0bada22e90026192c0445db1837e436d652a58da5a6c1dc69e5f2e07db9184dd
5
5
  SHA512:
6
- metadata.gz: 62ffe629b4adbf005e397204075c5c9430e06e464b5fd3f909c74c10e9d5ba695e9e0515bebc9949df45cafa89f01c10afd7956ee26aad7822214fbcebc7d6f5
7
- data.tar.gz: 924f9b264f0de2f1d55f1a54182bfd7ef1b2ca67c18d97cebc1904741216c6aa5b4b67cec9b5347969b53e333d87bf9544c80e221561bd81ff137e2ed59a95c5
6
+ metadata.gz: a95d1939c1e2fc13246107e919016ea570d78e3ee3bd49117246090fd811dd10afdc946c45d2191f3bca655e0d334d1daed01fdf769c22b8d6167c3b9d4a6fdc
7
+ data.tar.gz: 5777cd07f820ab3fb8b3ffe70c9e57158d599e43bcb6c56c73fb9a164ffe0659eb980299a2d5fe36f907fe1049d4d84ccac8deca55256dcb6011ffaff4cea0dc
@@ -12,9 +12,11 @@ module Nordlet
12
12
 
13
13
  # Create a sign-in link for the e-mail address and send it; the link is valid for 15 minutes and is consumed with
14
14
  # `account/login-link/consume`. When an unused link was requested for the same address within the last minute, the
15
- # call answers `sent` without sending another. `locale` sets the language of the e-mail and of the link; `app` set
16
- # to `invoice` makes the link open the invoice app instead of the Nordlet app; `acceptTerms`, `acceptDpa` and
17
- # `referralCode` are stored with the link and used when the address has no account yet.
15
+ # call answers `sent` without sending another; after five links for the address within an hour it answers 429;
16
+ # otherwise the earlier unused sign-in links for the address stop working. `locale` sets the language of the
17
+ # e-mail and of the link; `app` set to `invoice` makes the link open the invoice app instead of the Nordlet app;
18
+ # `acceptTerms`, `acceptDpa` and `referralCode` are stored with the link and used when the address has no account
19
+ # yet.
18
20
  #
19
21
  # @param request_options [Hash]
20
22
  # @param params [Nordlet::Account::Types::LoginLinkRequestAccountRequest]
@@ -50,9 +52,14 @@ module Nordlet
50
52
 
51
53
  # Exchange a sign-in link token for a session; an unknown, used or expired token is refused with 401. When no
52
54
  # account has the address, one is created (`isNewUser`), which is refused with 422 unless the link was requested
53
- # with `acceptTerms` and `acceptDpa`; a `referralCode` on the link records who referred the new user. A link from
54
- # `account/email/change-request` changes the signed-in user's address instead, refused with 409 when another
55
- # account has it.
55
+ # with `acceptTerms` and `acceptDpa`; a `referralCode` on the link records who referred the new user. The link
56
+ # `account/email/change-request` sends to the current address signs that user in and sends a confirmation link to
57
+ # the new address; that second link changes the address, deletes the user's other sessions and sends the previous
58
+ # address a link, valid for 24 hours, that changes the address back and deletes every session of the user. No link
59
+ # goes to the new address when another account has it, and the change and the change back are refused with 409
60
+ # when another account has the address. When the user has two-factor authentication on, `twoFactorRequired` is
61
+ # true and the session can make no call other than `account/two-factor/verify` and `account/logout` until a code
62
+ # is entered.
56
63
  #
57
64
  # @param request_options [Hash]
58
65
  # @param params [Nordlet::Account::Types::LoginLinkConsumeAccountRequest]
@@ -302,7 +309,8 @@ module Nordlet
302
309
 
303
310
  # Create an invitation to the active company for an e-mail address with the given role and send it by e-mail in
304
311
  # `locale`; owners and admins may call it. The invitation is valid for 7 days and replaces an earlier pending one
305
- # for the same address. Refused with 409 when the address already belongs to a member.
312
+ # for the same address. Refused with 409 when the address already belongs to a member and with 429
313
+ # (`rate_limited`) after 50 invitations by the user, in all their companies, within 24 hours.
306
314
  #
307
315
  # @param request_options [Hash]
308
316
  # @param params [Nordlet::Account::Types::InvitesCreateAccountRequest]
@@ -767,7 +775,8 @@ module Nordlet
767
775
  # active company may call it. The key works in every company the person is a member of, with the rights of their
768
776
  # role in each; every call names the company in the `x-nordlet-company` header. `scopes` defaults to the caller's
769
777
  # scopes in the active company and may not exceed them (403); in each company the key's scopes are further limited
770
- # to the person's role there. Without `expiresInDays` the key does not expire.
778
+ # to the person's role there. `expiresInDays` defaults to 90. The list shows the key's last four characters as
779
+ # `lastFour`.
771
780
  #
772
781
  # @param request_options [Hash]
773
782
  # @param params [Nordlet::Account::Types::APIKeysCreateAccountRequest]
@@ -801,7 +810,9 @@ module Nordlet
801
810
  end
802
811
  end
803
812
 
804
- # List the signed-in person's API keys, including expired and revoked ones.
813
+ # List the signed-in person's API keys, including expired and revoked ones. `lastFour` is the last four characters
814
+ # of the key (null for keys created before it was recorded); for an app connected through OAuth it is those of the
815
+ # current access token.
805
816
  #
806
817
  # @param request_options [Hash]
807
818
  # @param params [Nordlet::Account::Types::APIKeysListAccountRequest]
@@ -837,8 +848,8 @@ module Nordlet
837
848
 
838
849
  # Create a new key with the name and scopes of the signed-in person's key `id` and return it once; the old key
839
850
  # keeps working for `overlapHours` and then expires, and its `replacedByKeyId` points to the new one.
840
- # `expiresInDays` applies to the new key. Refused with 409 when the old key is revoked or belongs to an app
841
- # connected through OAuth, which renews its own access.
851
+ # `expiresInDays` applies to the new key and defaults to 90. Refused with 409 when the old key is revoked or
852
+ # belongs to an app connected through OAuth, which renews its own access.
842
853
  #
843
854
  # @param request_options [Hash]
844
855
  # @param params [Nordlet::Account::Types::APIKeysRotateAccountRequest]
@@ -975,10 +986,12 @@ module Nordlet
975
986
  end
976
987
  end
977
988
 
978
- # Send a confirmation link to `newEmail`; the address changes when that link is consumed with
979
- # `account/login-link/consume`. When an unused link was sent to the address within the last minute, the call
980
- # answers `sent` without sending another. Refused with 422 when it is already the user's address and with 409 when
981
- # another account has it.
989
+ # Send a confirmation link for the change to `newEmail` to the user's current address. When it is consumed with
990
+ # `account/login-link/consume`, a second link goes to `newEmail`, and the address changes when that one is
991
+ # consumed. When an unused link for `newEmail` was created within the last minute, the call answers `sent` without
992
+ # sending another. Refused with 422 when it is already the user's address and with 429 (`rate_limited`) after five
993
+ # requests by the user within 24 hours. When another account has `newEmail`, the call answers the same, the
994
+ # confirmation link signs the user in and no link goes to `newEmail`.
982
995
  #
983
996
  # @param request_options [Hash]
984
997
  # @param params [Nordlet::Account::Types::EmailChangeRequestAccountRequest]
@@ -1012,7 +1025,8 @@ module Nordlet
1012
1025
  end
1013
1026
  end
1014
1027
 
1015
- # List the signed-in user's sessions that have not expired; `current` marks the one the call was made with.
1028
+ # List the signed-in user's sessions that have not expired: a session ends 30 days after sign-in or after 7 days
1029
+ # without a call. `current` marks the one the call was made with.
1016
1030
  #
1017
1031
  # @param request_options [Hash]
1018
1032
  # @param params [Nordlet::Account::Types::SessionsListAccountRequest]
@@ -1115,9 +1129,9 @@ module Nordlet
1115
1129
  end
1116
1130
  end
1117
1131
 
1118
- # Return the user's profile, consent state, memberships, unexpired sessions, billing accounts (`billing` is the
1119
- # `app` site's, `billingAccounts` has one per site), credit transactions and the audit entries they made in their
1120
- # companies (the most recent 5000 of each of the last two).
1132
+ # Return the user's profile, consent state, memberships, unexpired sessions, sign-in events, API keys (without the
1133
+ # keys), connected OAuth apps, referral points, billing accounts (`billing` is the `app` site's, `billingAccounts`
1134
+ # has one per site), credit transactions and every audit entry they made in their companies.
1121
1135
  #
1122
1136
  # @param request_options [Hash]
1123
1137
  # @param params [Nordlet::Account::Types::ExportAccountRequest]
@@ -1472,6 +1486,225 @@ module Nordlet
1472
1486
  raise error_class.new(response.body, code: code)
1473
1487
  end
1474
1488
  end
1489
+
1490
+ # Return the signed-in user's two-factor authentication state: `enabled`, `required` (true for platform
1491
+ # administrators, who cannot use platform administration without it), the number of unused recovery codes and,
1492
+ # while a setup started with `two-factor/setup` is not finished, the key to add to an authenticator app as
1493
+ # `setup`.
1494
+ #
1495
+ # @param request_options [Hash]
1496
+ # @param params [Nordlet::Account::Types::TwoFactorGetAccountRequest]
1497
+ # @option request_options [String] :base_url
1498
+ # @option request_options [Hash{String => Object}] :additional_headers
1499
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
1500
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
1501
+ # @option request_options [Integer] :timeout_in_seconds
1502
+ #
1503
+ # @return [Nordlet::Account::Types::TwoFactorGetAccountResponse]
1504
+ def two_factor_get(request_options: {}, **params)
1505
+ params = Nordlet::Internal::Types::Utils.normalize_keys(params)
1506
+ request = Nordlet::Internal::JSON::Request.new(
1507
+ base_url: request_options[:base_url],
1508
+ method: "POST",
1509
+ path: "v1/account/two-factor/get",
1510
+ body: Nordlet::Account::Types::TwoFactorGetAccountRequest.new(params).to_h,
1511
+ request_options: request_options
1512
+ )
1513
+ begin
1514
+ response = @client.send(request)
1515
+ rescue Net::HTTPRequestTimeout
1516
+ raise Nordlet::Errors::TimeoutError
1517
+ end
1518
+ code = response.code.to_i
1519
+ if code.between?(200, 299)
1520
+ Nordlet::Account::Types::TwoFactorGetAccountResponse.load(response.body)
1521
+ else
1522
+ error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
1523
+ raise error_class.new(response.body, code: code)
1524
+ end
1525
+ end
1526
+
1527
+ # Start setting up two-factor authentication: create a new key for an authenticator app (time-based codes, RFC
1528
+ # 6238: SHA-1, 6 digits, 30 seconds) and return it with its `otpauth://` address. Nothing changes at sign-in until
1529
+ # `two-factor/enable` is called with a code from the app. Refused with 409 when two-factor authentication is
1530
+ # already on.
1531
+ #
1532
+ # @param request_options [Hash]
1533
+ # @param params [Nordlet::Account::Types::TwoFactorSetupAccountRequest]
1534
+ # @option request_options [String] :base_url
1535
+ # @option request_options [Hash{String => Object}] :additional_headers
1536
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
1537
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
1538
+ # @option request_options [Integer] :timeout_in_seconds
1539
+ #
1540
+ # @return [Nordlet::Account::Types::TwoFactorSetupAccountResponse]
1541
+ def two_factor_setup(request_options: {}, **params)
1542
+ params = Nordlet::Internal::Types::Utils.normalize_keys(params)
1543
+ request = Nordlet::Internal::JSON::Request.new(
1544
+ base_url: request_options[:base_url],
1545
+ method: "POST",
1546
+ path: "v1/account/two-factor/setup",
1547
+ body: Nordlet::Account::Types::TwoFactorSetupAccountRequest.new(params).to_h,
1548
+ request_options: request_options
1549
+ )
1550
+ begin
1551
+ response = @client.send(request)
1552
+ rescue Net::HTTPRequestTimeout
1553
+ raise Nordlet::Errors::TimeoutError
1554
+ end
1555
+ code = response.code.to_i
1556
+ if code.between?(200, 299)
1557
+ Nordlet::Account::Types::TwoFactorSetupAccountResponse.load(response.body)
1558
+ else
1559
+ error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
1560
+ raise error_class.new(response.body, code: code)
1561
+ end
1562
+ end
1563
+
1564
+ # Turn on two-factor authentication with a current code from the authenticator app set up by `two-factor/setup`.
1565
+ # Returns 10 recovery codes, shown only this once; each one works once in place of a code. The user's other
1566
+ # sessions are deleted. From then on a session created by a sign-in link can make no call other than
1567
+ # `two-factor/verify` and `account/logout` until a code is entered. A wrong code answers 422; after 5 wrong codes
1568
+ # the session is deleted (401).
1569
+ #
1570
+ # @param request_options [Hash]
1571
+ # @param params [Nordlet::Account::Types::TwoFactorEnableAccountRequest]
1572
+ # @option request_options [String] :base_url
1573
+ # @option request_options [Hash{String => Object}] :additional_headers
1574
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
1575
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
1576
+ # @option request_options [Integer] :timeout_in_seconds
1577
+ #
1578
+ # @return [Nordlet::Account::Types::TwoFactorEnableAccountResponse]
1579
+ def two_factor_enable(request_options: {}, **params)
1580
+ params = Nordlet::Internal::Types::Utils.normalize_keys(params)
1581
+ request = Nordlet::Internal::JSON::Request.new(
1582
+ base_url: request_options[:base_url],
1583
+ method: "POST",
1584
+ path: "v1/account/two-factor/enable",
1585
+ body: Nordlet::Account::Types::TwoFactorEnableAccountRequest.new(params).to_h,
1586
+ request_options: request_options
1587
+ )
1588
+ begin
1589
+ response = @client.send(request)
1590
+ rescue Net::HTTPRequestTimeout
1591
+ raise Nordlet::Errors::TimeoutError
1592
+ end
1593
+ code = response.code.to_i
1594
+ if code.between?(200, 299)
1595
+ Nordlet::Account::Types::TwoFactorEnableAccountResponse.load(response.body)
1596
+ else
1597
+ error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
1598
+ raise error_class.new(response.body, code: code)
1599
+ end
1600
+ end
1601
+
1602
+ # Finish signing in when `account/login-link/consume` answered `twoFactorRequired`: send a current code from the
1603
+ # authenticator app or an unused recovery code. A wrong code answers 422; after 5 wrong codes the session is
1604
+ # deleted (401) and the user signs in again with a new link.
1605
+ #
1606
+ # @param request_options [Hash]
1607
+ # @param params [Nordlet::Account::Types::TwoFactorVerifyAccountRequest]
1608
+ # @option request_options [String] :base_url
1609
+ # @option request_options [Hash{String => Object}] :additional_headers
1610
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
1611
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
1612
+ # @option request_options [Integer] :timeout_in_seconds
1613
+ #
1614
+ # @return [Nordlet::Account::Types::TwoFactorVerifyAccountResponse]
1615
+ def two_factor_verify(request_options: {}, **params)
1616
+ params = Nordlet::Internal::Types::Utils.normalize_keys(params)
1617
+ request = Nordlet::Internal::JSON::Request.new(
1618
+ base_url: request_options[:base_url],
1619
+ method: "POST",
1620
+ path: "v1/account/two-factor/verify",
1621
+ body: Nordlet::Account::Types::TwoFactorVerifyAccountRequest.new(params).to_h,
1622
+ request_options: request_options
1623
+ )
1624
+ begin
1625
+ response = @client.send(request)
1626
+ rescue Net::HTTPRequestTimeout
1627
+ raise Nordlet::Errors::TimeoutError
1628
+ end
1629
+ code = response.code.to_i
1630
+ if code.between?(200, 299)
1631
+ Nordlet::Account::Types::TwoFactorVerifyAccountResponse.load(response.body)
1632
+ else
1633
+ error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
1634
+ raise error_class.new(response.body, code: code)
1635
+ end
1636
+ end
1637
+
1638
+ # Replace the recovery codes with 10 new ones, shown only this once, after a current code from the authenticator
1639
+ # app. The earlier codes stop working.
1640
+ #
1641
+ # @param request_options [Hash]
1642
+ # @param params [Nordlet::Account::Types::TwoFactorRecoveryCodesRegenerateAccountRequest]
1643
+ # @option request_options [String] :base_url
1644
+ # @option request_options [Hash{String => Object}] :additional_headers
1645
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
1646
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
1647
+ # @option request_options [Integer] :timeout_in_seconds
1648
+ #
1649
+ # @return [Nordlet::Account::Types::TwoFactorRecoveryCodesRegenerateAccountResponse]
1650
+ def two_factor_recovery_codes_regenerate(request_options: {}, **params)
1651
+ params = Nordlet::Internal::Types::Utils.normalize_keys(params)
1652
+ request = Nordlet::Internal::JSON::Request.new(
1653
+ base_url: request_options[:base_url],
1654
+ method: "POST",
1655
+ path: "v1/account/two-factor/recovery-codes/regenerate",
1656
+ body: Nordlet::Account::Types::TwoFactorRecoveryCodesRegenerateAccountRequest.new(params).to_h,
1657
+ request_options: request_options
1658
+ )
1659
+ begin
1660
+ response = @client.send(request)
1661
+ rescue Net::HTTPRequestTimeout
1662
+ raise Nordlet::Errors::TimeoutError
1663
+ end
1664
+ code = response.code.to_i
1665
+ if code.between?(200, 299)
1666
+ Nordlet::Account::Types::TwoFactorRecoveryCodesRegenerateAccountResponse.load(response.body)
1667
+ else
1668
+ error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
1669
+ raise error_class.new(response.body, code: code)
1670
+ end
1671
+ end
1672
+
1673
+ # Turn off two-factor authentication after a current code from the authenticator app or an unused recovery code;
1674
+ # the key and the recovery codes are deleted. Refused with 422 for a platform administrator, for whom it is
1675
+ # required.
1676
+ #
1677
+ # @param request_options [Hash]
1678
+ # @param params [Nordlet::Account::Types::TwoFactorDisableAccountRequest]
1679
+ # @option request_options [String] :base_url
1680
+ # @option request_options [Hash{String => Object}] :additional_headers
1681
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
1682
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
1683
+ # @option request_options [Integer] :timeout_in_seconds
1684
+ #
1685
+ # @return [Nordlet::Account::Types::TwoFactorDisableAccountResponse]
1686
+ def two_factor_disable(request_options: {}, **params)
1687
+ params = Nordlet::Internal::Types::Utils.normalize_keys(params)
1688
+ request = Nordlet::Internal::JSON::Request.new(
1689
+ base_url: request_options[:base_url],
1690
+ method: "POST",
1691
+ path: "v1/account/two-factor/disable",
1692
+ body: Nordlet::Account::Types::TwoFactorDisableAccountRequest.new(params).to_h,
1693
+ request_options: request_options
1694
+ )
1695
+ begin
1696
+ response = @client.send(request)
1697
+ rescue Net::HTTPRequestTimeout
1698
+ raise Nordlet::Errors::TimeoutError
1699
+ end
1700
+ code = response.code.to_i
1701
+ if code.between?(200, 299)
1702
+ Nordlet::Account::Types::TwoFactorDisableAccountResponse.load(response.body)
1703
+ else
1704
+ error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
1705
+ raise error_class.new(response.body, code: code)
1706
+ end
1707
+ end
1475
1708
  end
1476
1709
  end
1477
1710
  end
@@ -8,6 +8,8 @@ module Nordlet
8
8
 
9
9
  field :name, -> { String }, optional: false, nullable: false
10
10
 
11
+ field :last_four, -> { String }, optional: false, nullable: true, api_name: "lastFour"
12
+
11
13
  field :scopes, -> { Internal::Types::Array[String] }, optional: false, nullable: false
12
14
 
13
15
  field :last_used_at, -> { String }, optional: false, nullable: true, api_name: "lastUsedAt"
@@ -21,6 +21,14 @@ module Nordlet
21
21
  field :credit_transactions, -> { Internal::Types::Array[Nordlet::Account::Types::ExportAccountResponseCreditTransactionsItem] }, optional: false, nullable: false, api_name: "creditTransactions"
22
22
 
23
23
  field :audit_entries, -> { Internal::Types::Array[Nordlet::Account::Types::ExportAccountResponseAuditEntriesItem] }, optional: false, nullable: false, api_name: "auditEntries"
24
+
25
+ field :auth_events, -> { Internal::Types::Array[Nordlet::Account::Types::ExportAccountResponseAuthEventsItem] }, optional: false, nullable: false, api_name: "authEvents"
26
+
27
+ field :api_keys, -> { Internal::Types::Array[Nordlet::Account::Types::ExportAccountResponseAPIKeysItem] }, optional: false, nullable: false, api_name: "apiKeys"
28
+
29
+ field :oauth_grants, -> { Internal::Types::Array[Nordlet::Account::Types::ExportAccountResponseOauthGrantsItem] }, optional: false, nullable: false, api_name: "oauthGrants"
30
+
31
+ field :referral_points, -> { Internal::Types::Array[Nordlet::Account::Types::ExportAccountResponseReferralPointsItem] }, optional: false, nullable: false, api_name: "referralPoints"
24
32
  end
25
33
  end
26
34
  end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ class ExportAccountResponseAPIKeysItem < Internal::Types::Model
7
+ field :id, -> { String }, optional: false, nullable: false
8
+
9
+ field :name, -> { String }, optional: false, nullable: false
10
+
11
+ field :last_four, -> { String }, optional: false, nullable: true, api_name: "lastFour"
12
+
13
+ field :scopes, -> { Internal::Types::Array[String] }, optional: false, nullable: false
14
+
15
+ field :last_used_at, -> { String }, optional: false, nullable: true, api_name: "lastUsedAt"
16
+
17
+ field :expires_at, -> { String }, optional: false, nullable: true, api_name: "expiresAt"
18
+
19
+ field :revoked_at, -> { String }, optional: false, nullable: true, api_name: "revokedAt"
20
+
21
+ field :created_at, -> { String }, optional: false, nullable: false, api_name: "createdAt"
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ class ExportAccountResponseAuthEventsItem < Internal::Types::Model
7
+ field :action, -> { String }, optional: false, nullable: false
8
+
9
+ field :ip_address, -> { String }, optional: false, nullable: true, api_name: "ipAddress"
10
+
11
+ field :user_agent, -> { String }, optional: false, nullable: true, api_name: "userAgent"
12
+
13
+ field :created_at, -> { String }, optional: false, nullable: false, api_name: "createdAt"
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ class ExportAccountResponseOauthGrantsItem < Internal::Types::Model
7
+ field :api_key_id, -> { String }, optional: false, nullable: false, api_name: "apiKeyId"
8
+
9
+ field :client_id, -> { String }, optional: false, nullable: false, api_name: "clientId"
10
+
11
+ field :client_name, -> { String }, optional: false, nullable: false, api_name: "clientName"
12
+
13
+ field :created_at, -> { String }, optional: false, nullable: false, api_name: "createdAt"
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ class ExportAccountResponseReferralPointsItem < Internal::Types::Model
7
+ field :points, -> { Integer }, optional: false, nullable: false
8
+
9
+ field :reason, -> { String }, optional: false, nullable: false
10
+
11
+ field :created_at, -> { String }, optional: false, nullable: false, api_name: "createdAt"
12
+ end
13
+ end
14
+ end
15
+ end
@@ -8,6 +8,8 @@ module Nordlet
8
8
 
9
9
  field :expires_at, -> { String }, optional: false, nullable: false, api_name: "expiresAt"
10
10
 
11
+ field :two_factor_required, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "twoFactorRequired"
12
+
11
13
  field :user, -> { Nordlet::Account::Types::InvitesAcceptAccountResponseUser }, optional: false, nullable: false
12
14
  end
13
15
  end
@@ -8,6 +8,8 @@ module Nordlet
8
8
 
9
9
  field :expires_at, -> { String }, optional: false, nullable: false, api_name: "expiresAt"
10
10
 
11
+ field :two_factor_required, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "twoFactorRequired"
12
+
11
13
  field :user, -> { Nordlet::Account::Types::LoginLinkConsumeAccountResponseUser }, optional: false, nullable: false
12
14
 
13
15
  field :is_new_user, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "isNewUser"
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ class TwoFactorDisableAccountRequest < Internal::Types::Model
7
+ field :code, -> { String }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ class TwoFactorDisableAccountResponse < Internal::Types::Model
7
+ field :enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ class TwoFactorEnableAccountRequest < Internal::Types::Model
7
+ field :code, -> { String }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ class TwoFactorEnableAccountResponse < Internal::Types::Model
7
+ field :recovery_codes, -> { Internal::Types::Array[String] }, optional: false, nullable: false, api_name: "recoveryCodes"
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ class TwoFactorGetAccountRequest < Internal::Types::Model; end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ class TwoFactorGetAccountResponse < Internal::Types::Model
7
+ field :enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false
8
+
9
+ field :required, -> { Internal::Types::Boolean }, optional: false, nullable: false
10
+
11
+ field :recovery_codes_left, -> { Integer }, optional: false, nullable: false, api_name: "recoveryCodesLeft"
12
+
13
+ field :setup, -> { Nordlet::Account::Types::TwoFactorGetAccountResponseSetup }, optional: false, nullable: true
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ class TwoFactorGetAccountResponseSetup < Internal::Types::Model
7
+ field :secret, -> { String }, optional: false, nullable: false
8
+
9
+ field :otpauth_url, -> { String }, optional: false, nullable: false, api_name: "otpauthUrl"
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ class TwoFactorRecoveryCodesRegenerateAccountRequest < Internal::Types::Model
7
+ field :code, -> { String }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ class TwoFactorRecoveryCodesRegenerateAccountResponse < Internal::Types::Model
7
+ field :recovery_codes, -> { Internal::Types::Array[String] }, optional: false, nullable: false, api_name: "recoveryCodes"
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ class TwoFactorSetupAccountRequest < Internal::Types::Model; end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ class TwoFactorSetupAccountResponse < Internal::Types::Model
7
+ field :secret, -> { String }, optional: false, nullable: false
8
+
9
+ field :otpauth_url, -> { String }, optional: false, nullable: false, api_name: "otpauthUrl"
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ class TwoFactorVerifyAccountRequest < Internal::Types::Model
7
+ field :code, -> { String }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nordlet
4
+ module Account
5
+ module Types
6
+ class TwoFactorVerifyAccountResponse < Internal::Types::Model
7
+ field :verified, -> { Internal::Types::Boolean }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
11
+ end