Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DO NOT MERGE - this is a diff of what's changed since Release 3.0.8 #368

Draft
wants to merge 34 commits into
base: release-3.0.8
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
36241a4
Bump path-parse from 1.0.6 to 1.0.7 in /vue/sbc-common-components (#238)
dependabot[bot] Mar 16, 2023
a8a2074
Update nodejs.yml (#321)
seeker25 Mar 17, 2023
4797a3d
Update common-util.ts
severinbeauvais Apr 27, 2023
b93585e
Update config-helper.ts
severinbeauvais Apr 27, 2023
9a91dad
Update vue-ci.yml (#331)
seeker25 Jul 28, 2023
594804a
Fix default for getFlag. (#334)
seeker25 Sep 27, 2023
1aa7dc8
Fix serialize array (#335)
seeker25 Oct 3, 2023
d5053bd
Add in http_logger, we can use this in DEV/TEST, but not PROD. (#342)
seeker25 Dec 5, 2023
87a5ee9
Allow signout (#345)
seeker25 Jan 4, 2024
2258ec6
Minor changes (#346)
seeker25 Jan 4, 2024
5807c20
no message (#349)
kris-daxiom Mar 5, 2024
5f99e13
Fix sbc-auth unit tests (#350)
seeker25 Mar 11, 2024
8871ffc
add release notes (#351)
eve-git Apr 22, 2024
05cec58
include queue message types (#352)
seeker25 May 3, 2024
1524803
Update enums.py (#353)
seeker25 May 3, 2024
6880382
Update enums.py
seeker25 May 6, 2024
71912ef
Add in common PaymentToken dataclass. (#354)
seeker25 May 6, 2024
9c39308
Update enums.py
seeker25 May 6, 2024
15a43af
names message type (#355)
bolyachevets May 7, 2024
f4dae84
Update enums.py
seeker25 May 7, 2024
5a8d762
Update enums.py
seeker25 May 7, 2024
6cbacdd
Update enums.py
seeker25 May 16, 2024
5d114de
Added environment alert to the header. Header needs to be passed an e…
EPortman May 17, 2024
374c4fe
Made banner nonexistant when environment passed in is not one of thes…
EPortman May 17, 2024
de5f7d8
Merge pull request #357 from EPortman/master
ozamani9gh May 22, 2024
9498611
Bumped up version numbers in package.json and package-lock.json for t…
EPortman May 27, 2024
e92f7c0
Bump follow-redirects in /vue/sbc-common-components (#347)
dependabot[bot] May 31, 2024
a37663f
Bump browserify-sign from 4.2.1 to 4.2.2 in /vue/sbc-common-component…
dependabot[bot] May 31, 2024
a74816b
Bump chromedriver from 103.0.0 to 119.0.1 in /vue/sbc-common-componen…
dependabot[bot] May 31, 2024
e770b4a
Revert "Bump chromedriver from 103.0.0 to 119.0.1 in /vue/sbc-common-…
seeker25 May 31, 2024
22978d8
Update enums.py
seeker25 May 31, 2024
8307880
signout on whitelist (#373)
seeker25 Sep 11, 2024
43c90c0
Small flex fix (#374)
seeker25 Sep 11, 2024
d640dc7
handle empty dict (#375)
bolyachevets Oct 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: master
paths:
- '**package.json'
workflow_dispatch:

jobs:
build:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/vue-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
branches:
- master
- 4.0.0-vue3
paths:
- "vue/sbc-common-components/**"

Expand Down
2 changes: 1 addition & 1 deletion python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Flask-OpenTracing
Flask-OpenTracing==1.1.0
Flask-SQLAlchemy
Flask
Jinja2
Expand Down
4 changes: 2 additions & 2 deletions python/requirements/prod.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
flask
Flask-SQLAlchemy
flask-jwt-oidc>=0.1.5
Flask-OpenTracing
jaeger-client
Flask-OpenTracing==1.1.0
jaeger-client
14 changes: 14 additions & 0 deletions python/src/sbc_common_components/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright © 2019 Province of British Columbia
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""This module holds general utility functions and helpers for the main package."""
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from werkzeug.exceptions import HTTPException, default_exceptions
import logging
logger = logging.getLogger('api-exceptions')
http_logger = logging.getLogger('api-exceptions-http')

RESPONSE_HEADERS = {'Content-Type': 'application/json', 'Access-Control-Allow-Origin': '*'}

Expand All @@ -31,7 +32,7 @@ def __init__(self, app=None):

def auth_handler(self, error): # pylint: disable=no-self-use
"""Handle AuthError."""
logger.error(error.error)
http_logger.error(error.error)
return error.error, error.status_code, RESPONSE_HEADERS

def db_handler(self, error): # pylint: disable=no-self-use
Expand All @@ -46,7 +47,7 @@ def db_handler(self, error): # pylint: disable=no-self-use
def std_handler(self, error): # pylint: disable=no-self-use
"""Handle standard exception."""
if isinstance(error, HTTPException):
logger.error(error)
http_logger.error(error)
message = dict(message=error.message if hasattr(error, 'message') else error.description)
else:
logger.exception(error)
Expand Down
13 changes: 11 additions & 2 deletions python/src/sbc_common_components/utils/camel_case_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,18 @@ def camelcase(string):
])


def camelcase_dict(data: Dict[str, any], camel_dict: Dict[str, any]):
def camelcase_dict(data, camel_dict: Dict[str, any]):
"""Iterate through the dict and convert to camel case."""
if data:

if isinstance(data, list):
if not data: # empty array is falsy
return []
return [camelcase_dict(item, {}) for item in data]

if isinstance(data, dict):
if not data: # empty dict is falsy
return {}

for key, value in data.items():
key = camelcase(key)
if isinstance(value, dict):
Expand Down
12 changes: 12 additions & 0 deletions python/src/sbc_common_components/utils/dataclasses.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from dataclasses import asdict, dataclass
from typing import Optional


@dataclass
class PaymentToken:
"""Payment Token payload common interface for LEAR and Names."""

id: Optional[str] = None
status_code: Optional[str] = None
filing_identifier: Optional[str] = None
corp_type_code: Optional[str] = None
64 changes: 64 additions & 0 deletions python/src/sbc_common_components/utils/enums.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
from enum import Enum

class QueueMessageTypes(Enum):
"""Queue MessageTypes."""

# Note some of these need to match inside of SubjectType in account_mailer.enums.

ACTIVITY_LOG = 'bc.registry.auth.activity'
ADMIN_NOTIFICATION = 'bc.registry.auth.adminNotification'
ADMIN_REMOVED = 'bc.registry.auth.adminRemoved'
AFFILIATION_INVITATION = 'bc.registry.auth.affiliationInvitation'
AFFILIATION_INVITATION_REQUEST = 'bc.registry.auth.affiliationInvitationRequest'
AFFILIATION_INVITATION_REQUEST_AUTHORIZATION = 'bc.registry.auth.affiliationInvitationRequestAuthorization'
BUSINESS_INVITATION = 'bc.registry.auth.businessInvitation'
BUSINESS_INVITATION_FOR_BCEID = 'bc.registry.auth.businessInvitationForBceid'
CAS_MESSAGE_TYPE = 'bc.registry.payment.casSettlementUploaded'
CGI_ACK_MESSAGE_TYPE = 'bc.registry.payment.cgi.ACKReceived'
CGI_FEEDBACK_MESSAGE_TYPE = 'bc.registry.payment.cgi.FEEDBACKReceived'
CONFIRMATION_PERIOD_OVER = 'bc.registry.payment.confirmationPeriodOver'
DIRSEARCH_BUSINESS_INVITATION = 'bc.registry.auth.dirsearchBusinessInvitation'
EFT_AVAILABLE_NOTIFICATION = 'bc.registry.payment.eftAvailableNotification'
EFT_FILE_UPLOADED = 'bc.registry.payment.eft.fileUploaded'
EFT_INVOICE_CREATED = 'bc.registry.payment.eft.invoiceCreated'
EJV_FAILED = 'bc.registry.payment.ejvFailed'
GOVM_APPROVED_NOTIFICATION = 'bc.registry.auth.govmApprovedNotification'
GOVM_BUSINESS_INVITATION = 'bc.registry.auth.govmBusinessInvitation'
GOVM_MEMBER_INVITATION = 'bc.registry.auth.govmMemberInvitation'
GOVM_REJECTED_NOTIFICATION = 'bc.registry.auth.govmRejectedNotification'
INCORPORATION = 'bc.registry.business.incorporationApplication'
MEMBERSHIP_APPROVED_NOTIFICATION = 'bc.registry.auth.membershipApprovedNotification'
MEMBERSHIP_APPROVED_NOTIFICATION_FOR_BCEID = 'bc.registry.auth.membershipApprovedNotificationForBceid'
NAMES_EVENT = 'bc.registry.names.events'
NAMES_MESSAGE_TYPE = 'bc.registry.names.request'
NON_BCSC_ORG_APPROVED_NOTIFICATION = 'bc.registry.auth.nonbcscOrgApprovedNotification'
NON_BCSC_ORG_REJECTED_NOTIFICATION = 'bc.registry.auth.nonbcscOrgRejectedNotification'
NSF_LOCK_ACCOUNT = 'bc.registry.payment.lockAccount'
NSF_UNLOCK_ACCOUNT = 'bc.registry.payment.unlockAccount'
ONLINE_BANKING_OVER_PAYMENT = 'bc.registry.payment.OverPaid'
ONLINE_BANKING_PAYMENT = 'bc.registry.payment.Payment'
ONLINE_BANKING_UNDER_PAYMENT = 'bc.registry.payment.UnderPaid'
OTP_AUTHENTICATOR_RESET_NOTIFICATION = 'bc.registry.auth.otpAuthenticatorResetNotification'
PAD_ACCOUNT_CREATE = 'bc.registry.payment.padAccountCreate'
PAD_INVOICE_CREATED = 'bc.registry.payment.pad.invoiceCreated'
PAD_PAYMENT_SUCCESS = 'bc.registry.payment.PAD.PaymentSuccess'
PAD_SETUP_FAILED = 'bc.registry.payment.PadSetupFailed'
PAYMENT = 'bc.registry.payment'
PAYMENT_DUE_NOTIFICATION = 'bc.registry.payment.statementDueNotification'
PAYMENT_PENDING = 'bc.registry.payment.ob.outstandingInvoice'
PAYMENT_REMINDER_NOTIFICATION = 'bc.registry.payment.statementReminderNotification'
PROD_PACKAGE_APPROVED_NOTIFICATION = 'bc.registry.auth.prodPackageApprovedNotification'
PROD_PACKAGE_REJECTED_NOTIFICATION = 'bc.registry.auth.prodPackageRejectedNotification'
PRODUCT_APPROVED_NOTIFICATION_DETAILED = 'bc.registry.auth.productApprovedNotificationDetailed'
PRODUCT_CONFIRMATION_NOTIFICATION = 'bc.registry.auth.productConfirmationNotification'
PRODUCT_REJECTED_NOTIFICATION_DETAILED = 'bc.registry.auth.productRejectedNotificationDetailed'
REFUND_DRAWDOWN_REQUEST = 'bc.registry.payment.drawdown.refundRequest'
REGISTRATION = 'bc.registry.business.registration'
RESET_PASSCODE = 'bc.registry.auth.resetPasscode'
RESUBMIT_BCEID_ADMIN_NOTIFICATION = 'bc.registry.auth.resubmitBceidAdmin'
RESUBMIT_BCEID_ORG_NOTIFICATION = 'bc.registry.auth.resubmitBceidOrg'
ROLE_CHANGED_NOTIFICATION = 'bc.registry.auth.roleChangedNotification'
STAFF_REVIEW_ACCOUNT = 'bc.registry.auth.staffReviewAccount'
STATEMENT_NOTIFICATION = 'bc.registry.payment.statementNotification'
TEAM_MEMBER_INVITED = 'bc.registry.auth.teamMemberInvited'
TEAM_MODIFIED = 'bc.registry.auth.teamModified'
67 changes: 35 additions & 32 deletions vue/sbc-common-components/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vue/sbc-common-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sbc-common-components",
"version": "3.0.8",
"version": "3.0.15",
"private": false,
"description": "Common Vue Components to be used across BC Registries and Online Services.",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion vue/sbc-common-components/src/components/BaseAddress.vue
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export default class BaseAddress extends Mixins(ValidationMixin, CountriesProvin
@Prop({ default: false })
readonly noPoBox: boolean

resetRegion() {
resetRegion () {
this.addressLocal['addressRegion'] = ''
}

Expand Down
1 change: 1 addition & 0 deletions vue/sbc-common-components/src/components/SbcFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="https://www.release-notes.bcregistry.gov.bc.ca" target="_blank">Release Notes</a></li>
<li><a href="https://www2.gov.bc.ca/gov/content/home/disclaimer" target="_blank">Disclaimer</a></li>
<li><a href="https://www2.gov.bc.ca/gov/content/home/privacy" target="_blank">Privacy</a></li>
<li><a href="https://www2.gov.bc.ca/gov/content/home/accessibility" target="_blank">Accessibility</a></li>
Expand Down
Loading
Loading