@mojaloop/api-snippets 12.8.0 → 13.0.2

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.
Files changed (65) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/docs/fspiop-rest-v1.0-openapi3-snippets.yaml +2 -0
  3. package/docs/fspiop-rest-v1.1-openapi3-snippets.yaml +2 -0
  4. package/docs/thirdparty-openapi3-snippets.yaml +832 -1082
  5. package/fspiop/v1_0/openapi3/components/schemas/Currency.yaml +2 -0
  6. package/fspiop/v1_1/openapi3/components/schemas/Currency.yaml +2 -0
  7. package/lib/fspiop/v1_0/openapi.d.ts +1 -1
  8. package/lib/fspiop/v1_1/openapi.d.ts +1 -1
  9. package/lib/thirdparty/index.d.ts +9 -5
  10. package/lib/thirdparty/openapi.d.ts +2325 -2925
  11. package/package.json +4 -2
  12. package/tests/dto/thirdparty.test.ts +37 -25
  13. package/thirdparty/openapi3/components/schemas/Account.yaml +2 -2
  14. package/thirdparty/openapi3/components/schemas/AccountAddress.yaml +7 -0
  15. package/thirdparty/openapi3/components/schemas/AccountsIDPutResponse.yaml +2 -1
  16. package/thirdparty/openapi3/components/schemas/ConsentRequestsIDPatchRequest.yaml +1 -1
  17. package/thirdparty/openapi3/components/schemas/ConsentRequestsIDPutResponseOTP.yaml +8 -8
  18. package/thirdparty/openapi3/components/schemas/ConsentRequestsIDPutResponseWeb.yaml +11 -11
  19. package/thirdparty/openapi3/components/schemas/ConsentRequestsPostRequest.yaml +12 -5
  20. package/thirdparty/openapi3/components/schemas/ConsentStatus.yaml +9 -0
  21. package/thirdparty/openapi3/components/schemas/ConsentStatusIssued.yaml +7 -0
  22. package/thirdparty/openapi3/components/schemas/ConsentStatusRevoked.yaml +7 -0
  23. package/thirdparty/openapi3/components/schemas/ConsentsIDPatchResponseRevoked.yaml +1 -1
  24. package/thirdparty/openapi3/components/schemas/ConsentsIDPatchResponseVerified.yaml +1 -1
  25. package/thirdparty/openapi3/components/schemas/ConsentsIDPutResponseSigned.yaml +2 -0
  26. package/thirdparty/openapi3/components/schemas/ConsentsIDPutResponseVerified.yaml +2 -0
  27. package/thirdparty/openapi3/components/schemas/ConsentsPostRequestAUTH.yaml +6 -1
  28. package/thirdparty/openapi3/components/schemas/ConsentsPostRequestPISP.yaml +10 -6
  29. package/thirdparty/openapi3/components/schemas/CredentialStatusPending.yaml +7 -0
  30. package/thirdparty/openapi3/components/schemas/CredentialStatusVerified.yaml +7 -0
  31. package/thirdparty/openapi3/components/schemas/CredentialType.yaml +2 -0
  32. package/thirdparty/openapi3/components/schemas/FIDOPublicKeyCredentialAttestation.yaml +6 -6
  33. package/thirdparty/openapi3/components/schemas/GenericCredential.yaml +13 -0
  34. package/thirdparty/openapi3/components/schemas/Scope.yaml +6 -9
  35. package/thirdparty/openapi3/components/schemas/ScopeAction.yaml +12 -0
  36. package/thirdparty/openapi3/components/schemas/ServicesServiceTypePutResponse.yaml +2 -0
  37. package/thirdparty/openapi3/components/schemas/SignedCredential.yaml +5 -6
  38. package/thirdparty/openapi3/components/schemas/ThirdpartyRequestsAuthorizationsIDPutResponseFIDO.yaml +2 -2
  39. package/thirdparty/openapi3/components/schemas/ThirdpartyRequestsAuthorizationsIDPutResponseGeneric.yaml +2 -2
  40. package/thirdparty/openapi3/components/schemas/ThirdpartyRequestsTransactionsIDPutResponse.yaml +0 -3
  41. package/thirdparty/openapi3/components/schemas/ThirdpartyRequestsTransactionsPostRequest.yaml +8 -3
  42. package/thirdparty/openapi3/components/schemas/ThirdpartyRequestsVerificationsPostRequestFIDO.yaml +2 -2
  43. package/thirdparty/openapi3/components/schemas/ThirdpartyRequestsVerificationsPostRequestGeneric.yaml +2 -2
  44. package/thirdparty/openapi3/components/schemas/Uri.yaml +8 -0
  45. package/thirdparty/openapi3/openapi.yaml +0 -14
  46. package/thirdparty/openapi3/paths/consentRequests.yaml +2 -1
  47. package/thirdparty/openapi3/paths/consentRequests_ID.yaml +41 -5
  48. package/thirdparty/openapi3/paths/consents.yaml +2 -2
  49. package/thirdparty/openapi3/paths/consents_ID.yaml +8 -5
  50. package/thirdparty/openapi3/paths/thirdpartyRequests_authorizations.yaml +3 -30
  51. package/thirdparty/openapi3/paths/thirdpartyRequests_authorizations_ID.yaml +36 -14
  52. package/thirdparty/openapi3/paths/thirdpartyRequests_transactions.yaml +6 -27
  53. package/thirdparty/openapi3/paths/thirdpartyRequests_transactions_ID.yaml +0 -2
  54. package/thirdparty/openapi3/paths/thirdpartyRequests_verifications.yaml +0 -13
  55. package/thirdparty/openapi3/paths/thirdpartyRequests_verifications_ID.yaml +32 -0
  56. package/thirdparty/openapi3/thirdparty-dfsp-api.template.yaml +53 -0
  57. package/thirdparty/openapi3/thirdparty-dfsp-api.yaml +2637 -0
  58. package/thirdparty/openapi3/thirdparty-pisp-api.template.yaml +57 -0
  59. package/thirdparty/openapi3/thirdparty-pisp-api.yaml +2842 -0
  60. package/thirdparty/openapi3/components/schemas/AccountId.yaml +0 -9
  61. package/thirdparty/openapi3/components/schemas/AuthenticationInfo.yaml +0 -11
  62. package/thirdparty/openapi3/components/schemas/ConsentScopeType.yaml +0 -9
  63. package/thirdparty/openapi3/components/schemas/ConsentStatusTypeRevoked.yaml +0 -7
  64. package/thirdparty/openapi3/components/schemas/ConsentStatusTypeVerified.yaml +0 -7
  65. package/thirdparty/openapi3/paths/thirdpartyRequests_transactions_tsa.yaml +0 -73
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mojaloop/api-snippets",
3
- "version": "12.8.0",
3
+ "version": "13.0.2",
4
4
  "description": "Mojaloop API specification reusable snippets",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -16,6 +16,8 @@
16
16
  "build:v1.0": "openapi bundle --output docs/fspiop-rest-v1.0-openapi3-snippets.yaml --ext yaml fspiop/v1_0/openapi3/openapi.yaml && swagger-cli validate docs/fspiop-rest-v1.0-openapi3-snippets.yaml",
17
17
  "build:v1.1": "openapi bundle --output docs/fspiop-rest-v1.1-openapi3-snippets.yaml --ext yaml fspiop/v1_1/openapi3/openapi.yaml && swagger-cli validate docs/fspiop-rest-v1.1-openapi3-snippets.yaml",
18
18
  "build:thirdparty": "openapi bundle --dereferenced --output docs/thirdparty-openapi3-snippets.yaml --ext yaml thirdparty/openapi3/openapi.yaml && swagger-cli validate docs/thirdparty-openapi3-snippets.yaml",
19
+ "build:thirdparty-dfsp": "swagger-cli bundle -o ./thirdparty/openapi3/thirdparty-dfsp-api.yaml -t yaml ./thirdparty/openapi3/thirdparty-dfsp-api.template.yaml",
20
+ "build:thirdparty-pisp": "swagger-cli bundle -o ./thirdparty/openapi3/thirdparty-pisp-api.yaml -t yaml ./thirdparty/openapi3/thirdparty-pisp-api.template.yaml",
19
21
  "lint": "eslint ./src/**/*.ts *.js",
20
22
  "prepare": "npm run build",
21
23
  "release": "standard-version --releaseCommitMessageFormat 'chore(release): {{currentTag}} [skip ci]'",
@@ -78,7 +80,7 @@
78
80
  "eslint-plugin-standard": "^5.0.0",
79
81
  "husky": "^4.3.6",
80
82
  "jest": "^26.5.3",
81
- "jest-junit": "12.0.0",
83
+ "jest-junit": "^12.0.0",
82
84
  "lint-staged": "^10.5.3",
83
85
  "npm-audit-resolver": "2.2.0",
84
86
  "standard-version": "^9.3.1",
@@ -1,13 +1,13 @@
1
1
  import { Schemas } from '../../lib/thirdparty'
2
2
 
3
3
  describe('thirdparty', () => {
4
- const accountId: Schemas.AccountId = 'account-id'
4
+ const accountAddress: Schemas.AccountAddress = 'account-id'
5
5
  const authenticationTypeQRCODE: Schemas.AuthenticationType = 'QRCODE'
6
6
  const currency: Schemas.Currency = 'USD'
7
7
  const name: Schemas.Name = 'name'
8
8
  const account: Schemas.Account = {
9
9
  accountNickname: name,
10
- id: accountId,
10
+ address: accountAddress,
11
11
  currency
12
12
  }
13
13
  const authorizationChannelTypeU2F: Schemas.AuthorizationChannelType = 'U2F'
@@ -57,15 +57,16 @@ describe('thirdparty', () => {
57
57
  const consentRequestChannelType: Schemas.ConsentRequestChannelType = 'WEB'
58
58
  const consentRequestChannelTypeWeb: Schemas.ConsentRequestChannelTypeWeb = 'WEB'
59
59
  const consentRequestChannelTypeOTP: Schemas.ConsentRequestChannelTypeOTP = 'OTP'
60
- const consentScopeTypeGetBalance: Schemas.ConsentScopeType = 'accounts.getBalance'
61
- const consentScopeTypeTransfer: Schemas.ConsentScopeType = 'accounts.transfer'
60
+ const scopeActionGetBalance: Schemas.ScopeAction = 'ACCOUNTS_GET_BALANCE'
61
+ const scopeActionTransfer: Schemas.ScopeAction = 'ACCOUNTS_TRANSFER'
62
+ const scopeActionStatement: Schemas.ScopeAction = 'ACCOUNTS_STATEMENT'
62
63
  const scope: Schemas.Scope = {
63
- accountId: accountId,
64
- actions: [consentScopeTypeGetBalance, consentScopeTypeTransfer]
64
+ address: accountAddress,
65
+ actions: [scopeActionGetBalance, scopeActionTransfer]
65
66
  }
66
67
  const credentialTypeFIDO: Schemas.CredentialType = 'FIDO'
67
- const consentStatusTypeREVOKED: Schemas.ConsentStatusTypeRevoked = 'REVOKED'
68
- const consentStatusTypeVERIFIED: Schemas.ConsentStatusTypeVerified = 'VERIFIED'
68
+ const consentStatusRevoked: Schemas.ConsentStatusRevoked = 'REVOKED'
69
+ const consentStatusIssued: Schemas.ConsentStatusIssued = 'ISSUED'
69
70
  const fspId: Schemas.FspId = 'fsp-id'
70
71
  const firstName: Schemas.FirstName = 'John'
71
72
  const lastName: Schemas.LastName = 'Doe'
@@ -117,7 +118,7 @@ describe('thirdparty', () => {
117
118
  const signedCredential: Schemas.SignedCredential = {
118
119
  credentialType: credentialTypeFIDO,
119
120
  status: 'PENDING',
120
- payload: FIDOPublicKeyCredentialAttestation
121
+ fidoPayload: FIDOPublicKeyCredentialAttestation
121
122
  }
122
123
 
123
124
  const verifiedCredential: Schemas.VerifiedCredential = {
@@ -143,12 +144,14 @@ describe('thirdparty', () => {
143
144
 
144
145
  const serviceType: Schemas.ServiceType = 'THIRD_PARTY_DFSP'
145
146
 
147
+ const credentialStatusVerified: Schemas.CredentialStatus = 'VERIFIED'
148
+
146
149
  test('Account', () => {
147
150
  expect(account).toBeDefined()
148
151
  })
149
152
 
150
- test('accountId', () => {
151
- expect(accountId).toBeDefined()
153
+ test('accountAddress', () => {
154
+ expect(accountAddress).toBeDefined()
152
155
  })
153
156
 
154
157
  test('AuthorizationChannelType', () => {
@@ -191,7 +194,6 @@ describe('thirdparty', () => {
191
194
 
192
195
  test('ConsentRequestsIDPutResponseOTP', () => {
193
196
  const consentRequestsIDPutResponseOTP: Schemas.ConsentRequestsIDPutResponseOTP = {
194
- consentRequestId: 'pisp-id',
195
197
  scopes: [scope],
196
198
  authChannels: [consentRequestChannelTypeOTP],
197
199
  callbackUri: 'https://fspiId/callback'
@@ -201,7 +203,6 @@ describe('thirdparty', () => {
201
203
 
202
204
  test('ConsentRequestsIDPutResponseWeb', () => {
203
205
  const consentRequestsIDPutResponseWeb: Schemas.ConsentRequestsIDPutResponseWeb = {
204
- consentRequestId: 'pisp-id',
205
206
  scopes: [scope],
206
207
  authChannels: [consentRequestChannelTypeWeb],
207
208
  callbackUri: 'https://fspiId/callback',
@@ -221,14 +222,15 @@ describe('thirdparty', () => {
221
222
  expect(consentRequestsPostRequest).toBeDefined()
222
223
  })
223
224
 
224
- test('ConsentScopeType', () => {
225
- expect(consentScopeTypeGetBalance).toBeDefined()
226
- expect(consentScopeTypeTransfer).toBeDefined()
225
+ test('ScopeActions', () => {
226
+ expect(scopeActionGetBalance).toBeDefined()
227
+ expect(scopeActionTransfer).toBeDefined()
228
+ expect(scopeActionStatement).toBeDefined()
227
229
  })
228
230
 
229
231
  test('ConsentsIDPatchResponseRevoked', () => {
230
232
  const consentsIDPatchResponse: Schemas.ConsentsIDPatchResponseRevoked = {
231
- status: consentStatusTypeREVOKED,
233
+ status: consentStatusRevoked,
232
234
  revokedAt: dateTime
233
235
  }
234
236
  expect(consentsIDPatchResponse).toBeDefined()
@@ -237,7 +239,7 @@ describe('thirdparty', () => {
237
239
  test('ConsentsIDPatchResponseVerified', () => {
238
240
  const consentsIDPatchResponse: Schemas.ConsentsIDPatchResponseVerified = {
239
241
  credential: {
240
- status: consentStatusTypeVERIFIED
242
+ status: credentialStatusVerified
241
243
  }
242
244
  }
243
245
  expect(consentsIDPatchResponse).toBeDefined()
@@ -263,7 +265,8 @@ describe('thirdparty', () => {
263
265
  const consentsPostRequest: Schemas.ConsentsPostRequestPISP = {
264
266
  consentId: correlationId,
265
267
  consentRequestId: correlationId,
266
- scopes: [scope]
268
+ scopes: [scope],
269
+ status: consentStatusIssued
267
270
  }
268
271
  expect(consentsPostRequest).toBeDefined()
269
272
  })
@@ -272,12 +275,13 @@ describe('thirdparty', () => {
272
275
  const consentsPostRequest: Schemas.ConsentsPostRequestAUTH = {
273
276
  consentId: correlationId,
274
277
  scopes: [scope],
275
- credential: signedCredential
278
+ credential: signedCredential,
279
+ status: consentStatusIssued
276
280
  }
277
281
  expect(consentsPostRequest).toBeDefined()
278
282
  })
279
283
  test('ConsentStatusType', () => {
280
- expect(consentStatusTypeREVOKED).toBeDefined()
284
+ expect(consentStatusRevoked).toBeDefined()
281
285
  })
282
286
 
283
287
  test('CorrelationId', () => {
@@ -466,6 +470,14 @@ describe('thirdparty', () => {
466
470
  expect(FIDOPublicKeyCredentialAssertion).toBeDefined()
467
471
  })
468
472
 
473
+ test('GenericCredential', () => {
474
+ const genericCredential: Schemas.GenericCredential = {
475
+ publicKey: 'some-public-key',
476
+ signature: 'some-signed-challenge'
477
+ }
478
+ expect(genericCredential).toBeDefined()
479
+ })
480
+
469
481
  test('QuotesIDPutResponse', () => {
470
482
  const quotesIDPutResponse: Schemas.QuotesIDPutResponse = {
471
483
  transferAmount: money,
@@ -571,7 +583,7 @@ describe('thirdparty', () => {
571
583
  responseType: 'ACCEPTED',
572
584
  signedPayload: {
573
585
  signedPayloadType: 'FIDO',
574
- value: {
586
+ fidoSignedPayload: {
575
587
  id: '45c-TkfkjQovQeAWmOy-RLBHEJ_e4jYzQYgD8VdbkePgM5d98BaAadadNYrknxgH0jQEON8zBydLgh1EqoC9DA',
576
588
  rawId: '45c+TkfkjQovQeAWmOy+RLBHEJ/e4jYzQYgD8VdbkePgM5d98BaAadadNYrknxgH0jQEON8zBydLgh1EqoC9DA==',
577
589
  response: {
@@ -591,7 +603,7 @@ describe('thirdparty', () => {
591
603
  responseType: 'ACCEPTED',
592
604
  signedPayload: {
593
605
  signedPayloadType: 'GENERIC',
594
- value: 'some signature utf-8 string',
606
+ genericSignedPayload: 'some signature utf-8 string',
595
607
  }
596
608
  }
597
609
  expect(thirdpartyRequestsAuthorizationsIDPutResponseGeneric).toBeDefined()
@@ -640,7 +652,7 @@ describe('thirdparty', () => {
640
652
  challenge: 'some challenge base64 encoded',
641
653
  consentId: '8d34f91d-d078-4077-8263-2c0498dhbjr',
642
654
  signedPayloadType: 'FIDO',
643
- signedPayload: {
655
+ fidoSignedPayload: {
644
656
  id: '45c-TkfkjQovQeAWmOy-RLBHEJ_e4jYzQYgD8VdbkePgM5d98BaAadadNYrknxgH0jQEON8zBydLgh1EqoC9DA',
645
657
  rawId: '45c+TkfkjQovQeAWmOy+RLBHEJ/e4jYzQYgD8VdbkePgM5d98BaAadadNYrknxgH0jQEON8zBydLgh1EqoC9DA==',
646
658
  response: {
@@ -661,7 +673,7 @@ describe('thirdparty', () => {
661
673
  challenge: 'some challenge base64 encoded',
662
674
  consentId: '8d34f91d-d078-4077-8263-2c0498dhbjr',
663
675
  signedPayloadType: 'GENERIC',
664
- signedPayload: 'some signed payload string'
676
+ genericSignedPayload: 'some signed payload string'
665
677
  }
666
678
 
667
679
  expect(thirdPartyRequestsVerificationsPostRequest).toBeDefined()
@@ -4,8 +4,8 @@ description: Data model for the complex type Account.
4
4
  properties:
5
5
  accountNickname:
6
6
  $ref: ./Name.yaml
7
- id:
8
- $ref: ./AccountId.yaml
7
+ address:
8
+ $ref: ./AccountAddress.yaml
9
9
  currency:
10
10
  $ref: ./Currency.yaml
11
11
  required:
@@ -0,0 +1,7 @@
1
+ title: AccountAddress
2
+ type: string
3
+ description: |
4
+ An address which can be used to identify the account.
5
+ pattern: '^([0-9A-Za-z_~\-\.]+[0-9A-Za-z_~\-])$'
6
+ minLength: 1
7
+ maxLength: 1023
@@ -2,7 +2,8 @@ title: AccountsIDPutResponse
2
2
  type: object
3
3
  description: The object sent in a `PUT /accounts/{ID}` request.
4
4
  properties:
5
- accounts:
5
+ accountList:
6
+ description: Information about the accounts that the DFSP associates with the identifier sent by the PISP
6
7
  type: array
7
8
  items:
8
9
  $ref: ./Account.yaml
@@ -3,6 +3,6 @@ type: object
3
3
  description: The object sent in a `PATCH /consentRequests/{ID}` request.
4
4
  properties:
5
5
  authToken:
6
- type: string
6
+ $ref: ./BinaryString.yaml
7
7
  required:
8
8
  - authToken
@@ -5,24 +5,24 @@ description: |
5
5
 
6
6
  Schema used in the request consent phase of the account linking OTP/SMS flow.
7
7
  properties:
8
- consentRequestId:
9
- $ref: ./CorrelationId.yaml
10
8
  scopes:
11
9
  type: array
10
+ minLength: 1
11
+ maxLength: 256
12
12
  items:
13
13
  $ref: ./Scope.yaml
14
14
  authChannels:
15
15
  type: array
16
+ minLength: 1
17
+ maxLength: 1
16
18
  items:
17
19
  $ref: ./ConsentRequestChannelTypeOTP.yaml
20
+ # The callback uri that the user will be redirected to after completing the
21
+ # out of band WEB authentication with the DFSP. Used to allow the DFSP to
22
+ # whitelist the PISP's url ahead of time.
18
23
  callbackUri:
19
- type: string
20
- description: >-
21
- The callback uri that the user will be redirected to after completing the
22
- WEB auth channel.
24
+ $ref: ./Uri.yaml
23
25
  required:
24
- - consentRequestId
25
26
  - scopes
26
27
  - authChannels
27
- - callbackUri
28
28
  additionalProperties: false
@@ -8,28 +8,28 @@ description: |
8
8
  supposed user should be redirected. This URL should be a place where
9
9
  the user can prove their identity (e.g., by logging in).
10
10
  properties:
11
- consentRequestId:
12
- $ref: ./CorrelationId.yaml
13
11
  scopes:
14
12
  type: array
13
+ minLength: 1
14
+ maxLength: 256
15
15
  items:
16
16
  $ref: ./Scope.yaml
17
17
  authChannels:
18
18
  type: array
19
+ minLength: 1
20
+ maxLength: 1
19
21
  items:
20
22
  $ref: ./ConsentRequestChannelTypeWeb.yaml
23
+ # The callback uri that the user will be redirected to after completing the
24
+ # out of band WEB authentication with the DFSP. Used to allow the DFSP to
25
+ # whitelist the PISP's url ahead of time.
21
26
  callbackUri:
22
- type: string
23
- description: >-
24
- The callback uri that the user will be redirected to after completing the
25
- WEB auth channel.
27
+ $ref: ./Uri.yaml
28
+ # The callback uri that the pisp app should redirect to for user to complete their
29
+ # login.
26
30
  authUri:
27
- type: string
28
- description: >-
29
- The callback uri that the pisp app redirects to for user to complete their
30
- login.
31
+ $ref: ./Uri.yaml
31
32
  required:
32
- - consentRequestId
33
33
  - scopes
34
34
  - authChannels
35
35
  - callbackUri
@@ -6,20 +6,27 @@ properties:
6
6
  $ref: ./CorrelationId.yaml
7
7
  userId:
8
8
  type: string
9
- description: ID used to associate request with GET /accounts request.
9
+ description: The identifier used in the **GET /accounts/**_{ID}_. Used by the DFSP to correlate an account lookup to a `consentRequest`
10
+ minLength: 1
11
+ maxLength: 128
10
12
  scopes:
11
13
  type: array
14
+ minLength: 1
15
+ maxLength: 256
12
16
  items:
13
17
  $ref: ./Scope.yaml
14
18
  authChannels:
15
19
  type: array
20
+ minLength: 1
21
+ maxLength: 256
16
22
  items:
17
23
  $ref: ./ConsentRequestChannelType.yaml
24
+ # The callback uri that the user will be redirected to after completing the
25
+ # out of band WEB authentication with the DFSP. Used to allow the DFSP to
26
+ # whitelist the PISP's url ahead of time.
18
27
  callbackUri:
19
- type: string
20
- description: >-
21
- The callback uri that the user will be redirected to after completing the
22
- WEB auth channel.
28
+ $ref: ./Uri.yaml
29
+
23
30
  required:
24
31
  - consentRequestId
25
32
  - userId
@@ -0,0 +1,9 @@
1
+ title: ConsentStatus
2
+ type: string
3
+ enum:
4
+ - ISSUED
5
+ - REVOKED
6
+ description: |-
7
+ Allowed values for the enumeration ConsentStatus
8
+ - ISSUED - The consent has been issued by the DFSP
9
+ - REVOKED - The consent has been revoked
@@ -0,0 +1,7 @@
1
+ title: ConsentStatus
2
+ type: string
3
+ enum:
4
+ - ISSUED
5
+ description: |-
6
+ Allowed values for the enumeration ConsentStatus
7
+ - ISSUED - The consent has been issued by the DFSP
@@ -0,0 +1,7 @@
1
+ title: ConsentStatus
2
+ type: string
3
+ enum:
4
+ - REVOKED
5
+ description: |-
6
+ Allowed values for the enumeration ConsentStatus
7
+ - REVOKED - The consent has been revoked
@@ -7,7 +7,7 @@ description: |
7
7
  type: object
8
8
  properties:
9
9
  status:
10
- $ref: ./ConsentStatusTypeRevoked.yaml
10
+ $ref: ./ConsentStatusRevoked.yaml
11
11
  revokedAt:
12
12
  $ref: ./DateTime.yaml
13
13
  required:
@@ -10,7 +10,7 @@ properties:
10
10
  type: object
11
11
  properties:
12
12
  status:
13
- $ref: ./ConsentStatusTypeVerified.yaml
13
+ $ref: ./CredentialStatusVerified.yaml
14
14
  required:
15
15
  - status
16
16
  required:
@@ -11,6 +11,8 @@ properties:
11
11
  type: array
12
12
  items:
13
13
  $ref: ./Scope.yaml
14
+ status:
15
+ $ref: ./ConsentStatusIssued.yaml
14
16
  credential:
15
17
  $ref: ./SignedCredential.yaml
16
18
  required:
@@ -11,6 +11,8 @@ properties:
11
11
  type: array
12
12
  items:
13
13
  $ref: ./Scope.yaml
14
+ status:
15
+ $ref: ./ConsentStatusIssued.yaml
14
16
  credential:
15
17
  $ref: ./VerifiedCredential.yaml
16
18
  required:
@@ -13,14 +13,19 @@ properties:
13
13
  This field is REQUIRED for POST /consent.
14
14
  creation of this Consent.
15
15
  scopes:
16
+ minLength: 1
17
+ maxLength: 256
16
18
  type: array
17
19
  items:
18
20
  $ref: ./Scope.yaml
19
21
  credential:
20
22
  allOf:
21
23
  - $ref: ./SignedCredential.yaml
24
+ status:
25
+ $ref: ConsentStatus.yaml
22
26
  required:
23
27
  - consentId
24
28
  - scopes
25
- - credential
29
+ - credential
30
+ - status
26
31
  additionalProperties: false
@@ -6,20 +6,24 @@ properties:
6
6
  allOf:
7
7
  - $ref: ./CorrelationId.yaml
8
8
  description: |
9
- Common ID between the PISP and FSP for the Consent object
10
- decided by the DFSP who creates the Consent
11
- This field is REQUIRED for POST /consent.
9
+ Common ID between the PISP and the Payer DFSP for the consent object. The ID
10
+ should be reused for resends of the same consent. A new ID should be generated
11
+ for each new consent.
12
12
  consentRequestId:
13
13
  allOf:
14
14
  - $ref: ./CorrelationId.yaml
15
15
  description: |
16
- The id of the ConsentRequest that was used to initiate the
17
- creation of this Consent.
16
+ The ID given to the original consent request on which this consent is based.
18
17
  scopes:
19
18
  type: array
19
+ minLength: 1
20
+ maxLength: 256
20
21
  items:
21
22
  $ref: ./Scope.yaml
23
+ status:
24
+ $ref: ConsentStatus.yaml
22
25
  required:
23
26
  - consentId
24
- - scopes
25
27
  - consentRequestId
28
+ - scopes
29
+ - status
@@ -0,0 +1,7 @@
1
+ title: CredentialStatus
2
+ type: string
3
+ enum:
4
+ - PENDING
5
+ description: |
6
+ The status of the Credential.
7
+ - "PENDING" - The credential has been created, but has not been verified
@@ -0,0 +1,7 @@
1
+ title: CredentialStatus
2
+ type: string
3
+ enum:
4
+ - VERIFIED
5
+ description: |
6
+ The status of the Credential.
7
+ - "VERIFIED" - The Credential is valid and verified.
@@ -2,6 +2,8 @@ title: CredentialType
2
2
  type: string
3
3
  enum:
4
4
  - FIDO
5
+ - GENERIC
5
6
  description: |
6
7
  The type of the Credential.
7
8
  - "FIDO" - A FIDO public/private keypair
9
+ - "GENERIC" - A Generic public/private keypair
@@ -1,11 +1,12 @@
1
1
  title: FIDOPublicKeyCredentialAttestation
2
2
  type: object
3
3
  description: |
4
- An object sent in a `PUT /consents/{ID}` request.
5
- Based on https://w3c.github.io/webauthn/#iface-pkcredential
6
- and mostly on: https://webauthn.guide/#registration
7
- AuthenticatorAttestationResponse
8
- https://w3c.github.io/webauthn/#dom-authenticatorattestationresponse-attestationobject
4
+ A data model representing a FIDO Attestation result. Derived from
5
+ [`PublicKeyCredential` Interface](https://w3c.github.io/webauthn/#iface-pkcredential).
6
+
7
+ The `PublicKeyCredential` interface represents the below fields with
8
+ a Type of Javascript [ArrayBuffer](https://heycam.github.io/webidl/#idl-ArrayBuffer).
9
+ For this API, we represent ArrayBuffers as base64 encoded utf-8 strings.
9
10
  properties:
10
11
  id:
11
12
  type: string
@@ -48,7 +49,6 @@ properties:
48
49
  - 'public-key'
49
50
  required:
50
51
  - id
51
- - rawId
52
52
  - response
53
53
  - type
54
54
  additionalProperties: false
@@ -0,0 +1,13 @@
1
+ title: GenericCredential
2
+ type: object
3
+ description: |
4
+ A publicKey + signature of a challenge for a generic public/private keypair
5
+ properties:
6
+ publicKey:
7
+ $ref: ./BinaryString.yaml
8
+ signature:
9
+ $ref: ./BinaryString.yaml
10
+ required:
11
+ - publicKey
12
+ - signature
13
+ additionalProperties: false
@@ -1,18 +1,15 @@
1
1
  title: Scope
2
2
  type: object
3
3
  description: Scope + Account Identifier mapping for a Consent.
4
- example: |
5
- {
6
- accountId: "dfsp.username.5678",
7
- actions: [ "accounts.transfer", "accounts.getBalance" ]
8
- }
9
4
  properties:
10
- accountId:
11
- $ref: ./AccountId.yaml
5
+ address:
6
+ $ref: ./AccountAddress.yaml
12
7
  actions:
13
8
  type: array
9
+ minItems: 1
10
+ maxItems: 32
14
11
  items:
15
- $ref: ./ConsentScopeType.yaml
12
+ $ref: ./ScopeAction.yaml
16
13
  required:
17
- - accountId
14
+ - address
18
15
  - actions
@@ -0,0 +1,12 @@
1
+ title: ScopeAction
2
+ type: string
3
+ enum:
4
+ - ACCOUNTS_GET_BALANCE
5
+ - ACCOUNTS_TRANSFER
6
+ - ACCOUNTS_STATEMENT
7
+ description: |
8
+ The permissions allowed on a given account by a DFSP as defined in
9
+ a consent object
10
+ - ACCOUNTS_GET_BALANCE: PISP can request a balance for the linked account
11
+ - ACCOUNTS_TRANSFER: PISP can request a transfer of funds from the linked account in the DFSP
12
+ - ACCOUNTS_STATEMENT: PISP can request a statement of individual transactions on a user’s account
@@ -4,6 +4,8 @@ description: The object sent in a `PUT /services/{ServiceType}` request.
4
4
  properties:
5
5
  providers:
6
6
  type: array
7
+ minLength: 0
8
+ maxLength: 256
7
9
  items:
8
10
  $ref: ./FspId.yaml
9
11
  required:
@@ -10,15 +10,14 @@ description: |
10
10
  properties:
11
11
  credentialType:
12
12
  $ref: ./CredentialType.yaml
13
+ # The challenge has signed but not yet verified.
13
14
  status:
14
- type: string
15
- enum:
16
- - PENDING
17
- description: The challenge has signed but not yet verified.
18
- payload:
15
+ $ref: ./CredentialStatusPending.yaml
16
+ genericPayload:
17
+ $ref: ./GenericCredential.yaml
18
+ fidoPayload:
19
19
  $ref: ./FIDOPublicKeyCredentialAttestation.yaml
20
20
  required:
21
21
  - credentialType
22
22
  - status
23
- - payload
24
23
  additionalProperties: false
@@ -9,11 +9,11 @@ properties:
9
9
  properties:
10
10
  signedPayloadType:
11
11
  $ref: ./SignedPayloadTypeFIDO.yaml
12
- value:
12
+ fidoSignedPayload:
13
13
  $ref: ./FIDOPublicKeyCredentialAssertion.yaml
14
14
  required:
15
15
  - signedPayloadType
16
- - value
16
+ - fidoSignedPayload
17
17
  additionalProperties: false
18
18
  required:
19
19
  - responseType
@@ -9,11 +9,11 @@ properties:
9
9
  properties:
10
10
  signedPayloadType:
11
11
  $ref: ./SignedPayloadTypeGeneric.yaml
12
- value:
12
+ genericSignedPayload:
13
13
  $ref: ./BinaryString.yaml
14
14
  required:
15
15
  - signedPayloadType
16
- - value
16
+ - genericSignedPayload
17
17
  additionalProperties: false
18
18
  required:
19
19
  - responseType