@sbc-connect/nuxt-pay 0.2.5 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @sbc-connect/nuxt-pay
2
2
 
3
+ ## 0.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @sbc-connect/nuxt-auth@0.7.1
9
+
10
+ ## 0.3.0
11
+
12
+ ### Minor Changes
13
+
14
+ - [#136](https://github.com/bcgov/connect-nuxt/pull/136) [`7e3a970`](https://github.com/bcgov/connect-nuxt/commit/7e3a9701ddd5304851c8d55c9fc940b2da656cbf) Thanks [@cameron-eyds](https://github.com/cameron-eyds)! - Misc typing and e2e test fixes
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies [[`31c8786`](https://github.com/bcgov/connect-nuxt/commit/31c87862eae861c21fd26d8b79325b38eca565cb), [`7e3a970`](https://github.com/bcgov/connect-nuxt/commit/7e3a9701ddd5304851c8d55c9fc940b2da656cbf), [`9c10812`](https://github.com/bcgov/connect-nuxt/commit/9c10812d8ecde646eb185310376cabd3319a414d), [`644cb59`](https://github.com/bcgov/connect-nuxt/commit/644cb59f04d17e8ad5d480ad63d475359415ebcc)]:
19
+ - @sbc-connect/nuxt-auth@0.7.0
20
+
3
21
  ## 0.2.5
4
22
 
5
23
  ### Patch Changes
@@ -1,11 +1,11 @@
1
1
  export default defineNuxtPlugin((nuxtApp) => {
2
2
  const rtc = nuxtApp.$config.public
3
- const payApiUrl = rtc.payApiUrl + rtc.payApiVersion
4
- const appName = rtc.appName
5
- const xApiKey = rtc.xApiKey
3
+ const payApiUrl = `${rtc.payApiUrl}${rtc.payApiVersion}`
4
+ const appName = String(rtc.appName ?? '')
5
+ const xApiKey = String(rtc.xApiKey ?? '')
6
6
 
7
7
  const api = $fetch.create({
8
- baseURL: payApiUrl,
8
+ baseURL: payApiUrl as string,
9
9
  async onRequest({ options }) {
10
10
  const auth = useConnectAuth()
11
11
  const accountStore = useConnectAccountStore()
@@ -43,14 +43,14 @@ export const useConnectFeeStore = defineStore('connect-pay-fee-store', () => {
43
43
  ) => {
44
44
  loading.value = true
45
45
  // Get all the fee information for each fee code from the pay api
46
- const feePromises = []
46
+ const feePromises: Promise<ConnectFeeItem | undefined>[] = []
47
47
  for (const feeInfo of feeCodes) {
48
48
  feePromises.push(getFee(feeInfo.entityType, feeInfo.code))
49
49
  }
50
- const feesResolved = (await Promise.all(feePromises)).filter(fee => !!fee)
50
+ const feesResolved = (await Promise.all(feePromises)).filter((fee): fee is ConnectFeeItem => !!fee)
51
51
 
52
52
  // Add all fee information for each code to the store
53
- feesCached.value = feesResolved.reduce((reducedFees, fee) => {
53
+ feesCached.value = feesResolved.reduce((reducedFees: ConnectFees, fee: ConnectFeeItem) => {
54
54
  return {
55
55
  ...reducedFees,
56
56
  [fee.filingTypeCode]: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sbc-connect/nuxt-pay",
3
3
  "type": "module",
4
- "version": "0.2.5",
4
+ "version": "0.3.1",
5
5
  "repository": "github:bcgov/connect-nuxt",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "./nuxt.config.ts",
@@ -16,7 +16,7 @@
16
16
  "@sbc-connect/vitest-config": "0.1.0"
17
17
  },
18
18
  "dependencies": {
19
- "@sbc-connect/nuxt-auth": "0.6.2"
19
+ "@sbc-connect/nuxt-auth": "0.7.1"
20
20
  },
21
21
  "scripts": {
22
22
  "preinstall": "npx only-allow pnpm",