-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into ip/1429-v2
- Loading branch information
Showing
80 changed files
with
18,804 additions
and
1,450 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'simple_forms_api/form_remediation/configuration/vff_config' | ||
|
||
module Forms | ||
module SubmissionStatuses | ||
class PdfUrls | ||
VFF_FORMS = %w[20-10206 20-10207 21-0845 21-0966 21-0972 21-10210 21-4138 21-4142 21P-0847 26-4555 40-0247 | ||
40-10007].freeze | ||
|
||
def initialize(form_id:, submission_guid:) | ||
@form_id = form_id | ||
@submission_guid = submission_guid | ||
end | ||
|
||
def fetch_url | ||
config = determine_config | ||
SimpleFormsApi::FormRemediation::S3Client.fetch_presigned_url(@submission_guid, config:) | ||
end | ||
|
||
def supported? | ||
determine_config | ||
rescue Common::Exceptions::Forbidden | ||
false | ||
else | ||
true | ||
end | ||
|
||
private | ||
|
||
def determine_config | ||
return SimpleFormsApi::FormRemediation::Configuration::VffConfig.new if VFF_FORMS.include?(@form_id) | ||
|
||
raise Common::Exceptions::Forbidden, detail: "Form '#{@form_id}' does not support pdf downloads" | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
...d_representative_portal/db/migrate/20241212000100_create_ar_power_of_attorney_requests.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# frozen_string_literal: true | ||
|
||
class CreateArPowerOfAttorneyRequests < ActiveRecord::Migration[7.1] | ||
def change | ||
create_table :ar_power_of_attorney_requests, id: :uuid do |t| | ||
t.references :claimant, type: :uuid, foreign_key: { to_table: :user_accounts }, null: false | ||
t.datetime :created_at, null: false | ||
end | ||
end | ||
end |
27 changes: 27 additions & 0 deletions
27
...ative_portal/db/migrate/20241212000150_create_ar_power_of_attorney_request_resolutions.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# frozen_string_literal: true | ||
|
||
class CreateArPowerOfAttorneyRequestResolutions < ActiveRecord::Migration[7.1] | ||
disable_ddl_transaction! # Required for concurrent index creation | ||
|
||
def change | ||
create_table :ar_power_of_attorney_request_resolutions, id: :uuid do |t| | ||
t.references :power_of_attorney_request, | ||
type: :uuid, | ||
foreign_key: { to_table: :ar_power_of_attorney_requests }, | ||
null: false, | ||
index: { unique: true } | ||
t.string :resolving_type, null: false | ||
t.uuid :resolving_id, null: false | ||
t.text :reason_ciphertext | ||
t.text :encrypted_kms_key, null: false | ||
t.datetime :created_at, null: false | ||
end | ||
|
||
# Add a unique index to ensure one resolution per resolving_type and resolving_id combination | ||
add_index :ar_power_of_attorney_request_resolutions, | ||
[:resolving_type, :resolving_id], | ||
unique: true, | ||
name: 'unique_resolving_type_and_id', | ||
algorithm: :concurrently | ||
end | ||
end |
15 changes: 15 additions & 0 deletions
15
...ntative_portal/db/migrate/20241212000155_create_ar_power_of_attorney_request_decisions.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# frozen_string_literal: true | ||
|
||
class CreateArPowerOfAttorneyRequestDecisions < ActiveRecord::Migration[7.1] | ||
disable_ddl_transaction! # Required for concurrent index creation | ||
|
||
def change | ||
# Decisions act as a delegated subtype of Resolutions | ||
# This table stores specific 'decision' types for PowerOfAttorneyRequestResolutions | ||
create_table :ar_power_of_attorney_request_decisions, id: :uuid do |t| | ||
t.string 'type', null: false | ||
t.references 'creator', type: :uuid, foreign_key: { to_table: :user_accounts }, null: false | ||
end | ||
end | ||
end | ||
|
12 changes: 12 additions & 0 deletions
12
...ative_portal/db/migrate/20241212000160_create_ar_power_of_attorney_request_expirations.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# frozen_string_literal: true | ||
|
||
class CreateArPowerOfAttorneyRequestExpirations < ActiveRecord::Migration[7.1] | ||
disable_ddl_transaction! # Required for concurrent index creation | ||
|
||
def change | ||
# Expirations act as a delegated subtype of Resolutions | ||
# This table tracks expiration records for PowerOfAttorneyRequestResolutions | ||
create_table :ar_power_of_attorney_request_expirations, id: :uuid | ||
end | ||
end | ||
|
30 changes: 30 additions & 0 deletions
30
...ited_representative_portal/db/migrate/20241212000200_create_ar_power_of_attorney_forms.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# frozen_string_literal: true | ||
|
||
class CreateArPowerOfAttorneyForms < ActiveRecord::Migration[7.1] | ||
disable_ddl_transaction! # Required for concurrent index creation | ||
|
||
def change | ||
create_table :ar_power_of_attorney_forms, id: :uuid do |t| | ||
t.references :power_of_attorney_request, | ||
type: :uuid, | ||
foreign_key: { to_table: :ar_power_of_attorney_requests }, | ||
null: false, | ||
index: { unique: true } | ||
|
||
t.text :encrypted_kms_key, null: false | ||
t.text :data_ciphertext, null: false | ||
t.string :city_bidx, null: false | ||
t.string :state_bidx, null: false | ||
t.string :zipcode_bidx, null: false | ||
end | ||
|
||
# Add additional indexes for city, state, and zipcode | ||
add_index :ar_power_of_attorney_forms, | ||
[:city_bidx, :state_bidx, :zipcode_bidx], | ||
algorithm: :concurrently | ||
|
||
add_index :ar_power_of_attorney_forms, | ||
:zipcode_bidx, | ||
algorithm: :concurrently | ||
end | ||
end |
Oops, something went wrong.