didit-sdk 2.23.0 → 2.24.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f9142f2f7aebe1dd1fb4055a0a3a285f8cd2085e1ef0ab5ff3ce5ecee6fa5e78
4
- data.tar.gz: 4d06aa70e6a151b45084cb8fcdf294fa98dff7121644cedb728d8e8db491f871
3
+ metadata.gz: 534480468091ff27b3ad78e90560889e794eb2032b32c9d0047553a5dbd3cf4c
4
+ data.tar.gz: 57432d47b78903830cf65259709851a90ff6ce3722be88531d38bbd51f606755
5
5
  SHA512:
6
- metadata.gz: 0c2cb7f4e4f4262147e5f27b35fdfd7be72b29b7fe8013a525629596d497b6b21a0af6924ffe41a6c56e207aac69c2958643ff2fea3a73d53e48e5066e65ba12
7
- data.tar.gz: 5c1740af4e54b9b4f1f996c3c86eaa3fb1c91864cef0bb01489b2bdf48fb60dd9d34295d6123097c0855598cf7c68de3a9692180d33f1b50b3ded915e0c7aac9
6
+ metadata.gz: f6455af8558e1454b39855244df657530a0c5373f4ee3fe92d7b7acc34964a98ce2fa55442e0ad0d9d17abf6a34022a2b7e1910532809562cc505530b1202b88
7
+ data.tar.gz: 484f826501e2d47e8a45f7ca6794c40877c7b6523aa30eae4635b66d8b7a017d6f91c36cc07bb4a6585a39864d1d58ac14077d56ec99a24bbc034d3083d828e3
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.24.0](https://github.com/didit-protocol/sdk-ruby/compare/v2.23.0...v2.24.0) (2026-11-19)
4
+
5
+
6
+ ### Features
7
+
8
+ * **spec:** sync API spec 2026-11-19 ([209be07](https://github.com/didit-protocol/sdk-ruby/commit/209be0759278e7e51f85e44dd37643c9eb75aa62))
9
+
3
10
  ## [2.23.0](https://github.com/didit-protocol/sdk-ruby/compare/v2.22.0...v2.23.0) (2026-11-18)
4
11
 
5
12
 
@@ -87,7 +87,7 @@ module Didit
87
87
  # ECU→personal...
88
88
  # @param first_name [String] The individual's first name. Required by some services/countries.
89
89
  # @param last_name [String] The individual's last name. Required by some services/countries.
90
- # @param middle_name [String] Middle name, used by some country services (AUS, NZL, …).
90
+ # @param middle_name [String] Middle name, used by some country services (NZL, …).
91
91
  # @param full_name [String] Full name - some services accept this in lieu of first/last name (e.g. CHN services,
92
92
  # which match the native-script name).
93
93
  # @param date_of_birth [Date, String] Date of birth, `YYYY-MM-DD`. Required by many services.
@@ -122,29 +122,28 @@ module Didit
122
122
  # @param address_element_5 [String] Postcode or postal code. `postal_code` is accepted as an alias.
123
123
  # @param postal_code [String] Postal code for address-based services (alias of `address_element_5`).
124
124
  # @param driver_license_number [String] Driver licence number for government document-verification services
125
- # (AUS, NZL, IND).
125
+ # (NZL, IND).
126
126
  # @param driver_license_card_number [String] Physical driver licence card number, where required separately from
127
- # the licence number (AUS).
128
- # @param driver_license_state [String] Driver licence state or territory of issue (AUS).
127
+ # the licence number.
128
+ # @param driver_license_state [String] Driver licence state or territory of issue.
129
129
  # @param driver_license_version [String] Driver licence version code (NZL).
130
- # @param passport_number [String] Passport number for government passport-verification services (AUS, NZL, IND,
131
- # CHN).
130
+ # @param passport_number [String] Passport number for government passport-verification services (NZL, IND, CHN).
132
131
  # @param passport_expiration_date [Date, String] Passport expiry date, `YYYY-MM-DD`, for passport-verification
133
132
  # services.
134
133
  # @param passport_file_number [String] Passport file number (IND).
135
134
  # @param passport_issue_country [String] Issuing country of the passport (ISO 3166-1 alpha-3) for
136
135
  # passport-verification services.
137
- # @param medicare_card_number [String] Medicare card number (AUS).
138
- # @param immi_card_number [String] Australian ImmiCard number.
139
- # @param immi_card_expiry_date [Date, String] Australian ImmiCard expiry date.
140
- # @param citizenship_certificate_number [String] Citizenship certificate number (AUS).
141
- # @param birth_registration_number [String] Birth-certificate registration number (AUS).
142
- # @param birth_registration_date [Date, String] Birth-certificate registration date (AUS).
143
- # @param birth_registration_state [String] Birth-certificate registration state (AUS).
144
- # @param marriage_certificate_number [String] Marriage certificate number (AUS).
145
- # @param change_of_name_certificate_number [String] Change-of-name certificate number (AUS).
146
- # @param first_partner_name [String] First name of the partner on a marriage certificate (AUS).
147
- # @param last_partner_name [String] Last name of the partner on a marriage certificate (AUS).
136
+ # @param medicare_card_number [String] Medicare card number.
137
+ # @param immi_card_number [String]
138
+ # @param immi_card_expiry_date [Date, String]
139
+ # @param citizenship_certificate_number [String] Citizenship certificate number.
140
+ # @param birth_registration_number [String] Birth-certificate registration number.
141
+ # @param birth_registration_date [Date, String] Birth-certificate registration date.
142
+ # @param birth_registration_state [String] Birth-certificate registration state.
143
+ # @param marriage_certificate_number [String] Marriage certificate number.
144
+ # @param change_of_name_certificate_number [String] Change-of-name certificate number.
145
+ # @param first_partner_name [String] First name of the partner on a marriage certificate.
146
+ # @param last_partner_name [String] Last name of the partner on a marriage certificate.
148
147
  # @param voter_id [String] Voter registration number (IND EPIC, IRL).
149
148
  # @param epic_card [String] India EPIC voter card number.
150
149
  # @param pan [String] India PAN (Permanent Account Number).
@@ -201,7 +200,9 @@ module Didit
201
200
  # @param country_of_residence [String] ISO 3166-1 alpha-2 country of residence. It was used only by the retired
202
201
  # global identity-enrichment service (`glb_identity_enrichment`), which Didit no longer offers.
203
202
  # @param partial_match_action [String] What a `partial_match` does to `database_validation.status`. Defaults to
204
- # `NO_ACTION` (status stays `Approved`, with a warning).
203
+ # `NO_ACTION` (status stays `Approved`, with a warning). When the registry confirmed the identification number
204
+ # but returned a different name, `NO_ACTION` answers `In Review` instead of `Approved`; `DECLINE` still
205
+ # declines.
205
206
  # @param no_match_action [String] What a `no_match` does to `database_validation.status`. Defaults to `DECLINE`.
206
207
  # @param save_api_request [Boolean] Persist the validation as a session (console visibility, decision endpoint,
207
208
  # `status.updated` webhook). Also changes the `validations` response shape: per-service objects when `true`
@@ -21,8 +21,8 @@ module Didit
21
21
  #
22
22
  # **Decision logic.** `status` is `Approved` unless at least one warning resolves to a decline. Fraud and
23
23
  # hard-failure risks always decline: `DOCUMENT_EXPIRED`, `SCREEN_CAPTURE_DETECTED`, `PRINTED_COPY_DETECTED`,
24
- # `PORTRAIT_MANIPULATION_DETECTED`, `PUBLIC_DOCUMENT_IMAGE_DETECTED`, plus extraction failures
25
- # (`NAME_NOT_DETECTED`, `DATE_OF_BIRTH_NOT_DETECTED`, `DOCUMENT_NUMBER_NOT_DETECTED`).
24
+ # `PORTRAIT_MANIPULATION_DETECTED`, `PUBLIC_DOCUMENT_IMAGE_DETECTED`, `SPECIMEN_DOCUMENT_DETECTED`, plus
25
+ # extraction failures (`NAME_NOT_DETECTED`, `DATE_OF_BIRTH_NOT_DETECTED`, `DOCUMENT_NUMBER_NOT_DETECTED`).
26
26
  # (`PORTRAIT_IMAGE_NOT_DETECTED`, `INVALID_DATE`, and `MRZ_NOT_DETECTED` exist in workflow sessions but are
27
27
  # never produced by this standalone endpoint. `COULD_NOT_DETECT_DOCUMENT_TYPE` is returned here when the front
28
28
  # image does not match a known official document design with high confidence, and declines the request.) Three
@@ -2726,7 +2726,8 @@ module Didit
2726
2726
  class Imports < Didit::Resource
2727
2727
  # Cancel an import job
2728
2728
  #
2729
- # Cancel an import. What was imported stays; the uploaded file and the key are erased.
2729
+ # Cancel an import. What was imported stays, unless you undo it with `POST
2730
+ # /v3/session/imports/{importId}/undo/`; the uploaded file and the key are erased.
2730
2731
  #
2731
2732
  # +POST /v3/session/imports/{importId}/cancel/+
2732
2733
  #
@@ -2788,14 +2789,22 @@ module Didit
2788
2789
  #
2789
2790
  # Create an asynchronous import job for historical User Verification sessions, Business Verification sessions,
2790
2791
  # transaction monitoring records, or workflow custom status rules. Set `source=provider` to migrate from
2791
- # another provider: Didit reads Sumsub, Onfido, Persona and ComplyCube with your read-only key, reads Veriff,
2792
- # iDenfy and MetaMap records by the IDs you upload in `file`, and imports an export file in Didit's format for
2793
- # the other providers. Record IDs are namespaced by provider (`sumsub:<id>`) so a re-run skips everything
2794
- # already in Didit, and a record imported through a file with the provider's bare ID is recognised too, in
2795
- # both directions, so moving between a file import and a provider migration never imports a record twice. An
2796
- # application can run up to 4 import jobs at once; a job interrupted by a deploy or a worker restart continues
2797
- # from its last imported row by itself. Imports are disabled by default and must be enabled per organization
2798
- # by Didit.
2792
+ # another provider: `GET /v3/session/imports/providers/` lists the providers and how each is read: with your
2793
+ # read-only key, from the record IDs you upload in `file`, or from an export file in Didit's format. Record
2794
+ # IDs are namespaced by provider (`<provider>:<id>`) so a re-run skips everything already in Didit, and a
2795
+ # record imported through a file with the provider's bare ID is recognised too, in both directions, so moving
2796
+ # between a file import and a provider migration never imports a record twice. An application can run up to 4
2797
+ # import jobs at once; a job interrupted by a deploy or a worker restart continues from its last imported row
2798
+ # by itself. Any organization can import without asking Didit first, within a monthly limit that follows what
2799
+ # it pays (see `GET /v3/session/imports/limits/`): 2,000 records a month from a provider and 500 from a file
2800
+ # or the API until the first paid top-up, then 250,000 and 25,000, and no monthly limit on a contract. A job
2801
+ # above the limit writes what fits and then waits (`WAITING`), and continues by itself when the limit goes up;
2802
+ # ask for a higher limit with `POST /v3/session/imports/{importId}/request-limit/`. Every source accepts
2803
+ # `dry_run`. A job that is not a dry run first checks the whole file or account; for an organization that has
2804
+ # never paid, a finding can hold the job (`HELD`) for review by Didit before anything is written. Imported
2805
+ # verifications stay in their application: they cannot be shared with another application and never feed
2806
+ # cross-organization fraud signals. `POST /v3/session/imports/{importId}/undo/` deletes what an import
2807
+ # created.
2799
2808
  #
2800
2809
  # +POST /v3/session/imports/+
2801
2810
  #
@@ -2804,8 +2813,10 @@ module Didit
2804
2813
  # @param workflow_id [String] Workflow UUID that imported sessions or status rules should be attached to.
2805
2814
  # Required for user_verification, business_verification, and status_rules. Omit for transactions.
2806
2815
  # @param source_format [String] Optional. Inferred from the URL's file extension when omitted.
2807
- # @param source_file_url [String] Alternative to file upload. Must be an HTTPS URL resolving to a public
2808
- # address (private/loopback networks are rejected). Mutually exclusive with `file`.
2816
+ # @param source_file_url [String] HTTPS URL of the file, resolving to a public address (private/loopback
2817
+ # networks are rejected). Required for a file import and for a provider migration whose provider is read from
2818
+ # uploaded record IDs or an export file (`GET /v3/session/imports/providers/` gives each provider's mode). Not
2819
+ # needed when `source` is `provider` and Didit reads the account with `credentials`.
2809
2820
  # @param source [String] `provider` makes this a migration from another identity verification provider. Omit
2810
2821
  # for a file import.
2811
2822
  # @param provider [String] Migration source, from `GET /v3/session/imports/providers/`. Required when `source`
@@ -2918,6 +2929,8 @@ module Didit
2918
2929
  # List import jobs
2919
2930
  #
2920
2931
  # Every import of the application in one shape: verification imports and migrations, people and businesses.
2932
+ # `limit_lane`, `waiting_reason`, `checks`, `review_note`, `limit_request`, `granted_records` and the Undo
2933
+ # fields apply to verification imports; they are `null`, empty or `false` for people and company imports.
2921
2934
  #
2922
2935
  # +GET /v3/import-jobs/+
2923
2936
  #
@@ -2977,6 +2990,38 @@ module Didit
2977
2990
  )
2978
2991
  end
2979
2992
 
2993
+ # Request a higher import limit
2994
+ #
2995
+ # Ask Didit to let one import go past the monthly limit. Allowed on a job that is `READY`, `PENDING`,
2996
+ # `PROCESSING` or `WAITING` and whose lane has a limit; one request can be pending per job.
2997
+ # `requested_records` is not sent: it is computed from the job's dry run or check pass as what the import
2998
+ # still has to write beyond what it may write now (one month of the lane when no pass counted the file). An
2999
+ # approval lets that job finish and does not change the organization's monthly limit. A declined request
3000
+ # leaves the job waiting for the next month or a top-up, and the answer is in `limit_request.staff_note`. The
3001
+ # job continues by itself when the limit goes up. A turned-off organization or a sandbox application is
3002
+ # refused.
3003
+ #
3004
+ # +POST /v3/session/imports/{importId}/request-limit/+
3005
+ #
3006
+ # @param import_id [String]
3007
+ # @param note [String] Optional. Tell Didit why you need a higher limit, at most 1000 characters.
3008
+ # @param idempotency_key [String] sent as the Idempotency-Key header
3009
+ # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
3010
+ # @return [Didit::Types::SessionImportJob]
3011
+ def request_limit(import_id, note: OMIT, idempotency_key: OMIT, request_options: nil)
3012
+ @client.request(
3013
+ :post,
3014
+ "/v3/session/imports/{importId}/request-limit/",
3015
+ path_params: { "importId" => import_id },
3016
+ body: {
3017
+ "note" => note
3018
+ },
3019
+ headers: { "Idempotency-Key" => idempotency_key },
3020
+ response: Types::SessionImportJob,
3021
+ request_options: request_options
3022
+ )
3023
+ end
3024
+
2980
3025
  # Resume an import job
2981
3026
  #
2982
3027
  # Resume an import you paused. A job paused by the provider's rate limit resumes by itself.
@@ -3018,6 +3063,30 @@ module Didit
3018
3063
  )
3019
3064
  end
3020
3065
 
3066
+ # Get import limits
3067
+ #
3068
+ # Read how many verifications your organization can still import this month. Limits follow what the
3069
+ # organization pays and are counted per organization, across all its live applications, per calendar month in
3070
+ # UTC, in records written by imports that are not dry runs: 2,000 from a provider and 500 from a file or the
3071
+ # API until the first paid top-up, then 250,000 and 25,000, and no monthly limit (`limit: null`) on a contract
3072
+ # or when Didit set the organization to always allowed. Records skipped because they were already in Didit,
3073
+ # rejected rows and dry runs do not count, and records you undo are given back. `can_import: false` with
3074
+ # `reason: turned_off` or `reason: sandbox` means a create call would be refused. Authenticate with your
3075
+ # application's API key, or with a console user token that has `write:sessions`.
3076
+ #
3077
+ # +GET /v3/session/imports/limits/+
3078
+ #
3079
+ # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
3080
+ # @return [Didit::Types::ImportLimits]
3081
+ def retrieve_limits(request_options: nil)
3082
+ @client.request(
3083
+ :get,
3084
+ "/v3/session/imports/limits/",
3085
+ response: Types::ImportLimits,
3086
+ request_options: request_options
3087
+ )
3088
+ end
3089
+
3021
3090
  # Download verification import template
3022
3091
  #
3023
3092
  # Download the canonical CSV header for verification imports. The column set is determined by `import_type`.
@@ -3077,8 +3146,8 @@ module Didit
3077
3146
 
3078
3147
  # Start a dry run
3079
3148
  #
3080
- # Start a migration whose dry run finished (`READY`): the same job imports for real, with the status mapping
3081
- # and face templates choice as sent now.
3149
+ # Start an import whose dry run finished (`READY`): the same job imports for real, with the status mapping and
3150
+ # face templates choice as sent now. A file or API job runs the checks again over the whole file first.
3082
3151
  #
3083
3152
  # +POST /v3/session/imports/{importId}/start/+
3084
3153
  #
@@ -3114,6 +3183,40 @@ module Didit
3114
3183
  request_options: request_options
3115
3184
  )
3116
3185
  end
3186
+
3187
+ # Undo an import
3188
+ #
3189
+ # Delete what an import created. Every verification (User Verification, Business Verification) and transaction
3190
+ # the job created is deleted with its images and videos, its face templates, and the blocklist entries the job
3191
+ # added, exactly as `DELETE /v3/session/{sessionId}/delete/` deletes a session. Records that were already in
3192
+ # Didit, and the workflow status rules an import changed, are not affected. The records you undo are given
3193
+ # back to the month's import limit. Deletion cannot be reversed.
3194
+ #
3195
+ # Allowed when `can_undo` is `true` and the job is `COMPLETED`, `FAILED`, `CANCELLED` or `WAITING` (a waiting
3196
+ # job is cancelled first). Imports made before Undo import existed did not record what they created and cannot
3197
+ # be undone. The job moves to `UNDOING` and ends `UNDONE` with `undone_count`; poll `GET
3198
+ # /v3/session/imports/{importId}/`. Undo is available for User Verification, Business Verification and
3199
+ # transaction imports; status rules are not undone. Needs the sessions write and delete privileges
3200
+ # (`write:sessions` and `delete:sessions` for a console user; an API key needs sessions write access and
3201
+ # `delete:sessions`). Undoing a Business Verification import also needs `delete:businesses`, and a
3202
+ # transactions import needs `write:transactions` (an API key needs write access to that resource).
3203
+ #
3204
+ # +POST /v3/session/imports/{importId}/undo/+
3205
+ #
3206
+ # @param import_id [String]
3207
+ # @param idempotency_key [String] sent as the Idempotency-Key header
3208
+ # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
3209
+ # @return [Didit::Types::SessionImportJob]
3210
+ def undo(import_id, idempotency_key: OMIT, request_options: nil)
3211
+ @client.request(
3212
+ :post,
3213
+ "/v3/session/imports/{importId}/undo/",
3214
+ path_params: { "importId" => import_id },
3215
+ headers: { "Idempotency-Key" => idempotency_key },
3216
+ response: Types::SessionImportJob,
3217
+ request_options: request_options
3218
+ )
3219
+ end
3117
3220
  end
3118
3221
 
3119
3222
  # The +sessions.reviews+ resource.
@@ -1869,6 +1869,20 @@ module Didit
1869
1869
  VALUES = [APPROVED, IN_REVIEW].freeze
1870
1870
  end
1871
1871
 
1872
+ # `all_approved_no_media`: at least 95% of the records are Approved and at most 5% carry any image (selfie,
1873
+ # document or video), on 100 records or more. It applies to file imports only (a provider's export file included),
1874
+ # because records read from a provider's API carry their images only once they are imported. `repeated_documents`:
1875
+ # the same document number and issuing country appears under a different name or date of birth in at least 2% of
1876
+ # the records and at least 20 records (User Verification imports). `implausible_dates`: a verification date in the
1877
+ # future or before 2010, or a date of birth giving an age under 14 or over 110, in at least 2% of the records.
1878
+ module ImportCheckCode
1879
+ ALL_APPROVED_NO_MEDIA = "all_approved_no_media"
1880
+ REPEATED_DOCUMENTS = "repeated_documents"
1881
+ IMPLAUSIBLE_DATES = "implausible_dates"
1882
+
1883
+ VALUES = [ALL_APPROVED_NO_MEDIA, REPEATED_DOCUMENTS, IMPLAUSIBLE_DATES].freeze
1884
+ end
1885
+
1872
1886
  # Known values of an open enum: the API may send others.
1873
1887
  module ImportJobSummaryKind
1874
1888
  SESSIONS = "sessions"
@@ -1880,6 +1894,15 @@ module Didit
1880
1894
  VALUES = [SESSIONS, BUSINESSES, USERS, STATUS_RULES, TRANSACTIONS].freeze
1881
1895
  end
1882
1896
 
1897
+ # The monthly limit this job counts against: `provider` for a migration read from another provider
1898
+ # (`source=provider`), `file` for an upload or file URL.
1899
+ module ImportJobSummaryLimitLane
1900
+ PROVIDER = "provider"
1901
+ FILE = "file"
1902
+
1903
+ VALUES = [PROVIDER, FILE].freeze
1904
+ end
1905
+
1883
1906
  # Known values of an open enum: the API may send others.
1884
1907
  module ImportJobSummarySource
1885
1908
  FILE = "file"
@@ -1889,7 +1912,9 @@ module Didit
1889
1912
  VALUES = [FILE, API, PROVIDER].freeze
1890
1913
  end
1891
1914
 
1892
- # The job's state as the console shows it; `errors` is a completed job with rejected rows.
1915
+ # The job's state as the console shows it; `errors` is a completed job with rejected rows. `waiting`: the month's
1916
+ # import limit is used up. `held`: a check holds the import for review by Didit. `declined`: Didit declined the
1917
+ # held import. `undoing` and `undone`: Undo import is running or finished.
1893
1918
  module ImportJobSummaryState
1894
1919
  READY = "ready"
1895
1920
  QUEUED = "queued"
@@ -1899,8 +1924,57 @@ module Didit
1899
1924
  ERRORS = "errors"
1900
1925
  FAILED = "failed"
1901
1926
  CANCELLED = "cancelled"
1927
+ WAITING = "waiting"
1928
+ HELD = "held"
1929
+ DECLINED = "declined"
1930
+ UNDOING = "undoing"
1931
+ UNDONE = "undone"
1932
+
1933
+ VALUES = [READY, QUEUED, RUNNING, PAUSED, COMPLETED, ERRORS, FAILED, CANCELLED, WAITING, HELD, DECLINED, UNDOING, UNDONE].freeze
1934
+ end
1935
+
1936
+ # Why a `WAITING` job waits. `null` otherwise.
1937
+ module ImportJobSummaryWaitingReason
1938
+ LIMIT = "limit"
1939
+
1940
+ VALUES = [LIMIT].freeze
1941
+ end
1942
+
1943
+ # Known values of an open enum: the API may send others.
1944
+ module ImportLimitRequestStatus
1945
+ PENDING = "pending"
1946
+ APPROVED = "approved"
1947
+ DECLINED = "declined"
1902
1948
 
1903
- VALUES = [READY, QUEUED, RUNNING, PAUSED, COMPLETED, ERRORS, FAILED, CANCELLED].freeze
1949
+ VALUES = [PENDING, APPROVED, DECLINED].freeze
1950
+ end
1951
+
1952
+ # The level that sets the monthly limits: `never_paid` until the first paid top-up, `paid` after it, `contract` on
1953
+ # an enterprise contract.
1954
+ module ImportLimitsLevel
1955
+ NEVER_PAID = "never_paid"
1956
+ PAID = "paid"
1957
+ CONTRACT = "contract"
1958
+
1959
+ VALUES = [NEVER_PAID, PAID, CONTRACT].freeze
1960
+ end
1961
+
1962
+ # The import mode of the organization. `automatic` applies the monthly limits; `always_allowed` has no monthly
1963
+ # limit and its files are never held for a check; `turned_off` imports nothing.
1964
+ module ImportLimitsMode
1965
+ AUTOMATIC = "automatic"
1966
+ ALWAYS_ALLOWED = "always_allowed"
1967
+ TURNED_OFF = "turned_off"
1968
+
1969
+ VALUES = [AUTOMATIC, ALWAYS_ALLOWED, TURNED_OFF].freeze
1970
+ end
1971
+
1972
+ # Why `can_import` is `false`; `null` otherwise.
1973
+ module ImportLimitsReason
1974
+ TURNED_OFF = "turned_off"
1975
+ SANDBOX = "sandbox"
1976
+
1977
+ VALUES = [TURNED_OFF, SANDBOX].freeze
1904
1978
  end
1905
1979
 
1906
1980
  # Known values of an open enum: the API may send others.
@@ -4325,6 +4399,15 @@ module Didit
4325
4399
  VALUES = [USER_VERIFICATION, BUSINESS_VERIFICATION, STATUS_RULES, TRANSACTIONS].freeze
4326
4400
  end
4327
4401
 
4402
+ # The monthly limit this job counts against: `provider` for a migration read from another provider
4403
+ # (`source=provider`), `file` for an upload or file URL.
4404
+ module SessionImportJobLimitLane
4405
+ PROVIDER = "provider"
4406
+ FILE = "file"
4407
+
4408
+ VALUES = [PROVIDER, FILE].freeze
4409
+ end
4410
+
4328
4411
  # Known values of an open enum: the API may send others.
4329
4412
  module SessionImportJobSource
4330
4413
  FILE = "file"
@@ -4342,7 +4425,9 @@ module Didit
4342
4425
  VALUES = [CSV, NDJSON].freeze
4343
4426
  end
4344
4427
 
4345
- # The job's state as the console shows it; `errors` is a completed job with rejected rows.
4428
+ # The job's state as the console shows it; `errors` is a completed job with rejected rows. `waiting`: the month's
4429
+ # import limit is used up. `held`: a check holds the import for review by Didit. `declined`: Didit declined the
4430
+ # held import. `undoing` and `undone`: Undo import is running or finished.
4346
4431
  module SessionImportJobState
4347
4432
  READY = "ready"
4348
4433
  QUEUED = "queued"
@@ -4352,11 +4437,19 @@ module Didit
4352
4437
  ERRORS = "errors"
4353
4438
  FAILED = "failed"
4354
4439
  CANCELLED = "cancelled"
4440
+ WAITING = "waiting"
4441
+ HELD = "held"
4442
+ DECLINED = "declined"
4443
+ UNDOING = "undoing"
4444
+ UNDONE = "undone"
4355
4445
 
4356
- VALUES = [READY, QUEUED, RUNNING, PAUSED, COMPLETED, ERRORS, FAILED, CANCELLED].freeze
4446
+ VALUES = [READY, QUEUED, RUNNING, PAUSED, COMPLETED, ERRORS, FAILED, CANCELLED, WAITING, HELD, DECLINED, UNDOING, UNDONE].freeze
4357
4447
  end
4358
4448
 
4359
- # Known values of an open enum: the API may send others.
4449
+ # `WAITING`: the month's limit is used up. The import continues by itself when the limit goes up (a top-up, the
4450
+ # next month, or Didit approving a limit request). `HELD`: a check held the file for review by Didit; nothing is
4451
+ # written. `DECLINED`: Didit declined the held file (`review_note` says why); nothing was written and the source
4452
+ # and credentials are erased. `UNDOING` and `UNDONE`: an Undo import is running or has finished.
4360
4453
  module SessionImportJobStatus
4361
4454
  PENDING = "PENDING"
4362
4455
  PROCESSING = "PROCESSING"
@@ -4365,8 +4458,20 @@ module Didit
4365
4458
  PAUSED = "PAUSED"
4366
4459
  CANCELLED = "CANCELLED"
4367
4460
  READY = "READY"
4461
+ WAITING = "WAITING"
4462
+ HELD = "HELD"
4463
+ DECLINED = "DECLINED"
4464
+ UNDOING = "UNDOING"
4465
+ UNDONE = "UNDONE"
4466
+
4467
+ VALUES = [PENDING, PROCESSING, COMPLETED, FAILED, PAUSED, CANCELLED, READY, WAITING, HELD, DECLINED, UNDOING, UNDONE].freeze
4468
+ end
4469
+
4470
+ # Why a `WAITING` job waits. `null` otherwise.
4471
+ module SessionImportJobWaitingReason
4472
+ LIMIT = "limit"
4368
4473
 
4369
- VALUES = [PENDING, PROCESSING, COMPLETED, FAILED, PAUSED, CANCELLED, READY].freeze
4474
+ VALUES = [LIMIT].freeze
4370
4475
  end
4371
4476
 
4372
4477
  # `all` places one field per match; the keys after the first get `_2`, `_3` and so on.
@@ -9033,6 +9138,13 @@ module Didit
9033
9138
  field :threat, "threat", :any
9034
9139
  end
9035
9140
 
9141
+ class ImportCheck < Didit::Model
9142
+ field :code, "code", :string
9143
+ field :count, "count", :integer
9144
+ field :share, "share", :float
9145
+ field :holds, "holds", :boolean
9146
+ end
9147
+
9036
9148
  # One import job of any kind, in the shape the console's Import jobs drawer reads.
9037
9149
  class ImportJobSummary < Didit::Model
9038
9150
  field :id, "id", :string
@@ -9054,6 +9166,16 @@ module Didit
9054
9166
  field :created_at, "created_at", :datetime
9055
9167
  field :started_at, "started_at", :datetime
9056
9168
  field :completed_at, "completed_at", :datetime
9169
+ field :limit_lane, "limit_lane", :string
9170
+ field :waiting_reason, "waiting_reason", :string
9171
+ field :checks, "checks", [:array, "ImportCheck"]
9172
+ field :review_note, "review_note", :string
9173
+ field :limit_request, "limit_request", "ImportLimitRequest"
9174
+ field :granted_records, "granted_records", :integer
9175
+ field :can_undo, "can_undo", :boolean
9176
+ field :undone_count, "undone_count", :integer
9177
+ field :undone_at, "undone_at", :datetime
9178
+ field :undone_by, "undone_by", :string
9057
9179
  end
9058
9180
 
9059
9181
  class ImportJobSummaryFaceTemplates < Didit::Model
@@ -9079,6 +9201,44 @@ module Didit
9079
9201
  field :email, "email", :string
9080
9202
  end
9081
9203
 
9204
+ class ImportLimitLane < Didit::Model
9205
+ field :limit, "limit", :integer
9206
+ field :used, "used", :integer
9207
+ field :remaining, "remaining", :integer
9208
+ end
9209
+
9210
+ class ImportLimitRequest < Didit::Model
9211
+ field :id, "id", :string
9212
+ field :status, "status", :string
9213
+ field :requested_records, "requested_records", :integer
9214
+ field :note, "note", :string
9215
+ field :created_at, "created_at", :datetime
9216
+ field :decided_at, "decided_at", :datetime
9217
+ field :staff_note, "staff_note", :string
9218
+ end
9219
+
9220
+ class ImportLimits < Didit::Model
9221
+ field :mode, "mode", :string
9222
+ field :level, "level", :string
9223
+ field :can_import, "can_import", :boolean
9224
+ field :reason, "reason", :string
9225
+ field :checks_can_hold, "checks_can_hold", :boolean
9226
+ field :period, "period", "ImportLimitsPeriod"
9227
+ field :lanes, "lanes", "ImportLimitsLanes"
9228
+ end
9229
+
9230
+ # Monthly limits per lane. `provider` counts migrations that read records from another provider with your key
9231
+ # (`source=provider`); `file` counts file uploads and file URLs sent through the API.
9232
+ class ImportLimitsLanes < Didit::Model
9233
+ field :provider, "provider", "ImportLimitLane"
9234
+ field :file, "file", "ImportLimitLane"
9235
+ end
9236
+
9237
+ class ImportLimitsPeriod < Didit::Model
9238
+ field :starts_at, "starts_at", :datetime
9239
+ field :resets_at, "resets_at", :datetime
9240
+ end
9241
+
9082
9242
  class ImportProvider < Didit::Model
9083
9243
  field :key, "key", :string
9084
9244
  field :name, "name", :string
@@ -12233,6 +12393,16 @@ module Didit
12233
12393
  field :face_blocklist_hits_count, "face_blocklist_hits_count", :integer
12234
12394
  field :created_by_name, "created_by_name", :string
12235
12395
  field :created_by_email, "created_by_email", :string
12396
+ field :limit_lane, "limit_lane", :string
12397
+ field :waiting_reason, "waiting_reason", :string
12398
+ field :checks, "checks", [:array, "ImportCheck"]
12399
+ field :review_note, "review_note", :string
12400
+ field :limit_request, "limit_request", "ImportLimitRequest"
12401
+ field :granted_records, "granted_records", :integer
12402
+ field :can_undo, "can_undo", :boolean
12403
+ field :undone_count, "undone_count", :integer
12404
+ field :undone_at, "undone_at", :datetime
12405
+ field :undone_by, "undone_by", :string
12236
12406
  end
12237
12407
 
12238
12408
  # One webhook delivery attempt recorded for a verification session, with the exact request headers and body Didit
@@ -40,7 +40,8 @@ module Didit
40
40
  end
41
41
 
42
42
  # What a `partial_match` does to `database_validation.status`. Defaults to `NO_ACTION` (status stays `Approved`,
43
- # with a warning).
43
+ # with a warning). When the registry confirmed the identification number but returned a different name,
44
+ # `NO_ACTION` answers `In Review` instead of `Approved`; `DECLINE` still declines.
44
45
  module DatabaseValidationValidateParamsPartialMatchAction
45
46
  DECLINE = "DECLINE"
46
47
  NO_ACTION = "NO_ACTION"
@@ -61,9 +62,10 @@ module Didit
61
62
 
62
63
  # `Declined` when the overall `match_type` triggers a `DECLINE` action (`no_match_action` defaults to `DECLINE`,
63
64
  # `partial_match_action` to `NO_ACTION`); `In Review` when no service produced a usable comparison, for example
64
- # when the only selected service came back `REGISTRY_UNAVAILABLE` or `INCONCLUSIVE`; `Approved` otherwise. A
65
- # request that selected several services can be `Approved` on one service's match while another was unavailable,
66
- # so check `errors` and the per-service `outcome_code`s too.
65
+ # when the only selected service came back `REGISTRY_UNAVAILABLE` or `INCONCLUSIVE`, and when the registry
66
+ # confirmed the identification number but returned a different name while `partial_match_action` is `NO_ACTION`;
67
+ # `Approved` otherwise. A request that selected several services can be `Approved` on one service's match while
68
+ # another was unavailable, so check `errors` and the per-service `outcome_code`s too.
67
69
  module DatabaseValidationValidateResponseDatabaseValidationStatus
68
70
  APPROVED = "Approved"
69
71
  DECLINED = "Declined"
data/lib/didit/types.rb CHANGED
@@ -575,13 +575,26 @@ module Didit
575
575
  autoload :IdVerificationVerifyResponseIdVerificationWarnings, "didit/types/id_verification"
576
576
  autoload :IdVerificationVerifyResponseIdVerificationWarningsFeature, "didit/types/id_verification"
577
577
  autoload :IdVerificationVerifyResponseIdVerificationWarningsLogType, "didit/types/id_verification"
578
+ autoload :ImportCheck, "didit/types/components"
579
+ autoload :ImportCheckCode, "didit/types/components"
578
580
  autoload :ImportJobSummary, "didit/types/components"
579
581
  autoload :ImportJobSummaryFaceTemplates, "didit/types/components"
580
582
  autoload :ImportJobSummaryKind, "didit/types/components"
583
+ autoload :ImportJobSummaryLimitLane, "didit/types/components"
581
584
  autoload :ImportJobSummaryProgress, "didit/types/components"
582
585
  autoload :ImportJobSummarySource, "didit/types/components"
583
586
  autoload :ImportJobSummaryStartedBy, "didit/types/components"
584
587
  autoload :ImportJobSummaryState, "didit/types/components"
588
+ autoload :ImportJobSummaryWaitingReason, "didit/types/components"
589
+ autoload :ImportLimitLane, "didit/types/components"
590
+ autoload :ImportLimitRequest, "didit/types/components"
591
+ autoload :ImportLimitRequestStatus, "didit/types/components"
592
+ autoload :ImportLimits, "didit/types/components"
593
+ autoload :ImportLimitsLanes, "didit/types/components"
594
+ autoload :ImportLimitsLevel, "didit/types/components"
595
+ autoload :ImportLimitsMode, "didit/types/components"
596
+ autoload :ImportLimitsPeriod, "didit/types/components"
597
+ autoload :ImportLimitsReason, "didit/types/components"
585
598
  autoload :ImportProvider, "didit/types/components"
586
599
  autoload :ImportProviderCredentialFields, "didit/types/components"
587
600
  autoload :ImportProviderKey, "didit/types/components"
@@ -1269,10 +1282,12 @@ module Didit
1269
1282
  autoload :SessionImportError, "didit/types/components"
1270
1283
  autoload :SessionImportJob, "didit/types/components"
1271
1284
  autoload :SessionImportJobImportType, "didit/types/components"
1285
+ autoload :SessionImportJobLimitLane, "didit/types/components"
1272
1286
  autoload :SessionImportJobSource, "didit/types/components"
1273
1287
  autoload :SessionImportJobSourceFormat, "didit/types/components"
1274
1288
  autoload :SessionImportJobState, "didit/types/components"
1275
1289
  autoload :SessionImportJobStatus, "didit/types/components"
1290
+ autoload :SessionImportJobWaitingReason, "didit/types/components"
1276
1291
  autoload :SessionWebhookDelivery, "didit/types/components"
1277
1292
  autoload :SessionsAddImagesParamsModelType, "didit/types/sessions"
1278
1293
  autoload :SessionsAddImagesResponse, "didit/types/sessions"
data/lib/didit/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Didit
4
- VERSION = "2.23.0" # x-release-please-version
4
+ VERSION = "2.24.0" # x-release-please-version
5
5
  end
@@ -57,12 +57,15 @@ module Didit
57
57
  def list_jobs: (?scope: String, ?limit: Integer, ?request_options: Didit::request_options?) -> Didit::Types::SessionsImportsListJobsResponse
58
58
  def list_providers: (?request_options: Didit::request_options?) -> Didit::Types::SessionsImportsListProvidersResponse
59
59
  def pause: (String import_id, ?idempotency_key: String, ?request_options: Didit::request_options?) -> Didit::Types::SessionImportJob
60
+ def request_limit: (String import_id, ?note: String, ?idempotency_key: String, ?request_options: Didit::request_options?) -> Didit::Types::SessionImportJob
60
61
  def resume: (String import_id, ?idempotency_key: String, ?request_options: Didit::request_options?) -> Didit::Types::SessionImportJob
61
62
  def retrieve: (String import_id, ?request_options: Didit::request_options?) -> Didit::Types::SessionImportJob
63
+ def retrieve_limits: (?request_options: Didit::request_options?) -> Didit::Types::ImportLimits
62
64
  def retrieve_template: (?import_type: String, ?request_options: Didit::request_options?) -> String
63
65
  | (?import_type: String, ?request_options: Didit::request_options?) { (String chunk) -> void } -> nil
64
66
  def `retry`: (String import_id, ?credentials: Hash[String | Symbol, String], ?file: Didit::upload, ?idempotency_key: String, ?request_options: Didit::request_options?) -> Didit::Types::SessionImportJob
65
67
  def start: (String import_id, ?status_mapping: Hash[String | Symbol, String], ?face_templates: bool, ?lawful_basis_confirmed: bool, ?idempotency_key: String, ?request_options: Didit::request_options?) -> Didit::Types::SessionImportJob
68
+ def undo: (String import_id, ?idempotency_key: String, ?request_options: Didit::request_options?) -> Didit::Types::SessionImportJob
66
69
  end
67
70
  class Reviews < Didit::Resource
68
71
  def create: (String session_id, ?new_status: String?, ?comment: String?, ?idempotency_key: String, ?request_options: Didit::request_options?) -> Didit::Types::SessionsReviewsCreateResponse
@@ -1524,6 +1524,14 @@ module Didit
1524
1524
  VALUES: Array[String]
1525
1525
  end
1526
1526
 
1527
+ module ImportCheckCode
1528
+ ALL_APPROVED_NO_MEDIA: String
1529
+ REPEATED_DOCUMENTS: String
1530
+ IMPLAUSIBLE_DATES: String
1531
+
1532
+ VALUES: Array[String]
1533
+ end
1534
+
1527
1535
  module ImportJobSummaryKind
1528
1536
  SESSIONS: String
1529
1537
  BUSINESSES: String
@@ -1534,6 +1542,13 @@ module Didit
1534
1542
  VALUES: Array[String]
1535
1543
  end
1536
1544
 
1545
+ module ImportJobSummaryLimitLane
1546
+ PROVIDER: String
1547
+ FILE: String
1548
+
1549
+ VALUES: Array[String]
1550
+ end
1551
+
1537
1552
  module ImportJobSummarySource
1538
1553
  FILE: String
1539
1554
  API: String
@@ -1551,6 +1566,48 @@ module Didit
1551
1566
  ERRORS: String
1552
1567
  FAILED: String
1553
1568
  CANCELLED: String
1569
+ WAITING: String
1570
+ HELD: String
1571
+ DECLINED: String
1572
+ UNDOING: String
1573
+ UNDONE: String
1574
+
1575
+ VALUES: Array[String]
1576
+ end
1577
+
1578
+ module ImportJobSummaryWaitingReason
1579
+ LIMIT: String
1580
+
1581
+ VALUES: Array[String]
1582
+ end
1583
+
1584
+ module ImportLimitRequestStatus
1585
+ PENDING: String
1586
+ APPROVED: String
1587
+ DECLINED: String
1588
+
1589
+ VALUES: Array[String]
1590
+ end
1591
+
1592
+ module ImportLimitsLevel
1593
+ NEVER_PAID: String
1594
+ PAID: String
1595
+ CONTRACT: String
1596
+
1597
+ VALUES: Array[String]
1598
+ end
1599
+
1600
+ module ImportLimitsMode
1601
+ AUTOMATIC: String
1602
+ ALWAYS_ALLOWED: String
1603
+ TURNED_OFF: String
1604
+
1605
+ VALUES: Array[String]
1606
+ end
1607
+
1608
+ module ImportLimitsReason
1609
+ TURNED_OFF: String
1610
+ SANDBOX: String
1554
1611
 
1555
1612
  VALUES: Array[String]
1556
1613
  end
@@ -3607,6 +3664,13 @@ module Didit
3607
3664
  VALUES: Array[String]
3608
3665
  end
3609
3666
 
3667
+ module SessionImportJobLimitLane
3668
+ PROVIDER: String
3669
+ FILE: String
3670
+
3671
+ VALUES: Array[String]
3672
+ end
3673
+
3610
3674
  module SessionImportJobSource
3611
3675
  FILE: String
3612
3676
  API: String
@@ -3631,6 +3695,11 @@ module Didit
3631
3695
  ERRORS: String
3632
3696
  FAILED: String
3633
3697
  CANCELLED: String
3698
+ WAITING: String
3699
+ HELD: String
3700
+ DECLINED: String
3701
+ UNDOING: String
3702
+ UNDONE: String
3634
3703
 
3635
3704
  VALUES: Array[String]
3636
3705
  end
@@ -3643,6 +3712,17 @@ module Didit
3643
3712
  PAUSED: String
3644
3713
  CANCELLED: String
3645
3714
  READY: String
3715
+ WAITING: String
3716
+ HELD: String
3717
+ DECLINED: String
3718
+ UNDOING: String
3719
+ UNDONE: String
3720
+
3721
+ VALUES: Array[String]
3722
+ end
3723
+
3724
+ module SessionImportJobWaitingReason
3725
+ LIMIT: String
3646
3726
 
3647
3727
  VALUES: Array[String]
3648
3728
  end
@@ -7809,6 +7889,13 @@ module Didit
7809
7889
  def threat: () -> Hash[String, untyped]
7810
7890
  end
7811
7891
 
7892
+ class ImportCheck < Didit::Model
7893
+ def code: () -> String
7894
+ def count: () -> Integer
7895
+ def share: () -> Float
7896
+ def holds: () -> bool
7897
+ end
7898
+
7812
7899
  class ImportJobSummary < Didit::Model
7813
7900
  def id: () -> String?
7814
7901
  def kind: () -> String?
@@ -7829,6 +7916,16 @@ module Didit
7829
7916
  def created_at: () -> Time?
7830
7917
  def started_at: () -> Time?
7831
7918
  def completed_at: () -> Time?
7919
+ def limit_lane: () -> String?
7920
+ def waiting_reason: () -> String?
7921
+ def checks: () -> Array[Didit::Types::ImportCheck]?
7922
+ def review_note: () -> String?
7923
+ def limit_request: () -> Didit::Types::ImportLimitRequest?
7924
+ def granted_records: () -> Integer?
7925
+ def can_undo: () -> bool?
7926
+ def undone_count: () -> Integer?
7927
+ def undone_at: () -> Time?
7928
+ def undone_by: () -> String?
7832
7929
  end
7833
7930
 
7834
7931
  class ImportJobSummaryFaceTemplates < Didit::Model
@@ -7854,6 +7951,42 @@ module Didit
7854
7951
  def email: () -> String?
7855
7952
  end
7856
7953
 
7954
+ class ImportLimitLane < Didit::Model
7955
+ def limit: () -> Integer?
7956
+ def used: () -> Integer
7957
+ def remaining: () -> Integer?
7958
+ end
7959
+
7960
+ class ImportLimitRequest < Didit::Model
7961
+ def id: () -> String
7962
+ def status: () -> String
7963
+ def requested_records: () -> Integer
7964
+ def note: () -> String?
7965
+ def created_at: () -> Time
7966
+ def decided_at: () -> Time?
7967
+ def staff_note: () -> String?
7968
+ end
7969
+
7970
+ class ImportLimits < Didit::Model
7971
+ def mode: () -> String
7972
+ def level: () -> String
7973
+ def can_import: () -> bool
7974
+ def reason: () -> String?
7975
+ def checks_can_hold: () -> bool
7976
+ def period: () -> Didit::Types::ImportLimitsPeriod
7977
+ def lanes: () -> Didit::Types::ImportLimitsLanes
7978
+ end
7979
+
7980
+ class ImportLimitsLanes < Didit::Model
7981
+ def provider: () -> Didit::Types::ImportLimitLane
7982
+ def file: () -> Didit::Types::ImportLimitLane
7983
+ end
7984
+
7985
+ class ImportLimitsPeriod < Didit::Model
7986
+ def starts_at: () -> Time
7987
+ def resets_at: () -> Time
7988
+ end
7989
+
7857
7990
  class ImportProvider < Didit::Model
7858
7991
  def key: () -> String?
7859
7992
  def name: () -> String?
@@ -10775,6 +10908,16 @@ module Didit
10775
10908
  def face_blocklist_hits_count: () -> Integer?
10776
10909
  def created_by_name: () -> String?
10777
10910
  def created_by_email: () -> String?
10911
+ def limit_lane: () -> String?
10912
+ def waiting_reason: () -> String?
10913
+ def checks: () -> Array[Didit::Types::ImportCheck]?
10914
+ def review_note: () -> String?
10915
+ def limit_request: () -> Didit::Types::ImportLimitRequest?
10916
+ def granted_records: () -> Integer?
10917
+ def can_undo: () -> bool?
10918
+ def undone_count: () -> Integer?
10919
+ def undone_at: () -> Time?
10920
+ def undone_by: () -> String?
10778
10921
  end
10779
10922
 
10780
10923
  class SessionWebhookDelivery < Didit::Model
@@ -1780,6 +1780,8 @@ module Didit
1780
1780
 
1781
1781
  type sessions_imports_create_params_options = { ?region: String }
1782
1782
 
1783
+ type sessions_imports_request_limit_params = { ?note: String }
1784
+
1783
1785
  type sessions_imports_retry_params = { ?credentials: Hash[String | Symbol, String], ?file: Didit::upload }
1784
1786
 
1785
1787
  type sessions_imports_start_params = { ?status_mapping: Hash[String | Symbol, String], ?face_templates: bool, ?lawful_basis_confirmed: bool }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: didit-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.23.0
4
+ version: 2.24.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Didit