diff --git a/go.mod b/go.mod index 180b9c0ee0e..6201adb8969 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/XSAM/otelsql v0.23.0 github.com/alexedwards/scs/redisstore v0.0.0-20221223131519-238b052508b6 github.com/alexedwards/scs/v2 v2.5.1 - github.com/aws/aws-sdk-go-v2 v1.27.0 + github.com/aws/aws-sdk-go-v2 v1.27.2 github.com/aws/aws-sdk-go-v2/config v1.27.14 github.com/aws/aws-sdk-go-v2/credentials v1.17.14 github.com/aws/aws-sdk-go-v2/feature/rds/auth v1.4.6 @@ -15,7 +15,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/ecr v1.28.1 github.com/aws/aws-sdk-go-v2/service/ecs v1.41.11 github.com/aws/aws-sdk-go-v2/service/rds v1.78.2 - github.com/aws/aws-sdk-go-v2/service/s3 v1.54.1 + github.com/aws/aws-sdk-go-v2/service/s3 v1.55.1 github.com/aws/aws-sdk-go-v2/service/ses v1.22.7 github.com/aws/aws-sdk-go-v2/service/ssm v1.50.2 github.com/aws/aws-sdk-go-v2/service/sts v1.28.8 @@ -25,7 +25,7 @@ require ( github.com/disintegration/imaging v1.6.2 github.com/dustin/go-humanize v1.0.1 github.com/felixge/httpsnoop v1.0.4 - github.com/gabriel-vasile/mimetype v1.4.2 + github.com/gabriel-vasile/mimetype v1.4.3 github.com/go-chi/chi/v5 v5.0.10 github.com/go-gomail/gomail v0.0.0-20160411212932-81ebce5c23df github.com/go-logr/zapr v1.3.0 @@ -36,7 +36,7 @@ require ( github.com/go-openapi/strfmt v0.22.0 github.com/go-openapi/swag v0.23.0 github.com/go-openapi/validate v0.23.0 - github.com/go-playground/validator/v10 v10.15.4 + github.com/go-playground/validator/v10 v10.21.0 github.com/go-swagger/go-swagger v0.30.5 github.com/gobuffalo/envy v1.10.2 github.com/gobuffalo/fizz v1.14.4 @@ -135,14 +135,14 @@ require ( github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.2 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.7 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.7 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.9 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.9 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.6 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.9 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.8 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.8 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.6 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.11 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.11 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.9 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.20.7 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.24.1 // indirect github.com/aymerick/douceur v0.2.0 // indirect @@ -210,7 +210,7 @@ require ( github.com/kr/fs v0.1.0 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect - github.com/leodido/go-urn v1.2.4 // indirect + github.com/leodido/go-urn v1.4.0 // indirect github.com/lithammer/fuzzysearch v1.1.8 // indirect github.com/luna-duclos/instrumentedsql v1.1.3 // indirect github.com/magiconair/properties v1.8.7 // indirect diff --git a/go.sum b/go.sum index 09c6d5f5e7f..bb18706b54c 100644 --- a/go.sum +++ b/go.sum @@ -42,8 +42,8 @@ github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kd github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/atomicgo/cursor v0.0.1/go.mod h1:cBON2QmmrysudxNBFthvMtN32r3jxVRIvzkUiF/RuIk= -github.com/aws/aws-sdk-go-v2 v1.27.0 h1:7bZWKoXhzI+mMR/HjdMx8ZCC5+6fY0lS5tr0bbgiLlo= -github.com/aws/aws-sdk-go-v2 v1.27.0/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= +github.com/aws/aws-sdk-go-v2 v1.27.2 h1:pLsTXqX93rimAOZG2FIYraDQstZaaGVVN4tNw65v0h8= +github.com/aws/aws-sdk-go-v2 v1.27.2/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 h1:x6xsQXGSmW6frevwDA+vi/wqhp1ct18mVXYN08/93to= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2/go.mod h1:lPprDr1e6cJdyYeGXnRaJoP4Md+cDBvi2eOj00BlGmg= github.com/aws/aws-sdk-go-v2/config v1.27.14 h1:QOg8Ud53rrmdjBHX080AaYUBhG2ER28kP/yjE7afF/0= @@ -54,14 +54,14 @@ github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.2 h1:HTAQSEibYaSioHzjOQssUJn github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.2/go.mod h1:NjUtmUEIimOc5tPw//xqKNK/spUqCTSbxjwzCrnsj8U= github.com/aws/aws-sdk-go-v2/feature/rds/auth v1.4.6 h1:oooec6yfvcyH11bYJoCyUyogSW+3OElzkSs1drdBW3A= github.com/aws/aws-sdk-go-v2/feature/rds/auth v1.4.6/go.mod h1:fmGX8e+24AMyHWDj+UnKDHT15Zx14ebJRC1LF0RZjGo= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.7 h1:lf/8VTF2cM+N4SLzaYJERKEWAXq8MOMpZfU6wEPWsPk= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.7/go.mod h1:4SjkU7QiqK2M9oozyMzfZ/23LmUY+h3oFqhdeP5OMiI= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.7 h1:4OYVp0705xu8yjdyoWix0r9wPIRXnIzzOoUpQVHIJ/g= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.7/go.mod h1:vd7ESTEvI76T2Na050gODNmNU7+OyKrIKroYTu4ABiI= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.9 h1:cy8ahBJuhtM8GTTSyOkfy6WVPV1IE+SS5/wfXUYuulw= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.9/go.mod h1:CZBXGLaJnEZI6EVNcPd7a6B5IC5cA/GkRWtu9fp3S6Y= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.9 h1:A4SYk07ef04+vxZToz9LWvAXl9LW0NClpPpMsi31cz0= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.9/go.mod h1:5jJcHuwDagxN+ErjQ3PU3ocf6Ylc/p9x+BLO/+X4iXw= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.6 h1:+/uB/M07Isd7UajQIYW2M4lDc/302gIWu1zMe0d7uKo= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.6/go.mod h1:7Gw/GeEezsEzpU/f1JWzSb1Y4M05taehNadic8jfF8U= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.9 h1:vHyZxoLVOgrI8GqX7OMHLXp4YYoxeEsrjweXKpye+ds= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.9/go.mod h1:z9VXZsWA2BvZNH1dT0ToUYwMu/CR9Skkj/TBX+mceZw= github.com/aws/aws-sdk-go-v2/service/cloudwatchevents v1.23.6 h1:s9TaIFJJ1zVLiKoxvclHNXjcZ+9+JnHvVgWfQgN9srQ= github.com/aws/aws-sdk-go-v2/service/cloudwatchevents v1.23.6/go.mod h1:9h+vJwhl865wjyC7AQOBX4LVQxgntBYrf3p5WtzOSi0= github.com/aws/aws-sdk-go-v2/service/ecr v1.28.1 h1:tfeJG1axeFZX0O5HLOXMyq3W48zLkl5mO/PBccMNTaA= @@ -70,16 +70,16 @@ github.com/aws/aws-sdk-go-v2/service/ecs v1.41.11 h1:/27vG0bgOsJmMqSbjCuF4UdEWZy github.com/aws/aws-sdk-go-v2/service/ecs v1.41.11/go.mod h1:ixRB9qcKi35waDtPb6uw31Eb7Df+MOcjtpWxxPO5XvI= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.8 h1:Etk3MkNNAXLKkOkrLcacOZhbH+ICPpM05Wueg/4FZGw= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.8/go.mod h1:LwdzRBRLEOcMRhcM31ltkzl8Nw4XpnmBkOksr+LY53A= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.8 h1:gwdGHxiV5f6Of48JJIZVD7sx45kT1l9kYdoUH5oQTZM= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.8/go.mod h1:C9Glc6N50uIJqPPeL6N3spW/wzGyeQsQmecnKS7DTR4= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.6 h1:T9S8fTr0gppdTU6rjrSBl9VFiabxUw41dqzUSozuQP8= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.6/go.mod h1:mQUaFeeWztcGGBaOxSykT9H/qF+FGw3sCGERh3APsRc= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.11 h1:4vt9Sspk59EZyHCAEMaktHKiq0C09noRTQorXD/qV+s= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.11/go.mod h1:5jHR79Tv+Ccq6rwYh+W7Nptmw++WiFafMfR42XhwNl8= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.11 h1:o4T+fKxA3gTMcluBNZZXE9DNaMkJuUL1O3mffCUjoJo= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.11/go.mod h1:84oZdJ+VjuJKs9v1UTC9NaodRZRseOXCTgku+vQJWR8= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.9 h1:TE2i0A9ErH1YfRSvXfCr2SQwfnqsoJT9nPQ9kj0lkxM= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.9/go.mod h1:9TzXX3MehQNGPwCZ3ka4CpwQsoAMWSF48/b+De9rfVM= github.com/aws/aws-sdk-go-v2/service/rds v1.78.2 h1:xrRLjWcGzeayJT66aP9qnMrn1iKXYaK/+efukoitIXs= github.com/aws/aws-sdk-go-v2/service/rds v1.78.2/go.mod h1:RJaz7FA+m7alWIPQmS6biVBJWY8j6lZ3wqZOf4BtGlg= -github.com/aws/aws-sdk-go-v2/service/s3 v1.54.1 h1:q8hQJhndXQXnCnd4nG608lfhapDvylff9CCQyWX0tHQ= -github.com/aws/aws-sdk-go-v2/service/s3 v1.54.1/go.mod h1:4QIYvQFYGX6Q2qhLW6KeJO0iXQUFJ/WLBL0pSdazHwA= +github.com/aws/aws-sdk-go-v2/service/s3 v1.55.1 h1:UAxBuh0/8sFJk1qOkvOKewP5sWeWaTPDknbQz0ZkDm0= +github.com/aws/aws-sdk-go-v2/service/s3 v1.55.1/go.mod h1:hWjsYGjVuqCgfoveVcVFPXIWgz0aByzwaxKlN1StKcM= github.com/aws/aws-sdk-go-v2/service/ses v1.22.7 h1:9Ytj+pcI/hOjX4m8bpjkbL05XB6GjrHqGuMxFh/jRuA= github.com/aws/aws-sdk-go-v2/service/ses v1.22.7/go.mod h1:sn88fSJSI5LdRbjilmxp2TYs12A6619qj0z1D0fcbuE= github.com/aws/aws-sdk-go-v2/service/ssm v1.50.2 h1:NgeX1fhHrhMqVgF9tydI7WIFDsqReuodPk9bgtQBHoM= @@ -157,8 +157,8 @@ github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7z github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= -github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= +github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0= +github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-chi/chi/v5 v5.0.10 h1:rLz5avzKpjqxrYwXNfmjkrYYXOyLJd37pz53UFHC6vk= github.com/go-chi/chi/v5 v5.0.10/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= @@ -201,8 +201,8 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.15.4 h1:zMXza4EpOdooxPel5xDqXEdXG5r+WggpvnAKMsalBjs= -github.com/go-playground/validator/v10 v10.15.4/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/go-playground/validator/v10 v10.21.0 h1:4fZA11ovvtkdgaeev9RGWPgc1uj3H8W+rNYyH/ySBb0= +github.com/go-playground/validator/v10 v10.21.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= @@ -420,8 +420,8 @@ github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= -github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= +github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= +github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= github.com/lestrrat-go/backoff/v2 v2.0.8 h1:oNb5E5isby2kiro9AgdHLv5N5tint1AnDVVf2E2un5A= github.com/lestrrat-go/backoff/v2 v2.0.8/go.mod h1:rHP/q/r9aT27n24JQLa7JhSQZCKBBOiM/uP402WwN8Y= github.com/lestrrat-go/blackmagic v1.0.0/go.mod h1:TNgH//0vYSs8VXDCfkZLgIrVTTXQELZffUV0tz3MtdQ= @@ -619,7 +619,6 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= diff --git a/migrations/app/migrations_manifest.txt b/migrations/app/migrations_manifest.txt index 5f0e618a3f0..44f70216690 100644 --- a/migrations/app/migrations_manifest.txt +++ b/migrations/app/migrations_manifest.txt @@ -928,6 +928,7 @@ 20240502183613_add_support_for_standalone_payment_cap.up.sql 20240503123556_add_diversion_reason_to_mto_shipments.up.sql 20240503181242_add_origin_dest_sit_auth_end_date_to_mto_shipments_table.up.sql +20240506214039_add_submitted_columns_to_ppm_document_tables.up.sql 20240507133524_add_locked_moves_column_to_moves_table.up.sql 20240507155817_add_moving_expense_weight_stored.up.sql 20240507192232_add_emplid_col_to_service_members_table.up.sql @@ -940,4 +941,14 @@ 20240516230021_19686_add_third_address_shipments.up.sql 20240521160335_backfill_LOA_FY_TX.up.sql 20240521184834_add_standalone_field_to_service_items.up.sql +20240522124339_add_csr_to_roles.up.sql +20240524214247_add_sit_location_moving_expenses.up.sql +20240530020648_adding_standalone_crate_service_param.up.sql +20240530084720_rename_qae_csr_to_just_qae.up.sql +20240531050324_adding_standalone_crate_cap.up.sql +20240531152430_migrate_data_to_new_ppm_statuses.up.sql +20240531152526_remove_ppm_statuses_no_longer_used.up.sql 20240531153321_update_tio_role_name.up.sql +20240531154303_add_more_submitted_columns_to_ppm_document_tables.up.sql +20240603040207_add_submitted_cols_to_moving_expenses.up.sql +20240606195706_adding_uncapped_request_total.up.sql diff --git a/migrations/app/schema/20240506214039_add_submitted_columns_to_ppm_document_tables.up.sql b/migrations/app/schema/20240506214039_add_submitted_columns_to_ppm_document_tables.up.sql new file mode 100644 index 00000000000..619f1835d9c --- /dev/null +++ b/migrations/app/schema/20240506214039_add_submitted_columns_to_ppm_document_tables.up.sql @@ -0,0 +1,19 @@ +ALTER TABLE weight_tickets + ADD COLUMN IF NOT EXISTS submitted_empty_weight INT4 DEFAULT NULL, + ADD COLUMN IF NOT EXISTS submitted_full_weight INT4 DEFAULT NULL; + +COMMENT ON COLUMN weight_tickets.submitted_empty_weight IS 'Stores the customer submitted empty_weight.'; +COMMENT ON COLUMN weight_tickets.submitted_full_weight IS 'Stores the customer submitted full_weight.'; + +ALTER TABLE progear_weight_tickets ADD COLUMN IF NOT EXISTS submitted_weight INT4 DEFAULT NULL; + +COMMENT ON COLUMN progear_weight_tickets.submitted_weight IS 'Stores the customer submitted weight.'; + +ALTER TABLE moving_expenses + ADD COLUMN IF NOT EXISTS submitted_amount INT4 DEFAULT NULL, + ADD COLUMN IF NOT EXISTS submitted_sit_start_date DATE DEFAULT NULL, + ADD COLUMN IF NOT EXISTS submitted_sit_end_date DATE DEFAULT NULL; + +COMMENT ON COLUMN moving_expenses.submitted_amount IS 'Stores the customer submitted amount.'; +COMMENT ON COLUMN moving_expenses.submitted_sit_start_date IS 'Stores the customer submitted sit_start_date.'; +COMMENT ON COLUMN moving_expenses.submitted_sit_end_date IS 'Stores the customer submitted sit_end_date.'; diff --git a/migrations/app/schema/20240522124339_add_csr_to_roles.up.sql b/migrations/app/schema/20240522124339_add_csr_to_roles.up.sql new file mode 100644 index 00000000000..4b44df1def7 --- /dev/null +++ b/migrations/app/schema/20240522124339_add_csr_to_roles.up.sql @@ -0,0 +1,9 @@ +-- Insert CSR as a separate role as part of the feature to split QAE/CSR into two separate roles +INSERT INTO roles (id, role_type, created_at, updated_at, role_name) +VALUES ( + '72432922-BF2E-45DE-8837-1A458F5D1011', + 'customer_service_representative', + now(), + now(), + 'Customer Service Representative' + ); \ No newline at end of file diff --git a/migrations/app/schema/20240524214247_add_sit_location_moving_expenses.up.sql b/migrations/app/schema/20240524214247_add_sit_location_moving_expenses.up.sql new file mode 100644 index 00000000000..0e1ab04d6d6 --- /dev/null +++ b/migrations/app/schema/20240524214247_add_sit_location_moving_expenses.up.sql @@ -0,0 +1,2 @@ +ALTER TABLE moving_expenses ADD COLUMN IF NOT EXISTS sit_location sit_location_type NULL; +COMMENT ON COLUMN moving_expenses.sit_location IS 'The location where PPM SIT was stored'; \ No newline at end of file diff --git a/migrations/app/schema/20240530020648_adding_standalone_crate_service_param.up.sql b/migrations/app/schema/20240530020648_adding_standalone_crate_service_param.up.sql new file mode 100644 index 00000000000..22024d15aad --- /dev/null +++ b/migrations/app/schema/20240530020648_adding_standalone_crate_service_param.up.sql @@ -0,0 +1,11 @@ +INSERT INTO service_item_param_keys +(id,key,description,type,origin,created_at,updated_at) +VALUES +('4313f804-f6c7-496a-88a0-089d6c588b75','StandaloneCrate', 'Boolean representing standalone or not', 'BOOLEAN', 'PRIME', now(), now()), +('ca1d6588-880e-45b6-9761-aa2ce914e2f6','StandaloneCrateCap', 'Standalone Cap value used for this service', 'INTEGER', 'PRIME', now(), now()); + +INSERT INTO service_params +(id,service_id,service_item_param_key_id,created_at,updated_at,is_optional) +VALUES +('3a051dbf-f8b1-4c09-9ed8-74e155c69a5d',(SELECT id FROM re_services WHERE code='DCRT'),(SELECT id FROM service_item_param_keys where key='StandaloneCrate'), now(), now(), 'true'), +('b1de3b51-9cd8-43ab-b186-ca4c7796be03',(SELECT id FROM re_services WHERE code='DCRT'),(SELECT id FROM service_item_param_keys where key='StandaloneCrateCap'), now(), now(), 'true'); diff --git a/migrations/app/schema/20240530084720_rename_qae_csr_to_just_qae.up.sql b/migrations/app/schema/20240530084720_rename_qae_csr_to_just_qae.up.sql new file mode 100644 index 00000000000..3e8c318647e --- /dev/null +++ b/migrations/app/schema/20240530084720_rename_qae_csr_to_just_qae.up.sql @@ -0,0 +1,6 @@ +-- Rename QAE/CSR to just QAE per E-05337 +UPDATE roles +SET role_name = 'Quality Assurance Evaluator', + role_type = 'qae', + updated_at = now() +WHERE id = 'a2af3cc0-d0cd-4a29-8092-70ad45723090'; \ No newline at end of file diff --git a/migrations/app/schema/20240531050324_adding_standalone_crate_cap.up.sql b/migrations/app/schema/20240531050324_adding_standalone_crate_cap.up.sql new file mode 100644 index 00000000000..0d2c3de87d9 --- /dev/null +++ b/migrations/app/schema/20240531050324_adding_standalone_crate_cap.up.sql @@ -0,0 +1,4 @@ +INSERT into application_parameters + (id, parameter_name, parameter_value) +VALUES + ('61a6c498-42d3-4b49-b368-b6165cd1ce18', 'standaloneCrateCap', '100000'); \ No newline at end of file diff --git a/migrations/app/schema/20240531152430_migrate_data_to_new_ppm_statuses.up.sql b/migrations/app/schema/20240531152430_migrate_data_to_new_ppm_statuses.up.sql new file mode 100644 index 00000000000..041e6913ade --- /dev/null +++ b/migrations/app/schema/20240531152430_migrate_data_to_new_ppm_statuses.up.sql @@ -0,0 +1,17 @@ +--- rename existing enum +ALTER TYPE ppm_shipment_status RENAME TO ppm_shipment_status_temp; + +-- create a new enum with both old and new statuses +-- why? because both old and new statuses must exist in the enum to do the update setting old to new +CREATE TYPE ppm_shipment_status AS ENUM('DRAFT', 'SUBMITTED', 'WAITING_ON_CUSTOMER', 'NEEDS_ADVANCE_APPROVAL', 'NEEDS_PAYMENT_APPROVAL', 'PAYMENT_APPROVED', 'NEEDS_CLOSEOUT', 'CLOSEOUT_COMPLETE'); + +-- alter the ppm shipments status column to use the new enum +ALTER TABLE ppm_shipments ALTER COLUMN status TYPE ppm_shipment_status USING status::text::ppm_shipment_status; + +-- get rid of the temp type +DROP TYPE ppm_shipment_status_temp; + +-- Remove references to the old value from the ppm_shipments table (there probably aren't any, but this is for safety) +UPDATE ppm_shipments set status = 'NEEDS_CLOSEOUT' WHERE status = 'NEEDS_PAYMENT_APPROVAL'; +UPDATE ppm_shipments set status = 'CLOSEOUT_COMPLETE' WHERE status = 'PAYMENT_APPROVED'; + diff --git a/migrations/app/schema/20240531152526_remove_ppm_statuses_no_longer_used.up.sql b/migrations/app/schema/20240531152526_remove_ppm_statuses_no_longer_used.up.sql new file mode 100644 index 00000000000..355c4932c99 --- /dev/null +++ b/migrations/app/schema/20240531152526_remove_ppm_statuses_no_longer_used.up.sql @@ -0,0 +1,12 @@ +--- rename existing enum +ALTER TYPE ppm_shipment_status RENAME TO ppm_shipment_status_temp; + +-- create a new enum with both old and new statuses +-- why? because both old and new statuses must exist in the enum to do the update setting old to new +CREATE TYPE ppm_shipment_status AS ENUM('DRAFT', 'SUBMITTED', 'WAITING_ON_CUSTOMER', 'NEEDS_ADVANCE_APPROVAL', 'NEEDS_CLOSEOUT', 'CLOSEOUT_COMPLETE'); + +-- alter the ppm shipments status column to use the new enum +ALTER TABLE ppm_shipments ALTER COLUMN status TYPE ppm_shipment_status USING status::text::ppm_shipment_status; + +-- get rid of the temp type +DROP TYPE ppm_shipment_status_temp; diff --git a/migrations/app/schema/20240531154303_add_more_submitted_columns_to_ppm_document_tables.up.sql b/migrations/app/schema/20240531154303_add_more_submitted_columns_to_ppm_document_tables.up.sql new file mode 100644 index 00000000000..f807821fb70 --- /dev/null +++ b/migrations/app/schema/20240531154303_add_more_submitted_columns_to_ppm_document_tables.up.sql @@ -0,0 +1,13 @@ +ALTER TABLE weight_tickets + ADD COLUMN IF NOT EXISTS submitted_owns_trailer boolean DEFAULT NULL, + ADD COLUMN IF NOT EXISTS submitted_trailer_meets_criteria boolean DEFAULT NULL; + +COMMENT ON COLUMN weight_tickets.submitted_owns_trailer IS 'Stores the customer submitted owns_trailer.'; +COMMENT ON COLUMN weight_tickets.submitted_trailer_meets_criteria IS 'Stores the customer submitted trailer_meets_criteria.'; + +ALTER TABLE progear_weight_tickets + ADD COLUMN IF NOT EXISTS submitted_belongs_to_self boolean DEFAULT NULL, + ADD COLUMN IF NOT EXISTS submitted_has_weight_tickets boolean DEFAULT NULL; + +COMMENT ON COLUMN progear_weight_tickets.submitted_belongs_to_self IS 'Stores the customer belongs_to_self.'; +COMMENT ON COLUMN progear_weight_tickets.submitted_has_weight_tickets IS 'Stores the customer submitted has_weight_tickets.'; diff --git a/migrations/app/schema/20240603040207_add_submitted_cols_to_moving_expenses.up.sql b/migrations/app/schema/20240603040207_add_submitted_cols_to_moving_expenses.up.sql new file mode 100644 index 00000000000..89550db0f9e --- /dev/null +++ b/migrations/app/schema/20240603040207_add_submitted_cols_to_moving_expenses.up.sql @@ -0,0 +1,6 @@ +ALTER TABLE moving_expenses + ADD COLUMN IF NOT EXISTS submitted_description varchar DEFAULT NULL, + ADD COLUMN IF NOT EXISTS submitted_moving_expense_type moving_expense_type DEFAULT NULL; + +COMMENT ON COLUMN moving_expenses.submitted_description IS 'Stores the customer submitted description'; +COMMENT ON COLUMN moving_expenses.submitted_moving_expense_type IS 'Stores the customer submitted moving_expense_type.'; diff --git a/migrations/app/schema/20240606195706_adding_uncapped_request_total.up.sql b/migrations/app/schema/20240606195706_adding_uncapped_request_total.up.sql new file mode 100644 index 00000000000..c7ae330e18e --- /dev/null +++ b/migrations/app/schema/20240606195706_adding_uncapped_request_total.up.sql @@ -0,0 +1,9 @@ +INSERT INTO service_item_param_keys +(id,key,description,type,origin,created_at,updated_at) +VALUES +('71b27fef-a328-40ab-9e21-a22000e9a4c2','UncappedRequestTotal', 'Total request before cap', 'INTEGER', 'PRICER', now(), now()); + +INSERT INTO service_params +(id,service_id,service_item_param_key_id,created_at,updated_at,is_optional) +VALUES +('e246ad86-1ad5-43c8-ab22-e0c6dc941200',(SELECT id FROM re_services WHERE code='DCRT'),(SELECT id FROM service_item_param_keys where key='UncappedRequestTotal'), now(), now(), 'true'); \ No newline at end of file diff --git a/pkg/assets/paperwork/formtemplates/SSWPDFTemplate.pdf b/pkg/assets/paperwork/formtemplates/SSWPDFTemplate.pdf index 134d51b0be1..26ddb380d8d 100644 Binary files a/pkg/assets/paperwork/formtemplates/SSWPDFTemplate.pdf and b/pkg/assets/paperwork/formtemplates/SSWPDFTemplate.pdf differ diff --git a/pkg/factory/ppm_shipment_factory.go b/pkg/factory/ppm_shipment_factory.go index eea4c81d089..e54e13e54e5 100644 --- a/pkg/factory/ppm_shipment_factory.go +++ b/pkg/factory/ppm_shipment_factory.go @@ -550,13 +550,13 @@ func BuildPPMShipmentReadyForFinalCustomerCloseOutWithAllDocTypes(db *pop.Connec return ppmShipment } -// BuildPPMShipmentThatNeedsPaymentApproval creates a PPMShipment that +// BuildPPMShipmentThatNeedsCloseout creates a PPMShipment that // is waiting for a counselor to review after a customer has submitted // all the necessary documents. // // This function needs to accept customizations, but that somewhat // complicates the private functions above -func BuildPPMShipmentThatNeedsPaymentApproval(db *pop.Connection, userUploader *uploader.UserUploader, customs []Customization) models.PPMShipment { +func BuildPPMShipmentThatNeedsCloseout(db *pop.Connection, userUploader *uploader.UserUploader, customs []Customization) models.PPMShipment { // It's easier to use some of the data from other downstream // functions if we have them go first and then make our changes on // top of those changes. @@ -580,7 +580,7 @@ func BuildPPMShipmentThatNeedsPaymentApproval(db *pop.Connection, userUploader * ppmShipment.SignedCertification = &signedCert - ppmShipment.Status = models.PPMShipmentStatusNeedsPaymentApproval + ppmShipment.Status = models.PPMShipmentStatusNeedsCloseout if ppmShipment.SubmittedAt == nil { ppmShipment.SubmittedAt = models.TimePointer(time.Now()) } @@ -598,7 +598,7 @@ func BuildPPMShipmentThatNeedsPaymentApproval(db *pop.Connection, userUploader * return ppmShipment } -// BuildPPMShipmentThatNeedsPaymentApprovalWithAllDocTypes creates a +// BuildPPMShipmentThatNeedsCloseoutWithAllDocTypes creates a // PPMShipment that contains one of each type of customer document // (weight ticket, pro-gear weight ticket, and a moving expense) that // is waiting for a counselor to review after a customer has submitted @@ -606,11 +606,11 @@ func BuildPPMShipmentThatNeedsPaymentApproval(db *pop.Connection, userUploader * // // This function does not accept customizations to reduce the // complexity of supporting different variations for tests -func BuildPPMShipmentThatNeedsPaymentApprovalWithAllDocTypes(db *pop.Connection, userUploader *uploader.UserUploader) models.PPMShipment { +func BuildPPMShipmentThatNeedsCloseoutWithAllDocTypes(db *pop.Connection, userUploader *uploader.UserUploader) models.PPMShipment { // It's easier to use some of the data from other downstream // functions if we have them go first and then make our changes on // top of those changes. - ppmShipment := BuildPPMShipmentThatNeedsPaymentApproval(db, userUploader, nil) + ppmShipment := BuildPPMShipmentThatNeedsCloseout(db, userUploader, nil) AddProgearWeightTicketToPPMShipment(db, &ppmShipment, userUploader, nil) AddMovingExpenseToPPMShipment(db, &ppmShipment, userUploader, nil) @@ -634,9 +634,9 @@ func BuildPPMShipmentWithApprovedDocumentsMissingPaymentPacket(db *pop.Connectio // It's easier to use some of the data from other downstream // functions if we have them go first and then make our changes on // top of those changes. - ppmShipment := BuildPPMShipmentThatNeedsPaymentApproval(db, userUploader, customs) + ppmShipment := BuildPPMShipmentThatNeedsCloseout(db, userUploader, customs) - ppmShipment.Status = models.PPMShipmentStatusPaymentApproved + ppmShipment.Status = models.PPMShipmentStatusCloseoutComplete ppmShipment.ReviewedAt = models.TimePointer(time.Now()) approvedStatus := models.PPMDocumentStatusApproved @@ -778,7 +778,7 @@ func BuildPPMShipmentThatNeedsToBeResubmitted(db *pop.Connection, userUploader * // It's easier to use some of the data from other downstream // functions if we have them go first and then make our changes on // top of those changes. - ppmShipment := BuildPPMShipmentThatNeedsPaymentApproval(db, userUploader, nil) + ppmShipment := BuildPPMShipmentThatNeedsCloseout(db, userUploader, nil) // Document that got rejected. This would normally already exist // and would just need to be updated to change the status, but for diff --git a/pkg/factory/ppm_shipment_factory_test.go b/pkg/factory/ppm_shipment_factory_test.go index 0dd41e25ed7..0dff96de000 100644 --- a/pkg/factory/ppm_shipment_factory_test.go +++ b/pkg/factory/ppm_shipment_factory_test.go @@ -306,12 +306,12 @@ func (suite *FactorySuite) TestBuildPPMShipment() { }) suite.Run("PPM Shipment that needs approval with all doc types", func() { - // Under test: BuildPPMShipmentThatNeedsPaymentApprovalWithAllDocTypes + // Under test: BuildPPMShipmentThatNeedsCloseoutWithAllDocTypes // Set up: build without custom user uploader // Expected outcome: New PPMShipment should be created with // Weight Ticket, Progear Weight Ticket, and Moving Expense - ppmShipment := BuildPPMShipmentThatNeedsPaymentApprovalWithAllDocTypes(suite.DB(), nil) + ppmShipment := BuildPPMShipmentThatNeedsCloseoutWithAllDocTypes(suite.DB(), nil) suite.NotNil(ppmShipment.ActualPickupPostalCode) suite.Equal(ppmShipment.PickupPostalCode, *ppmShipment.ActualPickupPostalCode) @@ -320,7 +320,7 @@ func (suite *FactorySuite) TestBuildPPMShipment() { *ppmShipment.ActualDestinationPostalCode) suite.NotNil(ppmShipment.AOAPacket) suite.NotNil(ppmShipment.AOAPacketID) - suite.Equal(models.PPMShipmentStatusNeedsPaymentApproval, ppmShipment.Status) + suite.Equal(models.PPMShipmentStatusNeedsCloseout, ppmShipment.Status) suite.NotEmpty(ppmShipment.WeightTickets) suite.Equal(1, len(ppmShipment.WeightTickets)) @@ -339,7 +339,7 @@ func (suite *FactorySuite) TestBuildPPMShipment() { }) suite.Run("PPM Shipment that is missing payment packet", func() { - // Under test: BuildPPMShipmentThatNeedsPaymentApprovalWithAllDocTypes + // Under test: BuildPPMShipmentThatNeedsCloseoutWithAllDocTypes // Set up: build without custom user uploader // Expected outcome: New PPMShipment should be created with // Weight Ticket, Progear Weight Ticket, and Moving Expense @@ -353,7 +353,7 @@ func (suite *FactorySuite) TestBuildPPMShipment() { *ppmShipment.ActualDestinationPostalCode) suite.NotNil(ppmShipment.AOAPacket) suite.NotNil(ppmShipment.AOAPacketID) - suite.Equal(models.PPMShipmentStatusPaymentApproved, ppmShipment.Status) + suite.Equal(models.PPMShipmentStatusCloseoutComplete, ppmShipment.Status) suite.NotEmpty(ppmShipment.WeightTickets) suite.Equal(1, len(ppmShipment.WeightTickets)) diff --git a/pkg/factory/role_factory.go b/pkg/factory/role_factory.go index 60483c15ef5..d16bdcaa9f0 100644 --- a/pkg/factory/role_factory.go +++ b/pkg/factory/role_factory.go @@ -97,12 +97,23 @@ func GetTraitTOORole() []Customization { } } -func GetTraitQaeCsrRole() []Customization { +func GetTraitQaeRole() []Customization { return []Customization{ { Model: roles.Role{ - RoleType: roles.RoleTypeQaeCsr, - RoleName: "Quality Assurance and Customer Service", + RoleType: roles.RoleTypeQae, + RoleName: "Quality Assurance Evaluator", + }, + }, + } +} + +func GetTraitCustomerServiceRepresentativeRole() []Customization { + return []Customization{ + { + Model: roles.Role{ + RoleType: roles.RoleTypeCustomerServiceRepresentative, + RoleName: "Customer Service Representative", }, }, } diff --git a/pkg/factory/role_factory_test.go b/pkg/factory/role_factory_test.go index 4d7bb97a35c..f82470d2488 100644 --- a/pkg/factory/role_factory_test.go +++ b/pkg/factory/role_factory_test.go @@ -120,17 +120,17 @@ func (suite *FactorySuite) TestBuildRoleTraits() { suite.Equal(roles.RoleTypeTOO, role.RoleType) }) - suite.Run("Successful creation of role with QaeCsr trait", func() { + suite.Run("Successful creation of role with Qae trait", func() { // Under test: BuildRole - // Set up: Create a Role with a trait (GetTraitQaeCsrRole) + // Set up: Create a Role with a trait (GetTraitQaeRole) // Expected outcome:Role should be created with TIO RoleType and RoleName role := BuildRole(suite.DB(), nil, []Trait{ - GetTraitQaeCsrRole, + GetTraitQaeRole, }) - suite.Equal(roles.RoleName("Quality Assurance and Customer Service"), role.RoleName) - suite.Equal(roles.RoleTypeQaeCsr, role.RoleType) + suite.Equal(roles.RoleName("Quality Assurance Evaluator"), role.RoleName) + suite.Equal(roles.RoleTypeQae, role.RoleType) }) suite.Run("Successful creation of role with Contracting Officer trait", func() { diff --git a/pkg/gen/ghcapi/configure_mymove.go b/pkg/gen/ghcapi/configure_mymove.go index 86b0fd7c50e..8085352f929 100644 --- a/pkg/gen/ghcapi/configure_mymove.go +++ b/pkg/gen/ghcapi/configure_mymove.go @@ -11,6 +11,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/transcom/mymove/pkg/gen/ghcapi/ghcoperations" + "github.com/transcom/mymove/pkg/gen/ghcapi/ghcoperations/application_parameters" "github.com/transcom/mymove/pkg/gen/ghcapi/ghcoperations/customer" "github.com/transcom/mymove/pkg/gen/ghcapi/ghcoperations/customer_support_remarks" "github.com/transcom/mymove/pkg/gen/ghcapi/ghcoperations/evaluation_reports" @@ -258,6 +259,11 @@ func configureAPI(api *ghcoperations.MymoveAPI) http.Handler { return middleware.NotImplemented("operation pws_violations.GetPWSViolations has not yet been implemented") }) } + if api.ApplicationParametersGetParamHandler == nil { + api.ApplicationParametersGetParamHandler = application_parameters.GetParamHandlerFunc(func(params application_parameters.GetParamParams) middleware.Responder { + return middleware.NotImplemented("operation application_parameters.GetParam has not yet been implemented") + }) + } if api.PaymentRequestsGetPaymentRequestHandler == nil { api.PaymentRequestsGetPaymentRequestHandler = payment_requests.GetPaymentRequestHandlerFunc(func(params payment_requests.GetPaymentRequestParams) middleware.Responder { return middleware.NotImplemented("operation payment_requests.GetPaymentRequest has not yet been implemented") diff --git a/pkg/gen/ghcapi/embedded_spec.go b/pkg/gen/ghcapi/embedded_spec.go index 1a3a39a9897..e706d3737a1 100644 --- a/pkg/gen/ghcapi/embedded_spec.go +++ b/pkg/gen/ghcapi/embedded_spec.go @@ -36,6 +36,43 @@ func init() { }, "basePath": "/ghc/v1", "paths": { + "/application_parameters/{parameterName}": { + "get": { + "description": "Searches for an application parameter by name, returns nil if not found", + "tags": [ + "application_parameters" + ], + "summary": "Searches for an application parameter by name, returns nil if not found", + "operationId": "getParam", + "parameters": [ + { + "type": "string", + "format": "string", + "description": "Parameter Name", + "name": "parameterName", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Application Parameters", + "schema": { + "$ref": "#/definitions/ApplicationParameters" + } + }, + "400": { + "description": "invalid request" + }, + "401": { + "description": "request requires user authentication" + }, + "500": { + "description": "server error" + } + } + } + }, "/counseling/orders/{orderID}": { "patch": { "description": "All fields sent in this request will be set on the order referenced", @@ -5361,6 +5398,26 @@ func init() { }, "x-nullable": true }, + "ApplicationParameters": { + "type": "object", + "properties": { + "parameterName": { + "type": "string", + "format": "string", + "x-nullable": true + }, + "parameterValue": { + "type": "string", + "format": "string", + "x-nullable": true + }, + "validationCode": { + "type": "string", + "format": "string", + "x-nullable": true + } + } + }, "ApproveSITExtension": { "required": [ "approvedDays" @@ -6125,7 +6182,8 @@ func init() { "$ref": "#/definitions/BackupContact" }, "cacValidated": { - "type": "boolean" + "type": "boolean", + "x-nullable": true }, "current_address": { "$ref": "#/definitions/Address" @@ -6995,6 +7053,11 @@ func init() { "eTag": { "type": "string" }, + "estimatedPrice": { + "type": "integer", + "format": "cents", + "x-nullable": true + }, "estimatedWeight": { "description": "estimated weight of the shuttle service item provided by the prime", "type": "integer", @@ -7103,6 +7166,10 @@ func init() { "format": "date", "x-nullable": true }, + "standaloneCrate": { + "type": "boolean", + "x-nullable": true + }, "status": { "$ref": "#/definitions/MTOServiceItemStatus" }, @@ -8124,6 +8191,19 @@ func init() { "x-omitempty": false, "example": "2018-05-26" }, + "sitLocation": { + "allOf": [ + { + "$ref": "#/definitions/SITLocationType" + }, + { + "x-nullable": true + }, + { + "x-omitempty": false + } + ] + }, "sitStartDate": { "description": "The date the shipment entered storage, applicable for the ` + "`" + `STORAGE` + "`" + ` movingExpenseType only", "type": "string", @@ -9111,49 +9191,49 @@ func init() { "x-omitempty": false }, "tertiaryDestinationAddress": { - "allOf": [ - { - "$ref": "#/definitions/Address" - }, - { - "x-nullable": true - }, - { - "x-omitempty": false - } - ] - }, - "tertiaryDestinationPostalCode": { - "type": "string", - "format": "An optional secondary pickup location near the origin where additional goods exist.", - "title": "ZIP", - "pattern": "^(\\d{5})$", - "x-nullable": true, - "x-omitempty": false, - "example": "90210" - }, - "tertiaryPickupAddress": { - "allOf": [ - { - "$ref": "#/definitions/Address" - }, - { - "x-nullable": true - }, - { - "x-omitempty": false - } - ] - }, - "tertiaryPickupPostalCode": { - "type": "string", - "format": "An optional secondary pickup location near the origin where additional goods exist.", - "title": "ZIP", - "pattern": "^(\\d{5})$", - "x-nullable": true, - "x-omitempty": false, - "example": "90210" - }, + "allOf": [ + { + "$ref": "#/definitions/Address" + }, + { + "x-nullable": true + }, + { + "x-omitempty": false + } + ] + }, + "tertiaryDestinationPostalCode": { + "type": "string", + "format": "An optional secondary pickup location near the origin where additional goods exist.", + "title": "ZIP", + "pattern": "^(\\d{5})$", + "x-nullable": true, + "x-omitempty": false, + "example": "90210" + }, + "tertiaryPickupAddress": { + "allOf": [ + { + "$ref": "#/definitions/Address" + }, + { + "x-nullable": true + }, + { + "x-omitempty": false + } + ] + }, + "tertiaryPickupPostalCode": { + "type": "string", + "format": "An optional secondary pickup location near the origin where additional goods exist.", + "title": "ZIP", + "pattern": "^(\\d{5})$", + "x-nullable": true, + "x-omitempty": false, + "example": "90210" + }, "updatedAt": { "description": "Timestamp of when a property of this object was last updated (UTC)", "type": "string", @@ -9171,15 +9251,15 @@ func init() { "x-nullable": true }, "PPMShipmentStatus": { - "description": "Status of the PPM Shipment:\n * **DRAFT**: The customer has created the PPM shipment but has not yet submitted their move for counseling.\n * **SUBMITTED**: The shipment belongs to a move that has been submitted by the customer or has been created by a Service Counselor or Prime Contractor for a submitted move.\n * **WAITING_ON_CUSTOMER**: The PPM shipment has been approved and the customer may now provide their actual move closeout information and documentation required to get paid.\n * **NEEDS_ADVANCE_APPROVAL**: The shipment was counseled by the Prime Contractor and approved but an advance was requested so will need further financial approval from the government.\n * **NEEDS_PAYMENT_APPROVAL**: The customer has provided their closeout weight tickets, receipts, and expenses and certified it for the Service Counselor to approve, exclude or reject.\n * **PAYMENT_APPROVED**: The Service Counselor has reviewed all of the customer's PPM closeout documentation and authorizes the customer can download and submit their finalized SSW packet.\n", + "description": "Status of the PPM Shipment:\n * **DRAFT**: The customer has created the PPM shipment but has not yet submitted their move for counseling.\n * **SUBMITTED**: The shipment belongs to a move that has been submitted by the customer or has been created by a Service Counselor or Prime Contractor for a submitted move.\n * **WAITING_ON_CUSTOMER**: The PPM shipment has been approved and the customer may now provide their actual move closeout information and documentation required to get paid.\n * **NEEDS_ADVANCE_APPROVAL**: The shipment was counseled by the Prime Contractor and approved but an advance was requested so will need further financial approval from the government.\n * **NEEDS_CLOSEOUT**: The customer has provided their closeout weight tickets, receipts, and expenses and certified it for the Service Counselor to approve, exclude or reject.\n * **CLOSEOUT_COMPLETE**: The Service Counselor has reviewed all of the customer's PPM closeout documentation and authorizes the customer can download and submit their finalized SSW packet.\n", "type": "string", "enum": [ "DRAFT", "SUBMITTED", "WAITING_ON_CUSTOMER", "NEEDS_ADVANCE_APPROVAL", - "NEEDS_PAYMENT_APPROVAL", - "PAYMENT_APPROVED" + "NEEDS_CLOSEOUT", + "CLOSEOUT_COMPLETE" ], "readOnly": true }, @@ -10356,7 +10436,10 @@ func init() { "ZipSITDestHHGFinalAddress", "ZipSITDestHHGOriginalAddress", "ZipSITOriginHHGActualAddress", - "ZipSITOriginHHGOriginalAddress" + "ZipSITOriginHHGOriginalAddress", + "StandaloneCrate", + "StandaloneCrateCap", + "UncappedRequestTotal" ] }, "ServiceItemParamOrigin": { @@ -10938,6 +11021,16 @@ func init() { "type": "string", "format": "date" }, + "sitLocation": { + "allOf": [ + { + "$ref": "#/definitions/SITLocationType" + }, + { + "x-nullable": true + } + ] + }, "sitStartDate": { "description": "The date the shipment entered storage, applicable for the ` + "`" + `STORAGE` + "`" + ` movingExpenseType only", "type": "string", @@ -11798,6 +11891,43 @@ func init() { }, "basePath": "/ghc/v1", "paths": { + "/application_parameters/{parameterName}": { + "get": { + "description": "Searches for an application parameter by name, returns nil if not found", + "tags": [ + "application_parameters" + ], + "summary": "Searches for an application parameter by name, returns nil if not found", + "operationId": "getParam", + "parameters": [ + { + "type": "string", + "format": "string", + "description": "Parameter Name", + "name": "parameterName", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Application Parameters", + "schema": { + "$ref": "#/definitions/ApplicationParameters" + } + }, + "400": { + "description": "invalid request" + }, + "401": { + "description": "request requires user authentication" + }, + "500": { + "description": "server error" + } + } + } + }, "/counseling/orders/{orderID}": { "patch": { "description": "All fields sent in this request will be set on the order referenced", @@ -18453,6 +18583,26 @@ func init() { }, "x-nullable": true }, + "ApplicationParameters": { + "type": "object", + "properties": { + "parameterName": { + "type": "string", + "format": "string", + "x-nullable": true + }, + "parameterValue": { + "type": "string", + "format": "string", + "x-nullable": true + }, + "validationCode": { + "type": "string", + "format": "string", + "x-nullable": true + } + } + }, "ApproveSITExtension": { "required": [ "approvedDays" @@ -19221,7 +19371,8 @@ func init() { "$ref": "#/definitions/BackupContact" }, "cacValidated": { - "type": "boolean" + "type": "boolean", + "x-nullable": true }, "current_address": { "$ref": "#/definitions/Address" @@ -20091,6 +20242,11 @@ func init() { "eTag": { "type": "string" }, + "estimatedPrice": { + "type": "integer", + "format": "cents", + "x-nullable": true + }, "estimatedWeight": { "description": "estimated weight of the shuttle service item provided by the prime", "type": "integer", @@ -20199,6 +20355,10 @@ func init() { "format": "date", "x-nullable": true }, + "standaloneCrate": { + "type": "boolean", + "x-nullable": true + }, "status": { "$ref": "#/definitions/MTOServiceItemStatus" }, @@ -21220,6 +21380,19 @@ func init() { "x-omitempty": false, "example": "2018-05-26" }, + "sitLocation": { + "allOf": [ + { + "$ref": "#/definitions/SITLocationType" + }, + { + "x-nullable": true + }, + { + "x-omitempty": false + } + ] + }, "sitStartDate": { "description": "The date the shipment entered storage, applicable for the ` + "`" + `STORAGE` + "`" + ` movingExpenseType only", "type": "string", @@ -22208,49 +22381,49 @@ func init() { "x-omitempty": false }, "tertiaryDestinationAddress": { - "allOf": [ - { - "$ref": "#/definitions/Address" - }, - { - "x-nullable": true - }, - { - "x-omitempty": false - } - ] - }, - "tertiaryDestinationPostalCode": { - "type": "string", - "format": "An optional secondary pickup location near the origin where additional goods exist.", - "title": "ZIP", - "pattern": "^(\\d{5})$", - "x-nullable": true, - "x-omitempty": false, - "example": "90210" - }, - "tertiaryPickupAddress": { - "allOf": [ - { - "$ref": "#/definitions/Address" - }, - { - "x-nullable": true - }, - { - "x-omitempty": false - } - ] - }, - "tertiaryPickupPostalCode": { - "type": "string", - "format": "An optional secondary pickup location near the origin where additional goods exist.", - "title": "ZIP", - "pattern": "^(\\d{5})$", - "x-nullable": true, - "x-omitempty": false, - "example": "90210" - }, + "allOf": [ + { + "$ref": "#/definitions/Address" + }, + { + "x-nullable": true + }, + { + "x-omitempty": false + } + ] + }, + "tertiaryDestinationPostalCode": { + "type": "string", + "format": "An optional secondary pickup location near the origin where additional goods exist.", + "title": "ZIP", + "pattern": "^(\\d{5})$", + "x-nullable": true, + "x-omitempty": false, + "example": "90210" + }, + "tertiaryPickupAddress": { + "allOf": [ + { + "$ref": "#/definitions/Address" + }, + { + "x-nullable": true + }, + { + "x-omitempty": false + } + ] + }, + "tertiaryPickupPostalCode": { + "type": "string", + "format": "An optional secondary pickup location near the origin where additional goods exist.", + "title": "ZIP", + "pattern": "^(\\d{5})$", + "x-nullable": true, + "x-omitempty": false, + "example": "90210" + }, "updatedAt": { "description": "Timestamp of when a property of this object was last updated (UTC)", "type": "string", @@ -22268,15 +22441,15 @@ func init() { "x-nullable": true }, "PPMShipmentStatus": { - "description": "Status of the PPM Shipment:\n * **DRAFT**: The customer has created the PPM shipment but has not yet submitted their move for counseling.\n * **SUBMITTED**: The shipment belongs to a move that has been submitted by the customer or has been created by a Service Counselor or Prime Contractor for a submitted move.\n * **WAITING_ON_CUSTOMER**: The PPM shipment has been approved and the customer may now provide their actual move closeout information and documentation required to get paid.\n * **NEEDS_ADVANCE_APPROVAL**: The shipment was counseled by the Prime Contractor and approved but an advance was requested so will need further financial approval from the government.\n * **NEEDS_PAYMENT_APPROVAL**: The customer has provided their closeout weight tickets, receipts, and expenses and certified it for the Service Counselor to approve, exclude or reject.\n * **PAYMENT_APPROVED**: The Service Counselor has reviewed all of the customer's PPM closeout documentation and authorizes the customer can download and submit their finalized SSW packet.\n", + "description": "Status of the PPM Shipment:\n * **DRAFT**: The customer has created the PPM shipment but has not yet submitted their move for counseling.\n * **SUBMITTED**: The shipment belongs to a move that has been submitted by the customer or has been created by a Service Counselor or Prime Contractor for a submitted move.\n * **WAITING_ON_CUSTOMER**: The PPM shipment has been approved and the customer may now provide their actual move closeout information and documentation required to get paid.\n * **NEEDS_ADVANCE_APPROVAL**: The shipment was counseled by the Prime Contractor and approved but an advance was requested so will need further financial approval from the government.\n * **NEEDS_CLOSEOUT**: The customer has provided their closeout weight tickets, receipts, and expenses and certified it for the Service Counselor to approve, exclude or reject.\n * **CLOSEOUT_COMPLETE**: The Service Counselor has reviewed all of the customer's PPM closeout documentation and authorizes the customer can download and submit their finalized SSW packet.\n", "type": "string", "enum": [ "DRAFT", "SUBMITTED", "WAITING_ON_CUSTOMER", "NEEDS_ADVANCE_APPROVAL", - "NEEDS_PAYMENT_APPROVAL", - "PAYMENT_APPROVED" + "NEEDS_CLOSEOUT", + "CLOSEOUT_COMPLETE" ], "readOnly": true }, @@ -23504,7 +23677,10 @@ func init() { "ZipSITDestHHGFinalAddress", "ZipSITDestHHGOriginalAddress", "ZipSITOriginHHGActualAddress", - "ZipSITOriginHHGOriginalAddress" + "ZipSITOriginHHGOriginalAddress", + "StandaloneCrate", + "StandaloneCrateCap", + "UncappedRequestTotal" ] }, "ServiceItemParamOrigin": { @@ -24092,6 +24268,16 @@ func init() { "type": "string", "format": "date" }, + "sitLocation": { + "allOf": [ + { + "$ref": "#/definitions/SITLocationType" + }, + { + "x-nullable": true + } + ] + }, "sitStartDate": { "description": "The date the shipment entered storage, applicable for the ` + "`" + `STORAGE` + "`" + ` movingExpenseType only", "type": "string", diff --git a/pkg/gen/ghcapi/ghcoperations/application_parameters/get_param.go b/pkg/gen/ghcapi/ghcoperations/application_parameters/get_param.go new file mode 100644 index 00000000000..209ae670952 --- /dev/null +++ b/pkg/gen/ghcapi/ghcoperations/application_parameters/get_param.go @@ -0,0 +1,58 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package application_parameters + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// GetParamHandlerFunc turns a function with the right signature into a get param handler +type GetParamHandlerFunc func(GetParamParams) middleware.Responder + +// Handle executing the request and returning a response +func (fn GetParamHandlerFunc) Handle(params GetParamParams) middleware.Responder { + return fn(params) +} + +// GetParamHandler interface for that can handle valid get param params +type GetParamHandler interface { + Handle(GetParamParams) middleware.Responder +} + +// NewGetParam creates a new http.Handler for the get param operation +func NewGetParam(ctx *middleware.Context, handler GetParamHandler) *GetParam { + return &GetParam{Context: ctx, Handler: handler} +} + +/* + GetParam swagger:route GET /application_parameters/{parameterName} application_parameters getParam + +# Searches for an application parameter by name, returns nil if not found + +Searches for an application parameter by name, returns nil if not found +*/ +type GetParam struct { + Context *middleware.Context + Handler GetParamHandler +} + +func (o *GetParam) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + *r = *rCtx + } + var Params = NewGetParamParams() + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params) // actually handle the request + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/pkg/gen/ghcapi/ghcoperations/application_parameters/get_param_parameters.go b/pkg/gen/ghcapi/ghcoperations/application_parameters/get_param_parameters.go new file mode 100644 index 00000000000..8c05fe5ad84 --- /dev/null +++ b/pkg/gen/ghcapi/ghcoperations/application_parameters/get_param_parameters.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package application_parameters + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" +) + +// NewGetParamParams creates a new GetParamParams object +// +// There are no default values defined in the spec. +func NewGetParamParams() GetParamParams { + + return GetParamParams{} +} + +// GetParamParams contains all the bound params for the get param operation +// typically these are obtained from a http.Request +// +// swagger:parameters getParam +type GetParamParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*Parameter Name + Required: true + In: path + */ + ParameterName string +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewGetParamParams() beforehand. +func (o *GetParamParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + rParameterName, rhkParameterName, _ := route.Params.GetOK("parameterName") + if err := o.bindParameterName(rParameterName, rhkParameterName, route.Formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindParameterName binds and validates parameter ParameterName from path. +func (o *GetParamParams) bindParameterName(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + o.ParameterName = raw + + return nil +} diff --git a/pkg/gen/ghcapi/ghcoperations/application_parameters/get_param_responses.go b/pkg/gen/ghcapi/ghcoperations/application_parameters/get_param_responses.go new file mode 100644 index 00000000000..5baf105818f --- /dev/null +++ b/pkg/gen/ghcapi/ghcoperations/application_parameters/get_param_responses.go @@ -0,0 +1,134 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package application_parameters + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" + + "github.com/transcom/mymove/pkg/gen/ghcmessages" +) + +// GetParamOKCode is the HTTP code returned for type GetParamOK +const GetParamOKCode int = 200 + +/* +GetParamOK Application Parameters + +swagger:response getParamOK +*/ +type GetParamOK struct { + + /* + In: Body + */ + Payload *ghcmessages.ApplicationParameters `json:"body,omitempty"` +} + +// NewGetParamOK creates GetParamOK with default headers values +func NewGetParamOK() *GetParamOK { + + return &GetParamOK{} +} + +// WithPayload adds the payload to the get param o k response +func (o *GetParamOK) WithPayload(payload *ghcmessages.ApplicationParameters) *GetParamOK { + o.Payload = payload + return o +} + +// SetPayload sets the payload to the get param o k response +func (o *GetParamOK) SetPayload(payload *ghcmessages.ApplicationParameters) { + o.Payload = payload +} + +// WriteResponse to the client +func (o *GetParamOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.WriteHeader(200) + if o.Payload != nil { + payload := o.Payload + if err := producer.Produce(rw, payload); err != nil { + panic(err) // let the recovery middleware deal with this + } + } +} + +// GetParamBadRequestCode is the HTTP code returned for type GetParamBadRequest +const GetParamBadRequestCode int = 400 + +/* +GetParamBadRequest invalid request + +swagger:response getParamBadRequest +*/ +type GetParamBadRequest struct { +} + +// NewGetParamBadRequest creates GetParamBadRequest with default headers values +func NewGetParamBadRequest() *GetParamBadRequest { + + return &GetParamBadRequest{} +} + +// WriteResponse to the client +func (o *GetParamBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(400) +} + +// GetParamUnauthorizedCode is the HTTP code returned for type GetParamUnauthorized +const GetParamUnauthorizedCode int = 401 + +/* +GetParamUnauthorized request requires user authentication + +swagger:response getParamUnauthorized +*/ +type GetParamUnauthorized struct { +} + +// NewGetParamUnauthorized creates GetParamUnauthorized with default headers values +func NewGetParamUnauthorized() *GetParamUnauthorized { + + return &GetParamUnauthorized{} +} + +// WriteResponse to the client +func (o *GetParamUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(401) +} + +// GetParamInternalServerErrorCode is the HTTP code returned for type GetParamInternalServerError +const GetParamInternalServerErrorCode int = 500 + +/* +GetParamInternalServerError server error + +swagger:response getParamInternalServerError +*/ +type GetParamInternalServerError struct { +} + +// NewGetParamInternalServerError creates GetParamInternalServerError with default headers values +func NewGetParamInternalServerError() *GetParamInternalServerError { + + return &GetParamInternalServerError{} +} + +// WriteResponse to the client +func (o *GetParamInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(500) +} diff --git a/pkg/gen/ghcapi/ghcoperations/application_parameters/get_param_urlbuilder.go b/pkg/gen/ghcapi/ghcoperations/application_parameters/get_param_urlbuilder.go new file mode 100644 index 00000000000..0f41a2ec1f5 --- /dev/null +++ b/pkg/gen/ghcapi/ghcoperations/application_parameters/get_param_urlbuilder.go @@ -0,0 +1,99 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package application_parameters + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "errors" + "net/url" + golangswaggerpaths "path" + "strings" +) + +// GetParamURL generates an URL for the get param operation +type GetParamURL struct { + ParameterName string + + _basePath string + // avoid unkeyed usage + _ struct{} +} + +// WithBasePath sets the base path for this url builder, only required when it's different from the +// base path specified in the swagger spec. +// When the value of the base path is an empty string +func (o *GetParamURL) WithBasePath(bp string) *GetParamURL { + o.SetBasePath(bp) + return o +} + +// SetBasePath sets the base path for this url builder, only required when it's different from the +// base path specified in the swagger spec. +// When the value of the base path is an empty string +func (o *GetParamURL) SetBasePath(bp string) { + o._basePath = bp +} + +// Build a url path and query string +func (o *GetParamURL) Build() (*url.URL, error) { + var _result url.URL + + var _path = "/application_parameters/{parameterName}" + + parameterName := o.ParameterName + if parameterName != "" { + _path = strings.Replace(_path, "{parameterName}", parameterName, -1) + } else { + return nil, errors.New("parameterName is required on GetParamURL") + } + + _basePath := o._basePath + if _basePath == "" { + _basePath = "/ghc/v1" + } + _result.Path = golangswaggerpaths.Join(_basePath, _path) + + return &_result, nil +} + +// Must is a helper function to panic when the url builder returns an error +func (o *GetParamURL) Must(u *url.URL, err error) *url.URL { + if err != nil { + panic(err) + } + if u == nil { + panic("url can't be nil") + } + return u +} + +// String returns the string representation of the path with query string +func (o *GetParamURL) String() string { + return o.Must(o.Build()).String() +} + +// BuildFull builds a full url with scheme, host, path and query string +func (o *GetParamURL) BuildFull(scheme, host string) (*url.URL, error) { + if scheme == "" { + return nil, errors.New("scheme is required for a full url on GetParamURL") + } + if host == "" { + return nil, errors.New("host is required for a full url on GetParamURL") + } + + base, err := o.Build() + if err != nil { + return nil, err + } + + base.Scheme = scheme + base.Host = host + return base, nil +} + +// StringFull returns the string representation of a complete url +func (o *GetParamURL) StringFull(scheme, host string) string { + return o.Must(o.BuildFull(scheme, host)).String() +} diff --git a/pkg/gen/ghcapi/ghcoperations/mymove_api.go b/pkg/gen/ghcapi/ghcoperations/mymove_api.go index ecaced2a301..935729b2b24 100644 --- a/pkg/gen/ghcapi/ghcoperations/mymove_api.go +++ b/pkg/gen/ghcapi/ghcoperations/mymove_api.go @@ -19,6 +19,7 @@ import ( "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/transcom/mymove/pkg/gen/ghcapi/ghcoperations/application_parameters" "github.com/transcom/mymove/pkg/gen/ghcapi/ghcoperations/customer" "github.com/transcom/mymove/pkg/gen/ghcapi/ghcoperations/customer_support_remarks" "github.com/transcom/mymove/pkg/gen/ghcapi/ghcoperations/evaluation_reports" @@ -183,6 +184,9 @@ func NewMymoveAPI(spec *loads.Document) *MymoveAPI { PwsViolationsGetPWSViolationsHandler: pws_violations.GetPWSViolationsHandlerFunc(func(params pws_violations.GetPWSViolationsParams) middleware.Responder { return middleware.NotImplemented("operation pws_violations.GetPWSViolations has not yet been implemented") }), + ApplicationParametersGetParamHandler: application_parameters.GetParamHandlerFunc(func(params application_parameters.GetParamParams) middleware.Responder { + return middleware.NotImplemented("operation application_parameters.GetParam has not yet been implemented") + }), PaymentRequestsGetPaymentRequestHandler: payment_requests.GetPaymentRequestHandlerFunc(func(params payment_requests.GetPaymentRequestParams) middleware.Responder { return middleware.NotImplemented("operation payment_requests.GetPaymentRequest has not yet been implemented") }), @@ -442,6 +446,8 @@ type MymoveAPI struct { PpmGetPPMDocumentsHandler ppm.GetPPMDocumentsHandler // PwsViolationsGetPWSViolationsHandler sets the operation handler for the get p w s violations operation PwsViolationsGetPWSViolationsHandler pws_violations.GetPWSViolationsHandler + // ApplicationParametersGetParamHandler sets the operation handler for the get param operation + ApplicationParametersGetParamHandler application_parameters.GetParamHandler // PaymentRequestsGetPaymentRequestHandler sets the operation handler for the get payment request operation PaymentRequestsGetPaymentRequestHandler payment_requests.GetPaymentRequestHandler // PaymentRequestsGetPaymentRequestsForMoveHandler sets the operation handler for the get payment requests for move operation @@ -732,6 +738,9 @@ func (o *MymoveAPI) Validate() error { if o.PwsViolationsGetPWSViolationsHandler == nil { unregistered = append(unregistered, "pws_violations.GetPWSViolationsHandler") } + if o.ApplicationParametersGetParamHandler == nil { + unregistered = append(unregistered, "application_parameters.GetParamHandler") + } if o.PaymentRequestsGetPaymentRequestHandler == nil { unregistered = append(unregistered, "payment_requests.GetPaymentRequestHandler") } @@ -1118,6 +1127,10 @@ func (o *MymoveAPI) initHandlerCache() { if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } + o.handlers["GET"]["/application_parameters/{parameterName}"] = application_parameters.NewGetParam(o.context, o.ApplicationParametersGetParamHandler) + if o.handlers["GET"] == nil { + o.handlers["GET"] = make(map[string]http.Handler) + } o.handlers["GET"]["/payment-requests/{paymentRequestID}"] = payment_requests.NewGetPaymentRequest(o.context, o.PaymentRequestsGetPaymentRequestHandler) if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) diff --git a/pkg/gen/ghcmessages/application_parameters.go b/pkg/gen/ghcmessages/application_parameters.go new file mode 100644 index 00000000000..402787d4328 --- /dev/null +++ b/pkg/gen/ghcmessages/application_parameters.go @@ -0,0 +1,56 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package ghcmessages + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ApplicationParameters application parameters +// +// swagger:model ApplicationParameters +type ApplicationParameters struct { + + // parameter name + ParameterName *string `json:"parameterName,omitempty"` + + // parameter value + ParameterValue *string `json:"parameterValue,omitempty"` + + // validation code + ValidationCode *string `json:"validationCode,omitempty"` +} + +// Validate validates this application parameters +func (m *ApplicationParameters) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this application parameters based on context it is used +func (m *ApplicationParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ApplicationParameters) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ApplicationParameters) UnmarshalBinary(b []byte) error { + var res ApplicationParameters + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/gen/ghcmessages/customer.go b/pkg/gen/ghcmessages/customer.go index ec607140830..9bde67a3d18 100644 --- a/pkg/gen/ghcmessages/customer.go +++ b/pkg/gen/ghcmessages/customer.go @@ -29,7 +29,7 @@ type Customer struct { BackupContact *BackupContact `json:"backup_contact,omitempty"` // cac validated - CacValidated bool `json:"cacValidated,omitempty"` + CacValidated *bool `json:"cacValidated,omitempty"` // current address CurrentAddress *Address `json:"current_address,omitempty"` diff --git a/pkg/gen/ghcmessages/m_t_o_service_item.go b/pkg/gen/ghcmessages/m_t_o_service_item.go index e2c69984b79..da5bb6ca9df 100644 --- a/pkg/gen/ghcmessages/m_t_o_service_item.go +++ b/pkg/gen/ghcmessages/m_t_o_service_item.go @@ -55,6 +55,9 @@ type MTOServiceItem struct { // e tag ETag string `json:"eTag,omitempty"` + // estimated price + EstimatedPrice *int64 `json:"estimatedPrice,omitempty"` + // estimated weight of the shuttle service item provided by the prime // Example: 2500 EstimatedWeight *int64 `json:"estimatedWeight,omitempty"` @@ -150,6 +153,9 @@ type MTOServiceItem struct { // Format: date SitRequestedDelivery *strfmt.Date `json:"sitRequestedDelivery,omitempty"` + // standalone crate + StandaloneCrate *bool `json:"standaloneCrate,omitempty"` + // status Status MTOServiceItemStatus `json:"status,omitempty"` diff --git a/pkg/gen/ghcmessages/moving_expense.go b/pkg/gen/ghcmessages/moving_expense.go index 323b30e24e9..d4b571d2230 100644 --- a/pkg/gen/ghcmessages/moving_expense.go +++ b/pkg/gen/ghcmessages/moving_expense.go @@ -77,6 +77,9 @@ type MovingExpense struct { // Format: date SitEndDate *strfmt.Date `json:"sitEndDate"` + // sit location + SitLocation *SITLocationType `json:"sitLocation,omitempty"` + // The date the shipment entered storage, applicable for the `STORAGE` movingExpenseType only // Example: 2022-04-26 // Format: date @@ -131,6 +134,10 @@ func (m *MovingExpense) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateSitLocation(formats); err != nil { + res = append(res, err) + } + if err := m.validateSitStartDate(formats); err != nil { res = append(res, err) } @@ -271,6 +278,25 @@ func (m *MovingExpense) validateSitEndDate(formats strfmt.Registry) error { return nil } +func (m *MovingExpense) validateSitLocation(formats strfmt.Registry) error { + if swag.IsZero(m.SitLocation) { // not required + return nil + } + + if m.SitLocation != nil { + if err := m.SitLocation.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sitLocation") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("sitLocation") + } + return err + } + } + + return nil +} + func (m *MovingExpense) validateSitStartDate(formats strfmt.Registry) error { if swag.IsZero(m.SitStartDate) { // not required return nil @@ -351,6 +377,10 @@ func (m *MovingExpense) ContextValidate(ctx context.Context, formats strfmt.Regi res = append(res, err) } + if err := m.contextValidateSitLocation(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateStatus(ctx, formats); err != nil { res = append(res, err) } @@ -469,6 +499,27 @@ func (m *MovingExpense) contextValidateReason(ctx context.Context, formats strfm return nil } +func (m *MovingExpense) contextValidateSitLocation(ctx context.Context, formats strfmt.Registry) error { + + if m.SitLocation != nil { + + if swag.IsZero(m.SitLocation) { // not required + return nil + } + + if err := m.SitLocation.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sitLocation") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("sitLocation") + } + return err + } + } + + return nil +} + func (m *MovingExpense) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { if m.Status != nil { diff --git a/pkg/gen/ghcmessages/p_p_m_shipment_status.go b/pkg/gen/ghcmessages/p_p_m_shipment_status.go index d924141476c..f976a0c7c5c 100644 --- a/pkg/gen/ghcmessages/p_p_m_shipment_status.go +++ b/pkg/gen/ghcmessages/p_p_m_shipment_status.go @@ -19,8 +19,8 @@ import ( // - **SUBMITTED**: The shipment belongs to a move that has been submitted by the customer or has been created by a Service Counselor or Prime Contractor for a submitted move. // - **WAITING_ON_CUSTOMER**: The PPM shipment has been approved and the customer may now provide their actual move closeout information and documentation required to get paid. // - **NEEDS_ADVANCE_APPROVAL**: The shipment was counseled by the Prime Contractor and approved but an advance was requested so will need further financial approval from the government. -// - **NEEDS_PAYMENT_APPROVAL**: The customer has provided their closeout weight tickets, receipts, and expenses and certified it for the Service Counselor to approve, exclude or reject. -// - **PAYMENT_APPROVED**: The Service Counselor has reviewed all of the customer's PPM closeout documentation and authorizes the customer can download and submit their finalized SSW packet. +// - **NEEDS_CLOSEOUT**: The customer has provided their closeout weight tickets, receipts, and expenses and certified it for the Service Counselor to approve, exclude or reject. +// - **CLOSEOUT_COMPLETE**: The Service Counselor has reviewed all of the customer's PPM closeout documentation and authorizes the customer can download and submit their finalized SSW packet. // // swagger:model PPMShipmentStatus type PPMShipmentStatus string @@ -48,11 +48,11 @@ const ( // PPMShipmentStatusNEEDSADVANCEAPPROVAL captures enum value "NEEDS_ADVANCE_APPROVAL" PPMShipmentStatusNEEDSADVANCEAPPROVAL PPMShipmentStatus = "NEEDS_ADVANCE_APPROVAL" - // PPMShipmentStatusNEEDSPAYMENTAPPROVAL captures enum value "NEEDS_PAYMENT_APPROVAL" - PPMShipmentStatusNEEDSPAYMENTAPPROVAL PPMShipmentStatus = "NEEDS_PAYMENT_APPROVAL" + // PPMShipmentStatusNEEDSCLOSEOUT captures enum value "NEEDS_CLOSEOUT" + PPMShipmentStatusNEEDSCLOSEOUT PPMShipmentStatus = "NEEDS_CLOSEOUT" - // PPMShipmentStatusPAYMENTAPPROVED captures enum value "PAYMENT_APPROVED" - PPMShipmentStatusPAYMENTAPPROVED PPMShipmentStatus = "PAYMENT_APPROVED" + // PPMShipmentStatusCLOSEOUTCOMPLETE captures enum value "CLOSEOUT_COMPLETE" + PPMShipmentStatusCLOSEOUTCOMPLETE PPMShipmentStatus = "CLOSEOUT_COMPLETE" ) // for schema @@ -60,7 +60,7 @@ var pPMShipmentStatusEnum []interface{} func init() { var res []PPMShipmentStatus - if err := json.Unmarshal([]byte(`["DRAFT","SUBMITTED","WAITING_ON_CUSTOMER","NEEDS_ADVANCE_APPROVAL","NEEDS_PAYMENT_APPROVAL","PAYMENT_APPROVED"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["DRAFT","SUBMITTED","WAITING_ON_CUSTOMER","NEEDS_ADVANCE_APPROVAL","NEEDS_CLOSEOUT","CLOSEOUT_COMPLETE"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/pkg/gen/ghcmessages/service_item_param_name.go b/pkg/gen/ghcmessages/service_item_param_name.go index e1f416f41d1..dd10c8003cd 100644 --- a/pkg/gen/ghcmessages/service_item_param_name.go +++ b/pkg/gen/ghcmessages/service_item_param_name.go @@ -227,6 +227,15 @@ const ( // ServiceItemParamNameZipSITOriginHHGOriginalAddress captures enum value "ZipSITOriginHHGOriginalAddress" ServiceItemParamNameZipSITOriginHHGOriginalAddress ServiceItemParamName = "ZipSITOriginHHGOriginalAddress" + + // ServiceItemParamNameStandaloneCrate captures enum value "StandaloneCrate" + ServiceItemParamNameStandaloneCrate ServiceItemParamName = "StandaloneCrate" + + // ServiceItemParamNameStandaloneCrateCap captures enum value "StandaloneCrateCap" + ServiceItemParamNameStandaloneCrateCap ServiceItemParamName = "StandaloneCrateCap" + + // ServiceItemParamNameUncappedRequestTotal captures enum value "UncappedRequestTotal" + ServiceItemParamNameUncappedRequestTotal ServiceItemParamName = "UncappedRequestTotal" ) // for schema @@ -234,7 +243,7 @@ var serviceItemParamNameEnum []interface{} func init() { var res []ServiceItemParamName - if err := json.Unmarshal([]byte(`["ActualPickupDate","ContractCode","ContractYearName","CubicFeetBilled","CubicFeetCrating","DimensionHeight","DimensionLength","DimensionWidth","DistanceZip","DistanceZipSITDest","DistanceZipSITOrigin","EIAFuelPrice","EscalationCompounded","FSCMultiplier","FSCPriceDifferenceInCents","FSCWeightBasedDistanceMultiplier","IsPeak","MarketDest","MarketOrigin","MTOAvailableToPrimeAt","NTSPackingFactor","NumberDaysSIT","PriceAreaDest","PriceAreaIntlDest","PriceAreaIntlOrigin","PriceAreaOrigin","PriceRateOrFactor","PSI_LinehaulDom","PSI_LinehaulDomPrice","PSI_LinehaulShort","PSI_LinehaulShortPrice","PSI_PriceDomDest","PSI_PriceDomDestPrice","PSI_PriceDomOrigin","PSI_PriceDomOriginPrice","PSI_ShippingLinehaulIntlCO","PSI_ShippingLinehaulIntlCOPrice","PSI_ShippingLinehaulIntlOC","PSI_ShippingLinehaulIntlOCPrice","PSI_ShippingLinehaulIntlOO","PSI_ShippingLinehaulIntlOOPrice","RateAreaNonStdDest","RateAreaNonStdOrigin","ReferenceDate","RequestedPickupDate","ServiceAreaDest","ServiceAreaOrigin","ServicesScheduleDest","ServicesScheduleOrigin","SITPaymentRequestEnd","SITPaymentRequestStart","SITScheduleDest","SITScheduleOrigin","SITServiceAreaDest","SITServiceAreaOrigin","WeightAdjusted","WeightBilled","WeightEstimated","WeightOriginal","WeightReweigh","ZipDestAddress","ZipPickupAddress","ZipSITDestHHGFinalAddress","ZipSITDestHHGOriginalAddress","ZipSITOriginHHGActualAddress","ZipSITOriginHHGOriginalAddress"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["ActualPickupDate","ContractCode","ContractYearName","CubicFeetBilled","CubicFeetCrating","DimensionHeight","DimensionLength","DimensionWidth","DistanceZip","DistanceZipSITDest","DistanceZipSITOrigin","EIAFuelPrice","EscalationCompounded","FSCMultiplier","FSCPriceDifferenceInCents","FSCWeightBasedDistanceMultiplier","IsPeak","MarketDest","MarketOrigin","MTOAvailableToPrimeAt","NTSPackingFactor","NumberDaysSIT","PriceAreaDest","PriceAreaIntlDest","PriceAreaIntlOrigin","PriceAreaOrigin","PriceRateOrFactor","PSI_LinehaulDom","PSI_LinehaulDomPrice","PSI_LinehaulShort","PSI_LinehaulShortPrice","PSI_PriceDomDest","PSI_PriceDomDestPrice","PSI_PriceDomOrigin","PSI_PriceDomOriginPrice","PSI_ShippingLinehaulIntlCO","PSI_ShippingLinehaulIntlCOPrice","PSI_ShippingLinehaulIntlOC","PSI_ShippingLinehaulIntlOCPrice","PSI_ShippingLinehaulIntlOO","PSI_ShippingLinehaulIntlOOPrice","RateAreaNonStdDest","RateAreaNonStdOrigin","ReferenceDate","RequestedPickupDate","ServiceAreaDest","ServiceAreaOrigin","ServicesScheduleDest","ServicesScheduleOrigin","SITPaymentRequestEnd","SITPaymentRequestStart","SITScheduleDest","SITScheduleOrigin","SITServiceAreaDest","SITServiceAreaOrigin","WeightAdjusted","WeightBilled","WeightEstimated","WeightOriginal","WeightReweigh","ZipDestAddress","ZipPickupAddress","ZipSITDestHHGFinalAddress","ZipSITDestHHGOriginalAddress","ZipSITOriginHHGActualAddress","ZipSITOriginHHGOriginalAddress","StandaloneCrate","StandaloneCrateCap","UncappedRequestTotal"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/pkg/gen/ghcmessages/update_moving_expense.go b/pkg/gen/ghcmessages/update_moving_expense.go index c9ae28b486e..e6178a17853 100644 --- a/pkg/gen/ghcmessages/update_moving_expense.go +++ b/pkg/gen/ghcmessages/update_moving_expense.go @@ -35,6 +35,9 @@ type UpdateMovingExpense struct { // Format: date SitEndDate strfmt.Date `json:"sitEndDate,omitempty"` + // sit location + SitLocation *SITLocationType `json:"sitLocation,omitempty"` + // The date the shipment entered storage, applicable for the `STORAGE` movingExpenseType only // Format: date SitStartDate strfmt.Date `json:"sitStartDate,omitempty"` @@ -58,6 +61,10 @@ func (m *UpdateMovingExpense) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateSitLocation(formats); err != nil { + res = append(res, err) + } + if err := m.validateSitStartDate(formats); err != nil { res = append(res, err) } @@ -103,6 +110,25 @@ func (m *UpdateMovingExpense) validateSitEndDate(formats strfmt.Registry) error return nil } +func (m *UpdateMovingExpense) validateSitLocation(formats strfmt.Registry) error { + if swag.IsZero(m.SitLocation) { // not required + return nil + } + + if m.SitLocation != nil { + if err := m.SitLocation.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sitLocation") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("sitLocation") + } + return err + } + } + + return nil +} + func (m *UpdateMovingExpense) validateSitStartDate(formats strfmt.Registry) error { if swag.IsZero(m.SitStartDate) { // not required return nil @@ -140,6 +166,10 @@ func (m *UpdateMovingExpense) ContextValidate(ctx context.Context, formats strfm res = append(res, err) } + if err := m.contextValidateSitLocation(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateStatus(ctx, formats); err != nil { res = append(res, err) } @@ -171,6 +201,27 @@ func (m *UpdateMovingExpense) contextValidateMovingExpenseType(ctx context.Conte return nil } +func (m *UpdateMovingExpense) contextValidateSitLocation(ctx context.Context, formats strfmt.Registry) error { + + if m.SitLocation != nil { + + if swag.IsZero(m.SitLocation) { // not required + return nil + } + + if err := m.SitLocation.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sitLocation") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("sitLocation") + } + return err + } + } + + return nil +} + func (m *UpdateMovingExpense) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { if swag.IsZero(m.Status) { // not required diff --git a/pkg/gen/internalapi/embedded_spec.go b/pkg/gen/internalapi/embedded_spec.go index 021c9dc24b2..bff54263ca8 100644 --- a/pkg/gen/internalapi/embedded_spec.go +++ b/pkg/gen/internalapi/embedded_spec.go @@ -3061,6 +3061,13 @@ func init() { "description": "ID of the order that the upload belongs to", "name": "orderId", "in": "query" + }, + { + "type": "string", + "format": "uuid", + "description": "Optional PPM shipment ID related to the upload", + "name": "ppmId", + "in": "query" } ], "responses": { @@ -4996,6 +5003,19 @@ func init() { "x-omitempty": false, "example": "2018-05-26" }, + "sitLocation": { + "allOf": [ + { + "$ref": "#/definitions/SITLocationType" + }, + { + "x-nullable": true + }, + { + "x-omitempty": false + } + ] + }, "sitStartDate": { "description": "The date the shipment entered storage, applicable for the ` + "`" + `STORAGE` + "`" + ` movingExpenseType only", "type": "string", @@ -5812,50 +5832,50 @@ func init() { "x-nullable": true, "x-omitempty": false }, - "tertiaryDestinationAddress": { - "allOf": [ - { - "$ref": "#/definitions/Address" - }, - { - "x-nullable": true - }, - { - "x-omitempty": false - } - ] - }, - "tertiaryDestinationPostalCode": { - "type": "string", - "format": "An optional secondary pickup location near the origin where additional goods exist.", - "title": "ZIP", - "pattern": "^(\\d{5})$", - "x-nullable": true, - "x-omitempty": false, - "example": "90210" - }, - "tertiaryPickupAddress": { - "allOf": [ - { - "$ref": "#/definitions/Address" - }, - { - "x-nullable": true - }, - { - "x-omitempty": false - } - ] - }, - "tertiaryPickupPostalCode": { - "type": "string", - "format": "An optional secondary pickup location near the origin where additional goods exist.", - "title": "ZIP", - "pattern": "^(\\d{5})$", - "x-nullable": true, - "x-omitempty": false, - "example": "90210" - }, + "tertiaryDestinationAddress": { + "allOf": [ + { + "$ref": "#/definitions/Address" + }, + { + "x-nullable": true + }, + { + "x-omitempty": false + } + ] + }, + "tertiaryDestinationPostalCode": { + "type": "string", + "format": "An optional secondary pickup location near the origin where additional goods exist.", + "title": "ZIP", + "pattern": "^(\\d{5})$", + "x-nullable": true, + "x-omitempty": false, + "example": "90210" + }, + "tertiaryPickupAddress": { + "allOf": [ + { + "$ref": "#/definitions/Address" + }, + { + "x-nullable": true + }, + { + "x-omitempty": false + } + ] + }, + "tertiaryPickupPostalCode": { + "type": "string", + "format": "An optional secondary pickup location near the origin where additional goods exist.", + "title": "ZIP", + "pattern": "^(\\d{5})$", + "x-nullable": true, + "x-omitempty": false, + "example": "90210" + }, "updatedAt": { "description": "Timestamp of when a property of this object was last updated (UTC)", "type": "string", @@ -5873,15 +5893,15 @@ func init() { "x-nullable": true }, "PPMShipmentStatus": { - "description": "Status of the PPM Shipment:\n * **DRAFT**: The customer has created the PPM shipment but has not yet submitted their move for counseling.\n * **SUBMITTED**: The shipment belongs to a move that has been submitted by the customer or has been created by a Service Counselor or Prime Contractor for a submitted move.\n * **WAITING_ON_CUSTOMER**: The PPM shipment has been approved and the customer may now provide their actual move closeout information and documentation required to get paid.\n * **NEEDS_ADVANCE_APPROVAL**: The shipment was counseled by the Prime Contractor and approved but an advance was requested so will need further financial approval from the government.\n * **NEEDS_PAYMENT_APPROVAL**: The customer has provided their closeout weight tickets, receipts, and expenses and certified it for the Service Counselor to approve, exclude or reject.\n * **PAYMENT_APPROVED**: The Service Counselor has reviewed all of the customer's PPM closeout documentation and authorizes the customer can download and submit their finalized SSW packet.\n", + "description": "Status of the PPM Shipment:\n * **DRAFT**: The customer has created the PPM shipment but has not yet submitted their move for counseling.\n * **SUBMITTED**: The shipment belongs to a move that has been submitted by the customer or has been created by a Service Counselor or Prime Contractor for a submitted move.\n * **WAITING_ON_CUSTOMER**: The PPM shipment has been approved and the customer may now provide their actual move closeout information and documentation required to get paid.\n * **NEEDS_ADVANCE_APPROVAL**: The shipment was counseled by the Prime Contractor and approved but an advance was requested so will need further financial approval from the government.\n * **NEEDS_CLOSEOUT**: The customer has provided their closeout weight tickets, receipts, and expenses and certified it for the Service Counselor to approve, exclude or reject.\n * **CLOSEOUT_COMPLETE**: The Service Counselor has reviewed all of the customer's PPM closeout documentation and authorizes the customer can download and submit their finalized SSW packet.\n", "type": "string", "enum": [ "DRAFT", "SUBMITTED", "WAITING_ON_CUSTOMER", "NEEDS_ADVANCE_APPROVAL", - "NEEDS_PAYMENT_APPROVAL", - "PAYMENT_APPROVED" + "NEEDS_CLOSEOUT", + "CLOSEOUT_COMPLETE" ], "readOnly": true }, @@ -6725,6 +6745,16 @@ func init() { "type": "string", "format": "date" }, + "sitLocation": { + "allOf": [ + { + "$ref": "#/definitions/SITLocationType" + }, + { + "x-nullable": true + } + ] + }, "sitStartDate": { "description": "The date the shipment entered storage, applicable for the ` + "`" + `STORAGE` + "`" + ` movingExpenseType only", "type": "string", @@ -11039,6 +11069,13 @@ func init() { "description": "ID of the order that the upload belongs to", "name": "orderId", "in": "query" + }, + { + "type": "string", + "format": "uuid", + "description": "Optional PPM shipment ID related to the upload", + "name": "ppmId", + "in": "query" } ], "responses": { @@ -12978,6 +13015,19 @@ func init() { "x-omitempty": false, "example": "2018-05-26" }, + "sitLocation": { + "allOf": [ + { + "$ref": "#/definitions/SITLocationType" + }, + { + "x-nullable": true + }, + { + "x-omitempty": false + } + ] + }, "sitStartDate": { "description": "The date the shipment entered storage, applicable for the ` + "`" + `STORAGE` + "`" + ` movingExpenseType only", "type": "string", @@ -13795,49 +13845,49 @@ func init() { "x-omitempty": false }, "tertiaryDestinationAddress": { - "allOf": [ - { - "$ref": "#/definitions/Address" - }, - { - "x-nullable": true - }, - { - "x-omitempty": false - } - ] - }, - "tertiaryDestinationPostalCode": { - "type": "string", - "format": "An optional secondary pickup location near the origin where additional goods exist.", - "title": "ZIP", - "pattern": "^(\\d{5})$", - "x-nullable": true, - "x-omitempty": false, - "example": "90210" - }, - "tertiaryPickupAddress": { - "allOf": [ - { - "$ref": "#/definitions/Address" - }, - { - "x-nullable": true - }, - { - "x-omitempty": false - } - ] - }, - "tertiaryPickupPostalCode": { - "type": "string", - "format": "An optional secondary pickup location near the origin where additional goods exist.", - "title": "ZIP", - "pattern": "^(\\d{5})$", - "x-nullable": true, - "x-omitempty": false, - "example": "90210" - }, + "allOf": [ + { + "$ref": "#/definitions/Address" + }, + { + "x-nullable": true + }, + { + "x-omitempty": false + } + ] + }, + "tertiaryDestinationPostalCode": { + "type": "string", + "format": "An optional secondary pickup location near the origin where additional goods exist.", + "title": "ZIP", + "pattern": "^(\\d{5})$", + "x-nullable": true, + "x-omitempty": false, + "example": "90210" + }, + "tertiaryPickupAddress": { + "allOf": [ + { + "$ref": "#/definitions/Address" + }, + { + "x-nullable": true + }, + { + "x-omitempty": false + } + ] + }, + "tertiaryPickupPostalCode": { + "type": "string", + "format": "An optional secondary pickup location near the origin where additional goods exist.", + "title": "ZIP", + "pattern": "^(\\d{5})$", + "x-nullable": true, + "x-omitempty": false, + "example": "90210" + }, "updatedAt": { "description": "Timestamp of when a property of this object was last updated (UTC)", "type": "string", @@ -13855,15 +13905,15 @@ func init() { "x-nullable": true }, "PPMShipmentStatus": { - "description": "Status of the PPM Shipment:\n * **DRAFT**: The customer has created the PPM shipment but has not yet submitted their move for counseling.\n * **SUBMITTED**: The shipment belongs to a move that has been submitted by the customer or has been created by a Service Counselor or Prime Contractor for a submitted move.\n * **WAITING_ON_CUSTOMER**: The PPM shipment has been approved and the customer may now provide their actual move closeout information and documentation required to get paid.\n * **NEEDS_ADVANCE_APPROVAL**: The shipment was counseled by the Prime Contractor and approved but an advance was requested so will need further financial approval from the government.\n * **NEEDS_PAYMENT_APPROVAL**: The customer has provided their closeout weight tickets, receipts, and expenses and certified it for the Service Counselor to approve, exclude or reject.\n * **PAYMENT_APPROVED**: The Service Counselor has reviewed all of the customer's PPM closeout documentation and authorizes the customer can download and submit their finalized SSW packet.\n", + "description": "Status of the PPM Shipment:\n * **DRAFT**: The customer has created the PPM shipment but has not yet submitted their move for counseling.\n * **SUBMITTED**: The shipment belongs to a move that has been submitted by the customer or has been created by a Service Counselor or Prime Contractor for a submitted move.\n * **WAITING_ON_CUSTOMER**: The PPM shipment has been approved and the customer may now provide their actual move closeout information and documentation required to get paid.\n * **NEEDS_ADVANCE_APPROVAL**: The shipment was counseled by the Prime Contractor and approved but an advance was requested so will need further financial approval from the government.\n * **NEEDS_CLOSEOUT**: The customer has provided their closeout weight tickets, receipts, and expenses and certified it for the Service Counselor to approve, exclude or reject.\n * **CLOSEOUT_COMPLETE**: The Service Counselor has reviewed all of the customer's PPM closeout documentation and authorizes the customer can download and submit their finalized SSW packet.\n", "type": "string", "enum": [ "DRAFT", "SUBMITTED", "WAITING_ON_CUSTOMER", "NEEDS_ADVANCE_APPROVAL", - "NEEDS_PAYMENT_APPROVAL", - "PAYMENT_APPROVED" + "NEEDS_CLOSEOUT", + "CLOSEOUT_COMPLETE" ], "readOnly": true }, @@ -14708,6 +14758,16 @@ func init() { "type": "string", "format": "date" }, + "sitLocation": { + "allOf": [ + { + "$ref": "#/definitions/SITLocationType" + }, + { + "x-nullable": true + } + ] + }, "sitStartDate": { "description": "The date the shipment entered storage, applicable for the ` + "`" + `STORAGE` + "`" + ` movingExpenseType only", "type": "string", diff --git a/pkg/gen/internalapi/internaloperations/uploads/delete_upload_parameters.go b/pkg/gen/internalapi/internaloperations/uploads/delete_upload_parameters.go index 91cad5f24f6..371f160ef2e 100644 --- a/pkg/gen/internalapi/internaloperations/uploads/delete_upload_parameters.go +++ b/pkg/gen/internalapi/internaloperations/uploads/delete_upload_parameters.go @@ -36,6 +36,10 @@ type DeleteUploadParams struct { In: query */ OrderID *strfmt.UUID + /*Optional PPM shipment ID related to the upload + In: query + */ + PpmID *strfmt.UUID /*UUID of the upload to be deleted Required: true In: path @@ -59,6 +63,11 @@ func (o *DeleteUploadParams) BindRequest(r *http.Request, route *middleware.Matc res = append(res, err) } + qPpmID, qhkPpmID, _ := qs.GetOK("ppmId") + if err := o.bindPpmID(qPpmID, qhkPpmID, route.Formats); err != nil { + res = append(res, err) + } + rUploadID, rhkUploadID, _ := route.Params.GetOK("uploadId") if err := o.bindUploadID(rUploadID, rhkUploadID, route.Formats); err != nil { res = append(res, err) @@ -106,6 +115,43 @@ func (o *DeleteUploadParams) validateOrderID(formats strfmt.Registry) error { return nil } +// bindPpmID binds and validates parameter PpmID from query. +func (o *DeleteUploadParams) bindPpmID(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: false + // AllowEmptyValue: false + + if raw == "" { // empty values pass all other validations + return nil + } + + // Format: uuid + value, err := formats.Parse("uuid", raw) + if err != nil { + return errors.InvalidType("ppmId", "query", "strfmt.UUID", raw) + } + o.PpmID = (value.(*strfmt.UUID)) + + if err := o.validatePpmID(formats); err != nil { + return err + } + + return nil +} + +// validatePpmID carries on validations for parameter PpmID +func (o *DeleteUploadParams) validatePpmID(formats strfmt.Registry) error { + + if err := validate.FormatOf("ppmId", "query", "uuid", o.PpmID.String(), formats); err != nil { + return err + } + return nil +} + // bindUploadID binds and validates parameter UploadID from path. func (o *DeleteUploadParams) bindUploadID(rawData []string, hasKey bool, formats strfmt.Registry) error { var raw string diff --git a/pkg/gen/internalapi/internaloperations/uploads/delete_upload_urlbuilder.go b/pkg/gen/internalapi/internaloperations/uploads/delete_upload_urlbuilder.go index 6d0850522b1..ac38bd47b6f 100644 --- a/pkg/gen/internalapi/internaloperations/uploads/delete_upload_urlbuilder.go +++ b/pkg/gen/internalapi/internaloperations/uploads/delete_upload_urlbuilder.go @@ -19,6 +19,7 @@ type DeleteUploadURL struct { UploadID strfmt.UUID OrderID *strfmt.UUID + PpmID *strfmt.UUID _basePath string // avoid unkeyed usage @@ -69,6 +70,14 @@ func (o *DeleteUploadURL) Build() (*url.URL, error) { qs.Set("orderId", orderIDQ) } + var ppmIDQ string + if o.PpmID != nil { + ppmIDQ = o.PpmID.String() + } + if ppmIDQ != "" { + qs.Set("ppmId", ppmIDQ) + } + _result.RawQuery = qs.Encode() return &_result, nil diff --git a/pkg/gen/internalmessages/moving_expense.go b/pkg/gen/internalmessages/moving_expense.go index 89c0fb59eb5..249de7b0362 100644 --- a/pkg/gen/internalmessages/moving_expense.go +++ b/pkg/gen/internalmessages/moving_expense.go @@ -77,6 +77,9 @@ type MovingExpense struct { // Format: date SitEndDate *strfmt.Date `json:"sitEndDate"` + // sit location + SitLocation *SITLocationType `json:"sitLocation,omitempty"` + // The date the shipment entered storage, applicable for the `STORAGE` movingExpenseType only // Example: 2022-04-26 // Format: date @@ -131,6 +134,10 @@ func (m *MovingExpense) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateSitLocation(formats); err != nil { + res = append(res, err) + } + if err := m.validateSitStartDate(formats); err != nil { res = append(res, err) } @@ -271,6 +278,25 @@ func (m *MovingExpense) validateSitEndDate(formats strfmt.Registry) error { return nil } +func (m *MovingExpense) validateSitLocation(formats strfmt.Registry) error { + if swag.IsZero(m.SitLocation) { // not required + return nil + } + + if m.SitLocation != nil { + if err := m.SitLocation.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sitLocation") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("sitLocation") + } + return err + } + } + + return nil +} + func (m *MovingExpense) validateSitStartDate(formats strfmt.Registry) error { if swag.IsZero(m.SitStartDate) { // not required return nil @@ -351,6 +377,10 @@ func (m *MovingExpense) ContextValidate(ctx context.Context, formats strfmt.Regi res = append(res, err) } + if err := m.contextValidateSitLocation(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateStatus(ctx, formats); err != nil { res = append(res, err) } @@ -469,6 +499,27 @@ func (m *MovingExpense) contextValidateReason(ctx context.Context, formats strfm return nil } +func (m *MovingExpense) contextValidateSitLocation(ctx context.Context, formats strfmt.Registry) error { + + if m.SitLocation != nil { + + if swag.IsZero(m.SitLocation) { // not required + return nil + } + + if err := m.SitLocation.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sitLocation") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("sitLocation") + } + return err + } + } + + return nil +} + func (m *MovingExpense) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { if m.Status != nil { diff --git a/pkg/gen/internalmessages/p_p_m_shipment_status.go b/pkg/gen/internalmessages/p_p_m_shipment_status.go index 4ce4f8b504d..f509efa3730 100644 --- a/pkg/gen/internalmessages/p_p_m_shipment_status.go +++ b/pkg/gen/internalmessages/p_p_m_shipment_status.go @@ -19,8 +19,8 @@ import ( // - **SUBMITTED**: The shipment belongs to a move that has been submitted by the customer or has been created by a Service Counselor or Prime Contractor for a submitted move. // - **WAITING_ON_CUSTOMER**: The PPM shipment has been approved and the customer may now provide their actual move closeout information and documentation required to get paid. // - **NEEDS_ADVANCE_APPROVAL**: The shipment was counseled by the Prime Contractor and approved but an advance was requested so will need further financial approval from the government. -// - **NEEDS_PAYMENT_APPROVAL**: The customer has provided their closeout weight tickets, receipts, and expenses and certified it for the Service Counselor to approve, exclude or reject. -// - **PAYMENT_APPROVED**: The Service Counselor has reviewed all of the customer's PPM closeout documentation and authorizes the customer can download and submit their finalized SSW packet. +// - **NEEDS_CLOSEOUT**: The customer has provided their closeout weight tickets, receipts, and expenses and certified it for the Service Counselor to approve, exclude or reject. +// - **CLOSEOUT_COMPLETE**: The Service Counselor has reviewed all of the customer's PPM closeout documentation and authorizes the customer can download and submit their finalized SSW packet. // // swagger:model PPMShipmentStatus type PPMShipmentStatus string @@ -48,11 +48,11 @@ const ( // PPMShipmentStatusNEEDSADVANCEAPPROVAL captures enum value "NEEDS_ADVANCE_APPROVAL" PPMShipmentStatusNEEDSADVANCEAPPROVAL PPMShipmentStatus = "NEEDS_ADVANCE_APPROVAL" - // PPMShipmentStatusNEEDSPAYMENTAPPROVAL captures enum value "NEEDS_PAYMENT_APPROVAL" - PPMShipmentStatusNEEDSPAYMENTAPPROVAL PPMShipmentStatus = "NEEDS_PAYMENT_APPROVAL" + // PPMShipmentStatusNEEDSCLOSEOUT captures enum value "NEEDS_CLOSEOUT" + PPMShipmentStatusNEEDSCLOSEOUT PPMShipmentStatus = "NEEDS_CLOSEOUT" - // PPMShipmentStatusPAYMENTAPPROVED captures enum value "PAYMENT_APPROVED" - PPMShipmentStatusPAYMENTAPPROVED PPMShipmentStatus = "PAYMENT_APPROVED" + // PPMShipmentStatusCLOSEOUTCOMPLETE captures enum value "CLOSEOUT_COMPLETE" + PPMShipmentStatusCLOSEOUTCOMPLETE PPMShipmentStatus = "CLOSEOUT_COMPLETE" ) // for schema @@ -60,7 +60,7 @@ var pPMShipmentStatusEnum []interface{} func init() { var res []PPMShipmentStatus - if err := json.Unmarshal([]byte(`["DRAFT","SUBMITTED","WAITING_ON_CUSTOMER","NEEDS_ADVANCE_APPROVAL","NEEDS_PAYMENT_APPROVAL","PAYMENT_APPROVED"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["DRAFT","SUBMITTED","WAITING_ON_CUSTOMER","NEEDS_ADVANCE_APPROVAL","NEEDS_CLOSEOUT","CLOSEOUT_COMPLETE"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/pkg/gen/internalmessages/update_moving_expense.go b/pkg/gen/internalmessages/update_moving_expense.go index a7f3e8ef1cf..e779d570f4a 100644 --- a/pkg/gen/internalmessages/update_moving_expense.go +++ b/pkg/gen/internalmessages/update_moving_expense.go @@ -43,6 +43,9 @@ type UpdateMovingExpense struct { // Format: date SitEndDate strfmt.Date `json:"sitEndDate,omitempty"` + // sit location + SitLocation *SITLocationType `json:"sitLocation,omitempty"` + // The date the shipment entered storage, applicable for the `STORAGE` movingExpenseType only // Format: date SitStartDate strfmt.Date `json:"sitStartDate,omitempty"` @@ -79,6 +82,10 @@ func (m *UpdateMovingExpense) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateSitLocation(formats); err != nil { + res = append(res, err) + } + if err := m.validateSitStartDate(formats); err != nil { res = append(res, err) } @@ -161,6 +168,25 @@ func (m *UpdateMovingExpense) validateSitEndDate(formats strfmt.Registry) error return nil } +func (m *UpdateMovingExpense) validateSitLocation(formats strfmt.Registry) error { + if swag.IsZero(m.SitLocation) { // not required + return nil + } + + if m.SitLocation != nil { + if err := m.SitLocation.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sitLocation") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("sitLocation") + } + return err + } + } + + return nil +} + func (m *UpdateMovingExpense) validateSitStartDate(formats strfmt.Registry) error { if swag.IsZero(m.SitStartDate) { // not required return nil @@ -181,6 +207,10 @@ func (m *UpdateMovingExpense) ContextValidate(ctx context.Context, formats strfm res = append(res, err) } + if err := m.contextValidateSitLocation(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -204,6 +234,27 @@ func (m *UpdateMovingExpense) contextValidateMovingExpenseType(ctx context.Conte return nil } +func (m *UpdateMovingExpense) contextValidateSitLocation(ctx context.Context, formats strfmt.Registry) error { + + if m.SitLocation != nil { + + if swag.IsZero(m.SitLocation) { // not required + return nil + } + + if err := m.SitLocation.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sitLocation") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("sitLocation") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *UpdateMovingExpense) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/pkg/gen/primeapi/embedded_spec.go b/pkg/gen/primeapi/embedded_spec.go index 747b45a8c02..82dcbe5b799 100644 --- a/pkg/gen/primeapi/embedded_spec.go +++ b/pkg/gen/primeapi/embedded_spec.go @@ -3387,15 +3387,15 @@ func init() { "x-nullable": true }, "PPMShipmentStatus": { - "description": "Status of the PPM Shipment:\n * **DRAFT**: The customer has created the PPM shipment but has not yet submitted their move for counseling.\n * **SUBMITTED**: The shipment belongs to a move that has been submitted by the customer or has been created by a Service Counselor or Prime Contractor for a submitted move.\n * **WAITING_ON_CUSTOMER**: The PPM shipment has been approved and the customer may now provide their actual move closeout information and documentation required to get paid.\n * **NEEDS_ADVANCE_APPROVAL**: The shipment was counseled by the Prime Contractor and approved but an advance was requested so will need further financial approval from the government.\n * **NEEDS_PAYMENT_APPROVAL**: The customer has provided their closeout weight tickets, receipts, and expenses and certified it for the Service Counselor to approve, exclude or reject.\n * **PAYMENT_APPROVED**: The Service Counselor has reviewed all of the customer's PPM closeout documentation and authorizes the customer can download and submit their finalized SSW packet.\n", + "description": "Status of the PPM Shipment:\n * **DRAFT**: The customer has created the PPM shipment but has not yet submitted their move for counseling.\n * **SUBMITTED**: The shipment belongs to a move that has been submitted by the customer or has been created by a Service Counselor or Prime Contractor for a submitted move.\n * **WAITING_ON_CUSTOMER**: The PPM shipment has been approved and the customer may now provide their actual move closeout information and documentation required to get paid.\n * **NEEDS_ADVANCE_APPROVAL**: The shipment was counseled by the Prime Contractor and approved but an advance was requested so will need further financial approval from the government.\n * **NEEDS_CLOSEOUT**: The customer has provided their closeout weight tickets, receipts, and expenses and certified it for the Service Counselor to approve, exclude or reject.\n * **CLOSEOUT_COMPLETE**: The Service Counselor has reviewed all of the customer's PPM closeout documentation and authorizes the customer can download and submit their finalized SSW packet.\n", "type": "string", "enum": [ "DRAFT", "SUBMITTED", "WAITING_ON_CUSTOMER", "NEEDS_ADVANCE_APPROVAL", - "NEEDS_PAYMENT_APPROVAL", - "PAYMENT_APPROVED" + "NEEDS_CLOSEOUT", + "CLOSEOUT_COMPLETE" ], "readOnly": true }, @@ -3898,7 +3898,10 @@ func init() { "ZipSITDestHHGFinalAddress", "ZipSITDestHHGOriginalAddress", "ZipSITOriginHHGActualAddress", - "ZipSITOriginHHGOriginalAddress" + "ZipSITOriginHHGOriginalAddress", + "StandaloneCrate", + "StandaloneCrateCap", + "UncappedRequestTotal" ] }, "ServiceItemParamOrigin": { @@ -4321,6 +4324,20 @@ func init() { "x-nullable": true, "x-omitempty": false }, + "actualProGearWeight": { + "description": "The actual weight of any pro gear shipped during a move.", + "type": "integer", + "minimum": 1, + "x-nullable": true, + "example": 4500 + }, + "actualSpouseProGearWeight": { + "description": "The actual weight of any pro gear shipped during a move.", + "type": "integer", + "minimum": 1, + "x-nullable": true, + "example": 4500 + }, "counselorRemarks": { "type": "string", "x-nullable": true, @@ -8551,15 +8568,15 @@ func init() { "x-nullable": true }, "PPMShipmentStatus": { - "description": "Status of the PPM Shipment:\n * **DRAFT**: The customer has created the PPM shipment but has not yet submitted their move for counseling.\n * **SUBMITTED**: The shipment belongs to a move that has been submitted by the customer or has been created by a Service Counselor or Prime Contractor for a submitted move.\n * **WAITING_ON_CUSTOMER**: The PPM shipment has been approved and the customer may now provide their actual move closeout information and documentation required to get paid.\n * **NEEDS_ADVANCE_APPROVAL**: The shipment was counseled by the Prime Contractor and approved but an advance was requested so will need further financial approval from the government.\n * **NEEDS_PAYMENT_APPROVAL**: The customer has provided their closeout weight tickets, receipts, and expenses and certified it for the Service Counselor to approve, exclude or reject.\n * **PAYMENT_APPROVED**: The Service Counselor has reviewed all of the customer's PPM closeout documentation and authorizes the customer can download and submit their finalized SSW packet.\n", + "description": "Status of the PPM Shipment:\n * **DRAFT**: The customer has created the PPM shipment but has not yet submitted their move for counseling.\n * **SUBMITTED**: The shipment belongs to a move that has been submitted by the customer or has been created by a Service Counselor or Prime Contractor for a submitted move.\n * **WAITING_ON_CUSTOMER**: The PPM shipment has been approved and the customer may now provide their actual move closeout information and documentation required to get paid.\n * **NEEDS_ADVANCE_APPROVAL**: The shipment was counseled by the Prime Contractor and approved but an advance was requested so will need further financial approval from the government.\n * **NEEDS_CLOSEOUT**: The customer has provided their closeout weight tickets, receipts, and expenses and certified it for the Service Counselor to approve, exclude or reject.\n * **CLOSEOUT_COMPLETE**: The Service Counselor has reviewed all of the customer's PPM closeout documentation and authorizes the customer can download and submit their finalized SSW packet.\n", "type": "string", "enum": [ "DRAFT", "SUBMITTED", "WAITING_ON_CUSTOMER", "NEEDS_ADVANCE_APPROVAL", - "NEEDS_PAYMENT_APPROVAL", - "PAYMENT_APPROVED" + "NEEDS_CLOSEOUT", + "CLOSEOUT_COMPLETE" ], "readOnly": true }, @@ -9052,7 +9069,10 @@ func init() { "ZipSITDestHHGFinalAddress", "ZipSITDestHHGOriginalAddress", "ZipSITOriginHHGActualAddress", - "ZipSITOriginHHGOriginalAddress" + "ZipSITOriginHHGOriginalAddress", + "StandaloneCrate", + "StandaloneCrateCap", + "UncappedRequestTotal" ] }, "ServiceItemParamOrigin": { @@ -9490,6 +9510,20 @@ func init() { "x-nullable": true, "x-omitempty": false }, + "actualProGearWeight": { + "description": "The actual weight of any pro gear shipped during a move.", + "type": "integer", + "minimum": 1, + "x-nullable": true, + "example": 4500 + }, + "actualSpouseProGearWeight": { + "description": "The actual weight of any pro gear shipped during a move.", + "type": "integer", + "minimum": 1, + "x-nullable": true, + "example": 4500 + }, "counselorRemarks": { "type": "string", "x-nullable": true, diff --git a/pkg/gen/primemessages/p_p_m_shipment_status.go b/pkg/gen/primemessages/p_p_m_shipment_status.go index 781e529a045..371337b4482 100644 --- a/pkg/gen/primemessages/p_p_m_shipment_status.go +++ b/pkg/gen/primemessages/p_p_m_shipment_status.go @@ -19,8 +19,8 @@ import ( // - **SUBMITTED**: The shipment belongs to a move that has been submitted by the customer or has been created by a Service Counselor or Prime Contractor for a submitted move. // - **WAITING_ON_CUSTOMER**: The PPM shipment has been approved and the customer may now provide their actual move closeout information and documentation required to get paid. // - **NEEDS_ADVANCE_APPROVAL**: The shipment was counseled by the Prime Contractor and approved but an advance was requested so will need further financial approval from the government. -// - **NEEDS_PAYMENT_APPROVAL**: The customer has provided their closeout weight tickets, receipts, and expenses and certified it for the Service Counselor to approve, exclude or reject. -// - **PAYMENT_APPROVED**: The Service Counselor has reviewed all of the customer's PPM closeout documentation and authorizes the customer can download and submit their finalized SSW packet. +// - **NEEDS_CLOSEOUT**: The customer has provided their closeout weight tickets, receipts, and expenses and certified it for the Service Counselor to approve, exclude or reject. +// - **CLOSEOUT_COMPLETE**: The Service Counselor has reviewed all of the customer's PPM closeout documentation and authorizes the customer can download and submit their finalized SSW packet. // // swagger:model PPMShipmentStatus type PPMShipmentStatus string @@ -48,11 +48,11 @@ const ( // PPMShipmentStatusNEEDSADVANCEAPPROVAL captures enum value "NEEDS_ADVANCE_APPROVAL" PPMShipmentStatusNEEDSADVANCEAPPROVAL PPMShipmentStatus = "NEEDS_ADVANCE_APPROVAL" - // PPMShipmentStatusNEEDSPAYMENTAPPROVAL captures enum value "NEEDS_PAYMENT_APPROVAL" - PPMShipmentStatusNEEDSPAYMENTAPPROVAL PPMShipmentStatus = "NEEDS_PAYMENT_APPROVAL" + // PPMShipmentStatusNEEDSCLOSEOUT captures enum value "NEEDS_CLOSEOUT" + PPMShipmentStatusNEEDSCLOSEOUT PPMShipmentStatus = "NEEDS_CLOSEOUT" - // PPMShipmentStatusPAYMENTAPPROVED captures enum value "PAYMENT_APPROVED" - PPMShipmentStatusPAYMENTAPPROVED PPMShipmentStatus = "PAYMENT_APPROVED" + // PPMShipmentStatusCLOSEOUTCOMPLETE captures enum value "CLOSEOUT_COMPLETE" + PPMShipmentStatusCLOSEOUTCOMPLETE PPMShipmentStatus = "CLOSEOUT_COMPLETE" ) // for schema @@ -60,7 +60,7 @@ var pPMShipmentStatusEnum []interface{} func init() { var res []PPMShipmentStatus - if err := json.Unmarshal([]byte(`["DRAFT","SUBMITTED","WAITING_ON_CUSTOMER","NEEDS_ADVANCE_APPROVAL","NEEDS_PAYMENT_APPROVAL","PAYMENT_APPROVED"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["DRAFT","SUBMITTED","WAITING_ON_CUSTOMER","NEEDS_ADVANCE_APPROVAL","NEEDS_CLOSEOUT","CLOSEOUT_COMPLETE"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/pkg/gen/primemessages/service_item_param_name.go b/pkg/gen/primemessages/service_item_param_name.go index e34660eac01..7f8e128b151 100644 --- a/pkg/gen/primemessages/service_item_param_name.go +++ b/pkg/gen/primemessages/service_item_param_name.go @@ -227,6 +227,15 @@ const ( // ServiceItemParamNameZipSITOriginHHGOriginalAddress captures enum value "ZipSITOriginHHGOriginalAddress" ServiceItemParamNameZipSITOriginHHGOriginalAddress ServiceItemParamName = "ZipSITOriginHHGOriginalAddress" + + // ServiceItemParamNameStandaloneCrate captures enum value "StandaloneCrate" + ServiceItemParamNameStandaloneCrate ServiceItemParamName = "StandaloneCrate" + + // ServiceItemParamNameStandaloneCrateCap captures enum value "StandaloneCrateCap" + ServiceItemParamNameStandaloneCrateCap ServiceItemParamName = "StandaloneCrateCap" + + // ServiceItemParamNameUncappedRequestTotal captures enum value "UncappedRequestTotal" + ServiceItemParamNameUncappedRequestTotal ServiceItemParamName = "UncappedRequestTotal" ) // for schema @@ -234,7 +243,7 @@ var serviceItemParamNameEnum []interface{} func init() { var res []ServiceItemParamName - if err := json.Unmarshal([]byte(`["ActualPickupDate","ContractCode","ContractYearName","CubicFeetBilled","CubicFeetCrating","DimensionHeight","DimensionLength","DimensionWidth","DistanceZip","DistanceZipSITDest","DistanceZipSITOrigin","EIAFuelPrice","EscalationCompounded","FSCMultiplier","FSCPriceDifferenceInCents","FSCWeightBasedDistanceMultiplier","IsPeak","MarketDest","MarketOrigin","MTOAvailableToPrimeAt","NTSPackingFactor","NumberDaysSIT","PriceAreaDest","PriceAreaIntlDest","PriceAreaIntlOrigin","PriceAreaOrigin","PriceRateOrFactor","PSI_LinehaulDom","PSI_LinehaulDomPrice","PSI_LinehaulShort","PSI_LinehaulShortPrice","PSI_PriceDomDest","PSI_PriceDomDestPrice","PSI_PriceDomOrigin","PSI_PriceDomOriginPrice","PSI_ShippingLinehaulIntlCO","PSI_ShippingLinehaulIntlCOPrice","PSI_ShippingLinehaulIntlOC","PSI_ShippingLinehaulIntlOCPrice","PSI_ShippingLinehaulIntlOO","PSI_ShippingLinehaulIntlOOPrice","RateAreaNonStdDest","RateAreaNonStdOrigin","ReferenceDate","RequestedPickupDate","ServiceAreaDest","ServiceAreaOrigin","ServicesScheduleDest","ServicesScheduleOrigin","SITPaymentRequestEnd","SITPaymentRequestStart","SITScheduleDest","SITScheduleOrigin","SITServiceAreaDest","SITServiceAreaOrigin","WeightAdjusted","WeightBilled","WeightEstimated","WeightOriginal","WeightReweigh","ZipDestAddress","ZipPickupAddress","ZipSITDestHHGFinalAddress","ZipSITDestHHGOriginalAddress","ZipSITOriginHHGActualAddress","ZipSITOriginHHGOriginalAddress"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["ActualPickupDate","ContractCode","ContractYearName","CubicFeetBilled","CubicFeetCrating","DimensionHeight","DimensionLength","DimensionWidth","DistanceZip","DistanceZipSITDest","DistanceZipSITOrigin","EIAFuelPrice","EscalationCompounded","FSCMultiplier","FSCPriceDifferenceInCents","FSCWeightBasedDistanceMultiplier","IsPeak","MarketDest","MarketOrigin","MTOAvailableToPrimeAt","NTSPackingFactor","NumberDaysSIT","PriceAreaDest","PriceAreaIntlDest","PriceAreaIntlOrigin","PriceAreaOrigin","PriceRateOrFactor","PSI_LinehaulDom","PSI_LinehaulDomPrice","PSI_LinehaulShort","PSI_LinehaulShortPrice","PSI_PriceDomDest","PSI_PriceDomDestPrice","PSI_PriceDomOrigin","PSI_PriceDomOriginPrice","PSI_ShippingLinehaulIntlCO","PSI_ShippingLinehaulIntlCOPrice","PSI_ShippingLinehaulIntlOC","PSI_ShippingLinehaulIntlOCPrice","PSI_ShippingLinehaulIntlOO","PSI_ShippingLinehaulIntlOOPrice","RateAreaNonStdDest","RateAreaNonStdOrigin","ReferenceDate","RequestedPickupDate","ServiceAreaDest","ServiceAreaOrigin","ServicesScheduleDest","ServicesScheduleOrigin","SITPaymentRequestEnd","SITPaymentRequestStart","SITScheduleDest","SITScheduleOrigin","SITServiceAreaDest","SITServiceAreaOrigin","WeightAdjusted","WeightBilled","WeightEstimated","WeightOriginal","WeightReweigh","ZipDestAddress","ZipPickupAddress","ZipSITDestHHGFinalAddress","ZipSITDestHHGOriginalAddress","ZipSITOriginHHGActualAddress","ZipSITOriginHHGOriginalAddress","StandaloneCrate","StandaloneCrateCap","UncappedRequestTotal"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/pkg/gen/primemessages/update_m_t_o_shipment.go b/pkg/gen/primemessages/update_m_t_o_shipment.go index 1275ad14a1b..074e9772850 100644 --- a/pkg/gen/primemessages/update_m_t_o_shipment.go +++ b/pkg/gen/primemessages/update_m_t_o_shipment.go @@ -27,6 +27,16 @@ type UpdateMTOShipment struct { // Format: date ActualPickupDate *strfmt.Date `json:"actualPickupDate"` + // The actual weight of any pro gear shipped during a move. + // Example: 4500 + // Minimum: 1 + ActualProGearWeight *int64 `json:"actualProGearWeight,omitempty"` + + // The actual weight of any pro gear shipped during a move. + // Example: 4500 + // Minimum: 1 + ActualSpouseProGearWeight *int64 `json:"actualSpouseProGearWeight,omitempty"` + // counselor remarks // Example: counselor approved CounselorRemarks *string `json:"counselorRemarks,omitempty"` @@ -118,6 +128,14 @@ func (m *UpdateMTOShipment) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateActualProGearWeight(formats); err != nil { + res = append(res, err) + } + + if err := m.validateActualSpouseProGearWeight(formats); err != nil { + res = append(res, err) + } + if err := m.validateDestinationAddress(formats); err != nil { res = append(res, err) } @@ -200,6 +218,30 @@ func (m *UpdateMTOShipment) validateActualPickupDate(formats strfmt.Registry) er return nil } +func (m *UpdateMTOShipment) validateActualProGearWeight(formats strfmt.Registry) error { + if swag.IsZero(m.ActualProGearWeight) { // not required + return nil + } + + if err := validate.MinimumInt("actualProGearWeight", "body", *m.ActualProGearWeight, 1, false); err != nil { + return err + } + + return nil +} + +func (m *UpdateMTOShipment) validateActualSpouseProGearWeight(formats strfmt.Registry) error { + if swag.IsZero(m.ActualSpouseProGearWeight) { // not required + return nil + } + + if err := validate.MinimumInt("actualSpouseProGearWeight", "body", *m.ActualSpouseProGearWeight, 1, false); err != nil { + return err + } + + return nil +} + func (m *UpdateMTOShipment) validateDestinationAddress(formats strfmt.Registry) error { if swag.IsZero(m.DestinationAddress) { // not required return nil diff --git a/pkg/gen/primev2api/embedded_spec.go b/pkg/gen/primev2api/embedded_spec.go index f078f4a05c5..f48044499f7 100644 --- a/pkg/gen/primev2api/embedded_spec.go +++ b/pkg/gen/primev2api/embedded_spec.go @@ -2157,15 +2157,15 @@ func init() { "x-nullable": true }, "PPMShipmentStatus": { - "description": "Status of the PPM Shipment:\n * **DRAFT**: The customer has created the PPM shipment but has not yet submitted their move for counseling.\n * **SUBMITTED**: The shipment belongs to a move that has been submitted by the customer or has been created by a Service Counselor or Prime Contractor for a submitted move.\n * **WAITING_ON_CUSTOMER**: The PPM shipment has been approved and the customer may now provide their actual move closeout information and documentation required to get paid.\n * **NEEDS_ADVANCE_APPROVAL**: The shipment was counseled by the Prime Contractor and approved but an advance was requested so will need further financial approval from the government.\n * **NEEDS_PAYMENT_APPROVAL**: The customer has provided their closeout weight tickets, receipts, and expenses and certified it for the Service Counselor to approve, exclude or reject.\n * **PAYMENT_APPROVED**: The Service Counselor has reviewed all of the customer's PPM closeout documentation and authorizes the customer can download and submit their finalized SSW packet.\n", + "description": "Status of the PPM Shipment:\n * **DRAFT**: The customer has created the PPM shipment but has not yet submitted their move for counseling.\n * **SUBMITTED**: The shipment belongs to a move that has been submitted by the customer or has been created by a Service Counselor or Prime Contractor for a submitted move.\n * **WAITING_ON_CUSTOMER**: The PPM shipment has been approved and the customer may now provide their actual move closeout information and documentation required to get paid.\n * **NEEDS_ADVANCE_APPROVAL**: The shipment was counseled by the Prime Contractor and approved but an advance was requested so will need further financial approval from the government.\n * **NEEDS_CLOSEOUT**: The customer has provided their closeout weight tickets, receipts, and expenses and certified it for the Service Counselor to approve, exclude or reject.\n * **CLOSEOUT_COMPLETE**: The Service Counselor has reviewed all of the customer's PPM closeout documentation and authorizes the customer can download and submit their finalized SSW packet.\n", "type": "string", "enum": [ "DRAFT", "SUBMITTED", "WAITING_ON_CUSTOMER", "NEEDS_ADVANCE_APPROVAL", - "NEEDS_PAYMENT_APPROVAL", - "PAYMENT_APPROVED" + "NEEDS_CLOSEOUT", + "CLOSEOUT_COMPLETE" ], "readOnly": true }, @@ -2637,7 +2637,10 @@ func init() { "ZipSITDestHHGFinalAddress", "ZipSITDestHHGOriginalAddress", "ZipSITOriginHHGActualAddress", - "ZipSITOriginHHGOriginalAddress" + "ZipSITOriginHHGOriginalAddress", + "StandaloneCrate", + "StandaloneCrateCap", + "UncappedRequestTotal" ] }, "ServiceItemParamOrigin": { @@ -5661,15 +5664,15 @@ func init() { "x-nullable": true }, "PPMShipmentStatus": { - "description": "Status of the PPM Shipment:\n * **DRAFT**: The customer has created the PPM shipment but has not yet submitted their move for counseling.\n * **SUBMITTED**: The shipment belongs to a move that has been submitted by the customer or has been created by a Service Counselor or Prime Contractor for a submitted move.\n * **WAITING_ON_CUSTOMER**: The PPM shipment has been approved and the customer may now provide their actual move closeout information and documentation required to get paid.\n * **NEEDS_ADVANCE_APPROVAL**: The shipment was counseled by the Prime Contractor and approved but an advance was requested so will need further financial approval from the government.\n * **NEEDS_PAYMENT_APPROVAL**: The customer has provided their closeout weight tickets, receipts, and expenses and certified it for the Service Counselor to approve, exclude or reject.\n * **PAYMENT_APPROVED**: The Service Counselor has reviewed all of the customer's PPM closeout documentation and authorizes the customer can download and submit their finalized SSW packet.\n", + "description": "Status of the PPM Shipment:\n * **DRAFT**: The customer has created the PPM shipment but has not yet submitted their move for counseling.\n * **SUBMITTED**: The shipment belongs to a move that has been submitted by the customer or has been created by a Service Counselor or Prime Contractor for a submitted move.\n * **WAITING_ON_CUSTOMER**: The PPM shipment has been approved and the customer may now provide their actual move closeout information and documentation required to get paid.\n * **NEEDS_ADVANCE_APPROVAL**: The shipment was counseled by the Prime Contractor and approved but an advance was requested so will need further financial approval from the government.\n * **NEEDS_CLOSEOUT**: The customer has provided their closeout weight tickets, receipts, and expenses and certified it for the Service Counselor to approve, exclude or reject.\n * **CLOSEOUT_COMPLETE**: The Service Counselor has reviewed all of the customer's PPM closeout documentation and authorizes the customer can download and submit their finalized SSW packet.\n", "type": "string", "enum": [ "DRAFT", "SUBMITTED", "WAITING_ON_CUSTOMER", "NEEDS_ADVANCE_APPROVAL", - "NEEDS_PAYMENT_APPROVAL", - "PAYMENT_APPROVED" + "NEEDS_CLOSEOUT", + "CLOSEOUT_COMPLETE" ], "readOnly": true }, @@ -6141,7 +6144,10 @@ func init() { "ZipSITDestHHGFinalAddress", "ZipSITDestHHGOriginalAddress", "ZipSITOriginHHGActualAddress", - "ZipSITOriginHHGOriginalAddress" + "ZipSITOriginHHGOriginalAddress", + "StandaloneCrate", + "StandaloneCrateCap", + "UncappedRequestTotal" ] }, "ServiceItemParamOrigin": { diff --git a/pkg/gen/primev2messages/p_p_m_shipment_status.go b/pkg/gen/primev2messages/p_p_m_shipment_status.go index 72ecfe774bc..439086abcaa 100644 --- a/pkg/gen/primev2messages/p_p_m_shipment_status.go +++ b/pkg/gen/primev2messages/p_p_m_shipment_status.go @@ -19,8 +19,8 @@ import ( // - **SUBMITTED**: The shipment belongs to a move that has been submitted by the customer or has been created by a Service Counselor or Prime Contractor for a submitted move. // - **WAITING_ON_CUSTOMER**: The PPM shipment has been approved and the customer may now provide their actual move closeout information and documentation required to get paid. // - **NEEDS_ADVANCE_APPROVAL**: The shipment was counseled by the Prime Contractor and approved but an advance was requested so will need further financial approval from the government. -// - **NEEDS_PAYMENT_APPROVAL**: The customer has provided their closeout weight tickets, receipts, and expenses and certified it for the Service Counselor to approve, exclude or reject. -// - **PAYMENT_APPROVED**: The Service Counselor has reviewed all of the customer's PPM closeout documentation and authorizes the customer can download and submit their finalized SSW packet. +// - **NEEDS_CLOSEOUT**: The customer has provided their closeout weight tickets, receipts, and expenses and certified it for the Service Counselor to approve, exclude or reject. +// - **CLOSEOUT_COMPLETE**: The Service Counselor has reviewed all of the customer's PPM closeout documentation and authorizes the customer can download and submit their finalized SSW packet. // // swagger:model PPMShipmentStatus type PPMShipmentStatus string @@ -48,11 +48,11 @@ const ( // PPMShipmentStatusNEEDSADVANCEAPPROVAL captures enum value "NEEDS_ADVANCE_APPROVAL" PPMShipmentStatusNEEDSADVANCEAPPROVAL PPMShipmentStatus = "NEEDS_ADVANCE_APPROVAL" - // PPMShipmentStatusNEEDSPAYMENTAPPROVAL captures enum value "NEEDS_PAYMENT_APPROVAL" - PPMShipmentStatusNEEDSPAYMENTAPPROVAL PPMShipmentStatus = "NEEDS_PAYMENT_APPROVAL" + // PPMShipmentStatusNEEDSCLOSEOUT captures enum value "NEEDS_CLOSEOUT" + PPMShipmentStatusNEEDSCLOSEOUT PPMShipmentStatus = "NEEDS_CLOSEOUT" - // PPMShipmentStatusPAYMENTAPPROVED captures enum value "PAYMENT_APPROVED" - PPMShipmentStatusPAYMENTAPPROVED PPMShipmentStatus = "PAYMENT_APPROVED" + // PPMShipmentStatusCLOSEOUTCOMPLETE captures enum value "CLOSEOUT_COMPLETE" + PPMShipmentStatusCLOSEOUTCOMPLETE PPMShipmentStatus = "CLOSEOUT_COMPLETE" ) // for schema @@ -60,7 +60,7 @@ var pPMShipmentStatusEnum []interface{} func init() { var res []PPMShipmentStatus - if err := json.Unmarshal([]byte(`["DRAFT","SUBMITTED","WAITING_ON_CUSTOMER","NEEDS_ADVANCE_APPROVAL","NEEDS_PAYMENT_APPROVAL","PAYMENT_APPROVED"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["DRAFT","SUBMITTED","WAITING_ON_CUSTOMER","NEEDS_ADVANCE_APPROVAL","NEEDS_CLOSEOUT","CLOSEOUT_COMPLETE"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/pkg/gen/primev2messages/service_item_param_name.go b/pkg/gen/primev2messages/service_item_param_name.go index 330e1fc59e4..a6939ad00f4 100644 --- a/pkg/gen/primev2messages/service_item_param_name.go +++ b/pkg/gen/primev2messages/service_item_param_name.go @@ -227,6 +227,15 @@ const ( // ServiceItemParamNameZipSITOriginHHGOriginalAddress captures enum value "ZipSITOriginHHGOriginalAddress" ServiceItemParamNameZipSITOriginHHGOriginalAddress ServiceItemParamName = "ZipSITOriginHHGOriginalAddress" + + // ServiceItemParamNameStandaloneCrate captures enum value "StandaloneCrate" + ServiceItemParamNameStandaloneCrate ServiceItemParamName = "StandaloneCrate" + + // ServiceItemParamNameStandaloneCrateCap captures enum value "StandaloneCrateCap" + ServiceItemParamNameStandaloneCrateCap ServiceItemParamName = "StandaloneCrateCap" + + // ServiceItemParamNameUncappedRequestTotal captures enum value "UncappedRequestTotal" + ServiceItemParamNameUncappedRequestTotal ServiceItemParamName = "UncappedRequestTotal" ) // for schema @@ -234,7 +243,7 @@ var serviceItemParamNameEnum []interface{} func init() { var res []ServiceItemParamName - if err := json.Unmarshal([]byte(`["ActualPickupDate","ContractCode","ContractYearName","CubicFeetBilled","CubicFeetCrating","DimensionHeight","DimensionLength","DimensionWidth","DistanceZip","DistanceZipSITDest","DistanceZipSITOrigin","EIAFuelPrice","EscalationCompounded","FSCMultiplier","FSCPriceDifferenceInCents","FSCWeightBasedDistanceMultiplier","IsPeak","MarketDest","MarketOrigin","MTOAvailableToPrimeAt","NTSPackingFactor","NumberDaysSIT","PriceAreaDest","PriceAreaIntlDest","PriceAreaIntlOrigin","PriceAreaOrigin","PriceRateOrFactor","PSI_LinehaulDom","PSI_LinehaulDomPrice","PSI_LinehaulShort","PSI_LinehaulShortPrice","PSI_PriceDomDest","PSI_PriceDomDestPrice","PSI_PriceDomOrigin","PSI_PriceDomOriginPrice","PSI_ShippingLinehaulIntlCO","PSI_ShippingLinehaulIntlCOPrice","PSI_ShippingLinehaulIntlOC","PSI_ShippingLinehaulIntlOCPrice","PSI_ShippingLinehaulIntlOO","PSI_ShippingLinehaulIntlOOPrice","RateAreaNonStdDest","RateAreaNonStdOrigin","ReferenceDate","RequestedPickupDate","ServiceAreaDest","ServiceAreaOrigin","ServicesScheduleDest","ServicesScheduleOrigin","SITPaymentRequestEnd","SITPaymentRequestStart","SITScheduleDest","SITScheduleOrigin","SITServiceAreaDest","SITServiceAreaOrigin","WeightAdjusted","WeightBilled","WeightEstimated","WeightOriginal","WeightReweigh","ZipDestAddress","ZipPickupAddress","ZipSITDestHHGFinalAddress","ZipSITDestHHGOriginalAddress","ZipSITOriginHHGActualAddress","ZipSITOriginHHGOriginalAddress"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["ActualPickupDate","ContractCode","ContractYearName","CubicFeetBilled","CubicFeetCrating","DimensionHeight","DimensionLength","DimensionWidth","DistanceZip","DistanceZipSITDest","DistanceZipSITOrigin","EIAFuelPrice","EscalationCompounded","FSCMultiplier","FSCPriceDifferenceInCents","FSCWeightBasedDistanceMultiplier","IsPeak","MarketDest","MarketOrigin","MTOAvailableToPrimeAt","NTSPackingFactor","NumberDaysSIT","PriceAreaDest","PriceAreaIntlDest","PriceAreaIntlOrigin","PriceAreaOrigin","PriceRateOrFactor","PSI_LinehaulDom","PSI_LinehaulDomPrice","PSI_LinehaulShort","PSI_LinehaulShortPrice","PSI_PriceDomDest","PSI_PriceDomDestPrice","PSI_PriceDomOrigin","PSI_PriceDomOriginPrice","PSI_ShippingLinehaulIntlCO","PSI_ShippingLinehaulIntlCOPrice","PSI_ShippingLinehaulIntlOC","PSI_ShippingLinehaulIntlOCPrice","PSI_ShippingLinehaulIntlOO","PSI_ShippingLinehaulIntlOOPrice","RateAreaNonStdDest","RateAreaNonStdOrigin","ReferenceDate","RequestedPickupDate","ServiceAreaDest","ServiceAreaOrigin","ServicesScheduleDest","ServicesScheduleOrigin","SITPaymentRequestEnd","SITPaymentRequestStart","SITScheduleDest","SITScheduleOrigin","SITServiceAreaDest","SITServiceAreaOrigin","WeightAdjusted","WeightBilled","WeightEstimated","WeightOriginal","WeightReweigh","ZipDestAddress","ZipPickupAddress","ZipSITDestHHGFinalAddress","ZipSITDestHHGOriginalAddress","ZipSITOriginHHGActualAddress","ZipSITOriginHHGOriginalAddress","StandaloneCrate","StandaloneCrateCap","UncappedRequestTotal"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/pkg/gen/primev3api/embedded_spec.go b/pkg/gen/primev3api/embedded_spec.go index b0781334cd5..7a500cbaf13 100644 --- a/pkg/gen/primev3api/embedded_spec.go +++ b/pkg/gen/primev3api/embedded_spec.go @@ -2137,15 +2137,15 @@ func init() { "x-nullable": true }, "PPMShipmentStatus": { - "description": "Status of the PPM Shipment:\n * **DRAFT**: The customer has created the PPM shipment but has not yet submitted their move for counseling.\n * **SUBMITTED**: The shipment belongs to a move that has been submitted by the customer or has been created by a Service Counselor or Prime Contractor for a submitted move.\n * **WAITING_ON_CUSTOMER**: The PPM shipment has been approved and the customer may now provide their actual move closeout information and documentation required to get paid.\n * **NEEDS_ADVANCE_APPROVAL**: The shipment was counseled by the Prime Contractor and approved but an advance was requested so will need further financial approval from the government.\n * **NEEDS_PAYMENT_APPROVAL**: The customer has provided their closeout weight tickets, receipts, and expenses and certified it for the Service Counselor to approve, exclude or reject.\n * **PAYMENT_APPROVED**: The Service Counselor has reviewed all of the customer's PPM closeout documentation and authorizes the customer can download and submit their finalized SSW packet.\n", + "description": "Status of the PPM Shipment:\n * **DRAFT**: The customer has created the PPM shipment but has not yet submitted their move for counseling.\n * **SUBMITTED**: The shipment belongs to a move that has been submitted by the customer or has been created by a Service Counselor or Prime Contractor for a submitted move.\n * **WAITING_ON_CUSTOMER**: The PPM shipment has been approved and the customer may now provide their actual move closeout information and documentation required to get paid.\n * **NEEDS_ADVANCE_APPROVAL**: The shipment was counseled by the Prime Contractor and approved but an advance was requested so will need further financial approval from the government.\n * **NEEDS_CLOSEOUT**: The customer has provided their closeout weight tickets, receipts, and expenses and certified it for the Service Counselor to approve, exclude or reject.\n * **CLOSEOUT_COMPLETE**: The Service Counselor has reviewed all of the customer's PPM closeout documentation and authorizes the customer can download and submit their finalized SSW packet.\n", "type": "string", "enum": [ "DRAFT", "SUBMITTED", "WAITING_ON_CUSTOMER", "NEEDS_ADVANCE_APPROVAL", - "NEEDS_PAYMENT_APPROVAL", - "PAYMENT_APPROVED" + "NEEDS_CLOSEOUT", + "CLOSEOUT_COMPLETE" ], "readOnly": true }, @@ -2617,7 +2617,10 @@ func init() { "ZipSITDestHHGFinalAddress", "ZipSITDestHHGOriginalAddress", "ZipSITOriginHHGActualAddress", - "ZipSITOriginHHGOriginalAddress" + "ZipSITOriginHHGOriginalAddress", + "StandaloneCrate", + "StandaloneCrateCap", + "UncappedRequestTotal" ] }, "ServiceItemParamOrigin": { @@ -3039,6 +3042,18 @@ func init() { "x-nullable": true, "x-omitempty": false }, + "actualProGearWeight": { + "description": "The actual weight of any pro gear shipped during a move.", + "type": "integer", + "x-nullable": true, + "example": 4500 + }, + "actualSpouseProGearWeight": { + "description": "The actual weight of any pro gear shipped during a move.", + "type": "integer", + "x-nullable": true, + "example": 4500 + }, "counselorRemarks": { "type": "string", "x-nullable": true, @@ -5620,15 +5635,15 @@ func init() { "x-nullable": true }, "PPMShipmentStatus": { - "description": "Status of the PPM Shipment:\n * **DRAFT**: The customer has created the PPM shipment but has not yet submitted their move for counseling.\n * **SUBMITTED**: The shipment belongs to a move that has been submitted by the customer or has been created by a Service Counselor or Prime Contractor for a submitted move.\n * **WAITING_ON_CUSTOMER**: The PPM shipment has been approved and the customer may now provide their actual move closeout information and documentation required to get paid.\n * **NEEDS_ADVANCE_APPROVAL**: The shipment was counseled by the Prime Contractor and approved but an advance was requested so will need further financial approval from the government.\n * **NEEDS_PAYMENT_APPROVAL**: The customer has provided their closeout weight tickets, receipts, and expenses and certified it for the Service Counselor to approve, exclude or reject.\n * **PAYMENT_APPROVED**: The Service Counselor has reviewed all of the customer's PPM closeout documentation and authorizes the customer can download and submit their finalized SSW packet.\n", + "description": "Status of the PPM Shipment:\n * **DRAFT**: The customer has created the PPM shipment but has not yet submitted their move for counseling.\n * **SUBMITTED**: The shipment belongs to a move that has been submitted by the customer or has been created by a Service Counselor or Prime Contractor for a submitted move.\n * **WAITING_ON_CUSTOMER**: The PPM shipment has been approved and the customer may now provide their actual move closeout information and documentation required to get paid.\n * **NEEDS_ADVANCE_APPROVAL**: The shipment was counseled by the Prime Contractor and approved but an advance was requested so will need further financial approval from the government.\n * **NEEDS_CLOSEOUT**: The customer has provided their closeout weight tickets, receipts, and expenses and certified it for the Service Counselor to approve, exclude or reject.\n * **CLOSEOUT_COMPLETE**: The Service Counselor has reviewed all of the customer's PPM closeout documentation and authorizes the customer can download and submit their finalized SSW packet.\n", "type": "string", "enum": [ "DRAFT", "SUBMITTED", "WAITING_ON_CUSTOMER", "NEEDS_ADVANCE_APPROVAL", - "NEEDS_PAYMENT_APPROVAL", - "PAYMENT_APPROVED" + "NEEDS_CLOSEOUT", + "CLOSEOUT_COMPLETE" ], "readOnly": true }, @@ -6100,7 +6115,10 @@ func init() { "ZipSITDestHHGFinalAddress", "ZipSITDestHHGOriginalAddress", "ZipSITOriginHHGActualAddress", - "ZipSITOriginHHGOriginalAddress" + "ZipSITOriginHHGOriginalAddress", + "StandaloneCrate", + "StandaloneCrateCap", + "UncappedRequestTotal" ] }, "ServiceItemParamOrigin": { @@ -6524,6 +6542,18 @@ func init() { "x-nullable": true, "x-omitempty": false }, + "actualProGearWeight": { + "description": "The actual weight of any pro gear shipped during a move.", + "type": "integer", + "x-nullable": true, + "example": 4500 + }, + "actualSpouseProGearWeight": { + "description": "The actual weight of any pro gear shipped during a move.", + "type": "integer", + "x-nullable": true, + "example": 4500 + }, "counselorRemarks": { "type": "string", "x-nullable": true, diff --git a/pkg/gen/primev3messages/p_p_m_shipment_status.go b/pkg/gen/primev3messages/p_p_m_shipment_status.go index 63dd693bf77..e594db1bc55 100644 --- a/pkg/gen/primev3messages/p_p_m_shipment_status.go +++ b/pkg/gen/primev3messages/p_p_m_shipment_status.go @@ -19,8 +19,8 @@ import ( // - **SUBMITTED**: The shipment belongs to a move that has been submitted by the customer or has been created by a Service Counselor or Prime Contractor for a submitted move. // - **WAITING_ON_CUSTOMER**: The PPM shipment has been approved and the customer may now provide their actual move closeout information and documentation required to get paid. // - **NEEDS_ADVANCE_APPROVAL**: The shipment was counseled by the Prime Contractor and approved but an advance was requested so will need further financial approval from the government. -// - **NEEDS_PAYMENT_APPROVAL**: The customer has provided their closeout weight tickets, receipts, and expenses and certified it for the Service Counselor to approve, exclude or reject. -// - **PAYMENT_APPROVED**: The Service Counselor has reviewed all of the customer's PPM closeout documentation and authorizes the customer can download and submit their finalized SSW packet. +// - **NEEDS_CLOSEOUT**: The customer has provided their closeout weight tickets, receipts, and expenses and certified it for the Service Counselor to approve, exclude or reject. +// - **CLOSEOUT_COMPLETE**: The Service Counselor has reviewed all of the customer's PPM closeout documentation and authorizes the customer can download and submit their finalized SSW packet. // // swagger:model PPMShipmentStatus type PPMShipmentStatus string @@ -48,11 +48,11 @@ const ( // PPMShipmentStatusNEEDSADVANCEAPPROVAL captures enum value "NEEDS_ADVANCE_APPROVAL" PPMShipmentStatusNEEDSADVANCEAPPROVAL PPMShipmentStatus = "NEEDS_ADVANCE_APPROVAL" - // PPMShipmentStatusNEEDSPAYMENTAPPROVAL captures enum value "NEEDS_PAYMENT_APPROVAL" - PPMShipmentStatusNEEDSPAYMENTAPPROVAL PPMShipmentStatus = "NEEDS_PAYMENT_APPROVAL" + // PPMShipmentStatusNEEDSCLOSEOUT captures enum value "NEEDS_CLOSEOUT" + PPMShipmentStatusNEEDSCLOSEOUT PPMShipmentStatus = "NEEDS_CLOSEOUT" - // PPMShipmentStatusPAYMENTAPPROVED captures enum value "PAYMENT_APPROVED" - PPMShipmentStatusPAYMENTAPPROVED PPMShipmentStatus = "PAYMENT_APPROVED" + // PPMShipmentStatusCLOSEOUTCOMPLETE captures enum value "CLOSEOUT_COMPLETE" + PPMShipmentStatusCLOSEOUTCOMPLETE PPMShipmentStatus = "CLOSEOUT_COMPLETE" ) // for schema @@ -60,7 +60,7 @@ var pPMShipmentStatusEnum []interface{} func init() { var res []PPMShipmentStatus - if err := json.Unmarshal([]byte(`["DRAFT","SUBMITTED","WAITING_ON_CUSTOMER","NEEDS_ADVANCE_APPROVAL","NEEDS_PAYMENT_APPROVAL","PAYMENT_APPROVED"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["DRAFT","SUBMITTED","WAITING_ON_CUSTOMER","NEEDS_ADVANCE_APPROVAL","NEEDS_CLOSEOUT","CLOSEOUT_COMPLETE"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/pkg/gen/primev3messages/service_item_param_name.go b/pkg/gen/primev3messages/service_item_param_name.go index 51a6f63beea..ab53b71f111 100644 --- a/pkg/gen/primev3messages/service_item_param_name.go +++ b/pkg/gen/primev3messages/service_item_param_name.go @@ -227,6 +227,15 @@ const ( // ServiceItemParamNameZipSITOriginHHGOriginalAddress captures enum value "ZipSITOriginHHGOriginalAddress" ServiceItemParamNameZipSITOriginHHGOriginalAddress ServiceItemParamName = "ZipSITOriginHHGOriginalAddress" + + // ServiceItemParamNameStandaloneCrate captures enum value "StandaloneCrate" + ServiceItemParamNameStandaloneCrate ServiceItemParamName = "StandaloneCrate" + + // ServiceItemParamNameStandaloneCrateCap captures enum value "StandaloneCrateCap" + ServiceItemParamNameStandaloneCrateCap ServiceItemParamName = "StandaloneCrateCap" + + // ServiceItemParamNameUncappedRequestTotal captures enum value "UncappedRequestTotal" + ServiceItemParamNameUncappedRequestTotal ServiceItemParamName = "UncappedRequestTotal" ) // for schema @@ -234,7 +243,7 @@ var serviceItemParamNameEnum []interface{} func init() { var res []ServiceItemParamName - if err := json.Unmarshal([]byte(`["ActualPickupDate","ContractCode","ContractYearName","CubicFeetBilled","CubicFeetCrating","DimensionHeight","DimensionLength","DimensionWidth","DistanceZip","DistanceZipSITDest","DistanceZipSITOrigin","EIAFuelPrice","EscalationCompounded","FSCMultiplier","FSCPriceDifferenceInCents","FSCWeightBasedDistanceMultiplier","IsPeak","MarketDest","MarketOrigin","MTOAvailableToPrimeAt","NTSPackingFactor","NumberDaysSIT","PriceAreaDest","PriceAreaIntlDest","PriceAreaIntlOrigin","PriceAreaOrigin","PriceRateOrFactor","PSI_LinehaulDom","PSI_LinehaulDomPrice","PSI_LinehaulShort","PSI_LinehaulShortPrice","PSI_PriceDomDest","PSI_PriceDomDestPrice","PSI_PriceDomOrigin","PSI_PriceDomOriginPrice","PSI_ShippingLinehaulIntlCO","PSI_ShippingLinehaulIntlCOPrice","PSI_ShippingLinehaulIntlOC","PSI_ShippingLinehaulIntlOCPrice","PSI_ShippingLinehaulIntlOO","PSI_ShippingLinehaulIntlOOPrice","RateAreaNonStdDest","RateAreaNonStdOrigin","ReferenceDate","RequestedPickupDate","ServiceAreaDest","ServiceAreaOrigin","ServicesScheduleDest","ServicesScheduleOrigin","SITPaymentRequestEnd","SITPaymentRequestStart","SITScheduleDest","SITScheduleOrigin","SITServiceAreaDest","SITServiceAreaOrigin","WeightAdjusted","WeightBilled","WeightEstimated","WeightOriginal","WeightReweigh","ZipDestAddress","ZipPickupAddress","ZipSITDestHHGFinalAddress","ZipSITDestHHGOriginalAddress","ZipSITOriginHHGActualAddress","ZipSITOriginHHGOriginalAddress"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["ActualPickupDate","ContractCode","ContractYearName","CubicFeetBilled","CubicFeetCrating","DimensionHeight","DimensionLength","DimensionWidth","DistanceZip","DistanceZipSITDest","DistanceZipSITOrigin","EIAFuelPrice","EscalationCompounded","FSCMultiplier","FSCPriceDifferenceInCents","FSCWeightBasedDistanceMultiplier","IsPeak","MarketDest","MarketOrigin","MTOAvailableToPrimeAt","NTSPackingFactor","NumberDaysSIT","PriceAreaDest","PriceAreaIntlDest","PriceAreaIntlOrigin","PriceAreaOrigin","PriceRateOrFactor","PSI_LinehaulDom","PSI_LinehaulDomPrice","PSI_LinehaulShort","PSI_LinehaulShortPrice","PSI_PriceDomDest","PSI_PriceDomDestPrice","PSI_PriceDomOrigin","PSI_PriceDomOriginPrice","PSI_ShippingLinehaulIntlCO","PSI_ShippingLinehaulIntlCOPrice","PSI_ShippingLinehaulIntlOC","PSI_ShippingLinehaulIntlOCPrice","PSI_ShippingLinehaulIntlOO","PSI_ShippingLinehaulIntlOOPrice","RateAreaNonStdDest","RateAreaNonStdOrigin","ReferenceDate","RequestedPickupDate","ServiceAreaDest","ServiceAreaOrigin","ServicesScheduleDest","ServicesScheduleOrigin","SITPaymentRequestEnd","SITPaymentRequestStart","SITScheduleDest","SITScheduleOrigin","SITServiceAreaDest","SITServiceAreaOrigin","WeightAdjusted","WeightBilled","WeightEstimated","WeightOriginal","WeightReweigh","ZipDestAddress","ZipPickupAddress","ZipSITDestHHGFinalAddress","ZipSITDestHHGOriginalAddress","ZipSITOriginHHGActualAddress","ZipSITOriginHHGOriginalAddress","StandaloneCrate","StandaloneCrateCap","UncappedRequestTotal"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/pkg/gen/primev3messages/update_m_t_o_shipment.go b/pkg/gen/primev3messages/update_m_t_o_shipment.go index 9ac3991ac02..037dbf4557f 100644 --- a/pkg/gen/primev3messages/update_m_t_o_shipment.go +++ b/pkg/gen/primev3messages/update_m_t_o_shipment.go @@ -27,6 +27,14 @@ type UpdateMTOShipment struct { // Format: date ActualPickupDate *strfmt.Date `json:"actualPickupDate"` + // The actual weight of any pro gear shipped during a move. + // Example: 4500 + ActualProGearWeight *int64 `json:"actualProGearWeight,omitempty"` + + // The actual weight of any pro gear shipped during a move. + // Example: 4500 + ActualSpouseProGearWeight *int64 `json:"actualSpouseProGearWeight,omitempty"` + // counselor remarks // Example: counselor approved CounselorRemarks *string `json:"counselorRemarks,omitempty"` diff --git a/pkg/handlers/adminapi/api.go b/pkg/handlers/adminapi/api.go index 9d61506061e..02b3c0e677e 100644 --- a/pkg/handlers/adminapi/api.go +++ b/pkg/handlers/adminapi/api.go @@ -12,6 +12,7 @@ import ( "github.com/transcom/mymove/pkg/services/clientcert" electronicorder "github.com/transcom/mymove/pkg/services/electronic_order" fetch "github.com/transcom/mymove/pkg/services/fetch" + "github.com/transcom/mymove/pkg/services/ghcrateengine" move "github.com/transcom/mymove/pkg/services/move" movetaskorder "github.com/transcom/mymove/pkg/services/move_task_order" mtoserviceitem "github.com/transcom/mymove/pkg/services/mto_service_item" @@ -196,7 +197,7 @@ func NewAdminAPI(handlerConfig handlers.HandlerConfig) *adminops.MymoveAPI { handlerConfig, movetaskorder.NewMoveTaskOrderUpdater( queryBuilder, - mtoserviceitem.NewMTOServiceItemCreator(handlerConfig.HHGPlanner(), queryBuilder, moveRouter), + mtoserviceitem.NewMTOServiceItemCreator(handlerConfig.HHGPlanner(), queryBuilder, moveRouter, ghcrateengine.NewDomesticUnpackPricer(), ghcrateengine.NewDomesticPackPricer(), ghcrateengine.NewDomesticLinehaulPricer(), ghcrateengine.NewDomesticShorthaulPricer(), ghcrateengine.NewDomesticOriginPricer(), ghcrateengine.NewDomesticDestinationPricer(), ghcrateengine.NewFuelSurchargePricer()), moveRouter, ), } diff --git a/pkg/handlers/adminapi/moves_test.go b/pkg/handlers/adminapi/moves_test.go index dba92cc2b3e..c078bf71b33 100644 --- a/pkg/handlers/adminapi/moves_test.go +++ b/pkg/handlers/adminapi/moves_test.go @@ -15,6 +15,7 @@ import ( "github.com/transcom/mymove/pkg/models" routemocks "github.com/transcom/mymove/pkg/route/mocks" "github.com/transcom/mymove/pkg/services" + "github.com/transcom/mymove/pkg/services/ghcrateengine" "github.com/transcom/mymove/pkg/services/mocks" "github.com/transcom/mymove/pkg/services/move" movetaskorder "github.com/transcom/mymove/pkg/services/move_task_order" @@ -96,7 +97,7 @@ func (suite *HandlerSuite) TestUpdateMoveHandler() { suite.HandlerConfig(), movetaskorder.NewMoveTaskOrderUpdater( builder, - mtoserviceitem.NewMTOServiceItemCreator(planner, builder, moveRouter), + mtoserviceitem.NewMTOServiceItemCreator(planner, builder, moveRouter, ghcrateengine.NewDomesticUnpackPricer(), ghcrateengine.NewDomesticPackPricer(), ghcrateengine.NewDomesticLinehaulPricer(), ghcrateengine.NewDomesticShorthaulPricer(), ghcrateengine.NewDomesticOriginPricer(), ghcrateengine.NewDomesticDestinationPricer(), ghcrateengine.NewFuelSurchargePricer()), moveRouter, ), } diff --git a/pkg/handlers/adminapi/office_users_test.go b/pkg/handlers/adminapi/office_users_test.go index 658f40cd180..6b98c3ea9f8 100644 --- a/pkg/handlers/adminapi/office_users_test.go +++ b/pkg/handlers/adminapi/office_users_test.go @@ -29,8 +29,8 @@ import ( func (suite *HandlerSuite) TestIndexOfficeUsersHandler() { setupTestData := func() models.OfficeUsers { return models.OfficeUsers{ - factory.BuildOfficeUserWithRoles(suite.DB(), factory.GetTraitApprovedOfficeUser(), []roles.RoleType{roles.RoleTypeQaeCsr}), - factory.BuildOfficeUserWithRoles(suite.DB(), factory.GetTraitApprovedOfficeUser(), []roles.RoleType{roles.RoleTypeQaeCsr}), + factory.BuildOfficeUserWithRoles(suite.DB(), factory.GetTraitApprovedOfficeUser(), []roles.RoleType{roles.RoleTypeQae}), + factory.BuildOfficeUserWithRoles(suite.DB(), factory.GetTraitApprovedOfficeUser(), []roles.RoleType{roles.RoleTypeQae}), } } diff --git a/pkg/handlers/adminapi/requested_office_users_test.go b/pkg/handlers/adminapi/requested_office_users_test.go index 6fbfc095df5..fa179cf5167 100644 --- a/pkg/handlers/adminapi/requested_office_users_test.go +++ b/pkg/handlers/adminapi/requested_office_users_test.go @@ -29,8 +29,8 @@ func (suite *HandlerSuite) TestIndexRequestedOfficeUsersHandler() { suite.Run("requested users result in ok response", func() { // building two office user with requested status requestedOfficeUsers := models.OfficeUsers{ - factory.BuildOfficeUserWithRoles(suite.DB(), factory.GetTraitRequestedOfficeUser(), []roles.RoleType{roles.RoleTypeQaeCsr}), - factory.BuildOfficeUserWithRoles(suite.DB(), factory.GetTraitRequestedOfficeUser(), []roles.RoleType{roles.RoleTypeQaeCsr})} + factory.BuildOfficeUserWithRoles(suite.DB(), factory.GetTraitRequestedOfficeUser(), []roles.RoleType{roles.RoleTypeQae}), + factory.BuildOfficeUserWithRoles(suite.DB(), factory.GetTraitRequestedOfficeUser(), []roles.RoleType{roles.RoleTypeQae})} params := requestedofficeuserop.IndexRequestedOfficeUsersParams{ HTTPRequest: suite.setupAuthenticatedRequest("GET", "/requested_office_users"), } @@ -56,7 +56,7 @@ func (suite *HandlerSuite) TestIndexRequestedOfficeUsersHandler() { func (suite *HandlerSuite) TestGetRequestedOfficeUserHandler() { // test that everything is wired up suite.Run("integration test ok response", func() { - requestedOfficeUser := factory.BuildOfficeUserWithRoles(suite.DB(), factory.GetTraitRequestedOfficeUser(), []roles.RoleType{roles.RoleTypeQaeCsr}) + requestedOfficeUser := factory.BuildOfficeUserWithRoles(suite.DB(), factory.GetTraitRequestedOfficeUser(), []roles.RoleType{roles.RoleTypeQae}) params := requestedofficeuserop.GetRequestedOfficeUserParams{ HTTPRequest: suite.setupAuthenticatedRequest("GET", fmt.Sprintf("/requested_office_users/%s", requestedOfficeUser.ID)), OfficeUserID: strfmt.UUID(requestedOfficeUser.ID.String()), @@ -94,7 +94,7 @@ func (suite *HandlerSuite) TestGetRequestedOfficeUserHandler() { }) suite.Run("successful response", func() { - requestedOfficeUser := factory.BuildOfficeUserWithRoles(suite.DB(), factory.GetTraitRequestedOfficeUser(), []roles.RoleType{roles.RoleTypeQaeCsr}) + requestedOfficeUser := factory.BuildOfficeUserWithRoles(suite.DB(), factory.GetTraitRequestedOfficeUser(), []roles.RoleType{roles.RoleTypeQae}) params := requestedofficeuserop.GetRequestedOfficeUserParams{ HTTPRequest: suite.setupAuthenticatedRequest("GET", fmt.Sprintf("/requested_office_users/%s", requestedOfficeUser.ID)), OfficeUserID: strfmt.UUID(requestedOfficeUser.ID.String()), @@ -135,7 +135,7 @@ func (suite *HandlerSuite) TestGetRequestedOfficeUserHandler() { }) suite.Run("unsuccessful response when fetch fails", func() { - requestedOfficeUser := factory.BuildOfficeUserWithRoles(suite.DB(), factory.GetTraitRequestedOfficeUser(), []roles.RoleType{roles.RoleTypeQaeCsr}) + requestedOfficeUser := factory.BuildOfficeUserWithRoles(suite.DB(), factory.GetTraitRequestedOfficeUser(), []roles.RoleType{roles.RoleTypeQae}) params := requestedofficeuserop.GetRequestedOfficeUserParams{ HTTPRequest: suite.setupAuthenticatedRequest("GET", fmt.Sprintf("/requested_office_users/%s", requestedOfficeUser.ID)), OfficeUserID: strfmt.UUID(requestedOfficeUser.ID.String()), diff --git a/pkg/handlers/authentication/auth_test.go b/pkg/handlers/authentication/auth_test.go index 0f729e8e351..bac98391362 100644 --- a/pkg/handlers/authentication/auth_test.go +++ b/pkg/handlers/authentication/auth_test.go @@ -429,10 +429,10 @@ func (suite *AuthSuite) TestRequirePermissionsMiddlewareAuthorized() { // Test permissions middleware with a user who will be DENIED POST access on the endpoint: ghc/v1/shipments/:shipmentID/approve // role must NOT have update.shipment permissions func (suite *AuthSuite) TestRequirePermissionsMiddlewareUnauthorized() { - // QAECSR users will be denied access as they lack the proper permissions for our test - update.shipment - qaeCsrOfficeUser := factory.BuildOfficeUserWithRoles(suite.DB(), nil, []roles.RoleType{roles.RoleTypeQaeCsr}) + // QAE users will be denied access as they lack the proper permissions for our test - update.shipment + qaeOfficeUser := factory.BuildOfficeUserWithRoles(suite.DB(), nil, []roles.RoleType{roles.RoleTypeQae}) - identity, err := models.FetchUserIdentity(suite.DB(), qaeCsrOfficeUser.User.OktaID) + identity, err := models.FetchUserIdentity(suite.DB(), qaeOfficeUser.User.OktaID) suite.NoError(err) @@ -442,7 +442,7 @@ func (suite *AuthSuite) TestRequirePermissionsMiddlewareUnauthorized() { // And: the context contains the auth values handlerSession := auth.Session{ - UserID: qaeCsrOfficeUser.User.ID, + UserID: qaeOfficeUser.User.ID, IDToken: "fake Token", ApplicationName: "mil", } @@ -465,7 +465,7 @@ func (suite *AuthSuite) TestRequirePermissionsMiddlewareUnauthorized() { middleware(handler).ServeHTTP(rr, req) suite.Equal(http.StatusUnauthorized, rr.Code, "handler returned wrong status code") - suite.Equal(handlerSession.UserID, qaeCsrOfficeUser.User.ID, "the authenticated user is different from expected") + suite.Equal(handlerSession.UserID, qaeOfficeUser.User.ID, "the authenticated user is different from expected") } func (suite *AuthSuite) TestIsLoggedInWhenNoUserLoggedIn() { @@ -1424,7 +1424,7 @@ func (suite *AuthSuite) TestAuthorizeUnknownUserOfficeLogsInWithPermissions() { Model: user, LinkOnly: true, }, - }, []roles.RoleType{roles.RoleTypeQaeCsr}) + }, []roles.RoleType{roles.RoleTypeQae}) handlerConfig := suite.HandlerConfig() appnames := handlerConfig.AppNames() @@ -1460,13 +1460,13 @@ func (suite *AuthSuite) TestAuthorizeUnknownUserOfficeLogsInWithPermissions() { suite.NotEqual("", foundUser.CurrentOfficeSessionID) // Make sure session contains roles and permissions suite.NotEmpty(session.Roles) - userRole, hasRole := officeUser.User.Roles.GetRole(roles.RoleTypeQaeCsr) + userRole, hasRole := officeUser.User.Roles.GetRole(roles.RoleTypeQae) suite.True(hasRole) - sessionRole, hasRole := session.Roles.GetRole(roles.RoleTypeQaeCsr) + sessionRole, hasRole := session.Roles.GetRole(roles.RoleTypeQae) suite.True(hasRole) suite.Equal(userRole.ID, sessionRole.ID) suite.NotEmpty(session.Permissions) - suite.ElementsMatch(QAECSR.Permissions, session.Permissions) + suite.ElementsMatch(QAE.Permissions, session.Permissions) } func (suite *AuthSuite) TestAuthorizeUnknownUserAdminDeactivated() { diff --git a/pkg/handlers/authentication/devlocal.go b/pkg/handlers/authentication/devlocal.go index 109475dc2c3..ad0f78c9625 100644 --- a/pkg/handlers/authentication/devlocal.go +++ b/pkg/handlers/authentication/devlocal.go @@ -31,8 +31,10 @@ const ( ServicesCounselorOfficeUserType string = "Services Counselor office" // PrimeSimulatorOfficeUserType is the type of user for an Office user PrimeSimulatorOfficeUserType string = "Prime Simulator office" - // QaeCsrOfficeUserType is a type of user for an Office user - QaeCsrOfficeUserType string = "QAE/CSR office" + // QaeOfficeUserType is a type of user for an Office user + QaeOfficeUserType string = "QAE office" + // CustomerServiceRepresentativeOfficeUserType is the Customer Service Representative type of user for an Office user + CustomerServiceRepresentativeOfficeUserType string = "CSR office" // MultiRoleOfficeUserType has all the Office user roles MultiRoleOfficeUserType string = "Multi role office" // AdminUserType is the type of user for an admin user @@ -93,22 +95,23 @@ func (h UserListHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { } type TemplateData struct { - Identities []models.UserIdentity - Gblocs []string - GblocDefault string - IsMilApp bool - MilMoveUserType string - IsOfficeApp bool - TOOOfficeUserType string - TIOOfficeUserType string - ServicesCounselorOfficeUserType string - PrimeSimulatorOfficeUserType string - QaeCsrOfficeUserType string - MultiRoleOfficeUserType string - IsAdminApp bool - AdminUserType string - CsrfToken string - QueryLimit int + Identities []models.UserIdentity + Gblocs []string + GblocDefault string + IsMilApp bool + MilMoveUserType string + IsOfficeApp bool + TOOOfficeUserType string + TIOOfficeUserType string + ServicesCounselorOfficeUserType string + PrimeSimulatorOfficeUserType string + QaeOfficeUserType string + CustomerServiceRepresentativeOfficeUserType string + MultiRoleOfficeUserType string + IsAdminApp bool + AdminUserType string + CsrfToken string + QueryLimit int } templateData := TemplateData{ @@ -122,10 +125,11 @@ func (h UserListHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { TIOOfficeUserType: TIOOfficeUserType, ServicesCounselorOfficeUserType: ServicesCounselorOfficeUserType, PrimeSimulatorOfficeUserType: PrimeSimulatorOfficeUserType, - QaeCsrOfficeUserType: QaeCsrOfficeUserType, - MultiRoleOfficeUserType: MultiRoleOfficeUserType, - IsAdminApp: auth.AdminApp == appCtx.Session().ApplicationName, - AdminUserType: AdminUserType, + QaeOfficeUserType: QaeOfficeUserType, + CustomerServiceRepresentativeOfficeUserType: CustomerServiceRepresentativeOfficeUserType, + MultiRoleOfficeUserType: MultiRoleOfficeUserType, + IsAdminApp: auth.AdminApp == appCtx.Session().ApplicationName, + AdminUserType: AdminUserType, // Build CSRF token instead of grabbing from middleware. Otherwise throws errors when accessed directly. CsrfToken: csrf.Token(r), QueryLimit: limit, @@ -247,12 +251,21 @@ func (h UserListHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
+ +