@mojaloop/api-snippets 13.0.4 → 13.0.5

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,4 +1,11 @@
1
1
  # Changelog: [mojaloop/api-snippets](https://github.com/mojaloop/api-snippets)
2
+ ### [13.0.5](https://github.com/mojaloop/api-snippets/compare/v13.0.4...v13.0.5) (2022-02-18)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * fix enumeration for authentication response ([#118](https://github.com/mojaloop/api-snippets/issues/118)) ([29e64f0](https://github.com/mojaloop/api-snippets/commit/29e64f07c3ac217e0676d5dd6e04bf4f13eab4c0))
8
+
2
9
  ### [13.0.4](https://github.com/mojaloop/api-snippets/compare/v13.0.3...v13.0.4) (2021-11-03)
3
10
 
4
11
 
@@ -3027,7 +3027,7 @@ paths:
3027
3027
  - "FIDO" - A FIDO public/private keypair
3028
3028
  - "GENERIC" - A Generic public/private keypair
3029
3029
  status:
3030
- title: CredentialStatus
3030
+ title: CredentialStatusPending
3031
3031
  type: string
3032
3032
  enum: &ref_115
3033
3033
  - PENDING
@@ -3454,7 +3454,7 @@ paths:
3454
3454
  type: object
3455
3455
  properties:
3456
3456
  status:
3457
- title: CredentialStatus
3457
+ title: CredentialStatusVerified
3458
3458
  type: string
3459
3459
  enum: &ref_128
3460
3460
  - VERIFIED
@@ -6639,14 +6639,14 @@ paths:
6639
6639
  application/json:
6640
6640
  schema:
6641
6641
  oneOf:
6642
- - title: ThirdpartyRequestsAuthorizationsIDPutResponseGeneric
6642
+ - title: ThirdpartyRequestsAuthorizationsIDPutResponseRejected
6643
6643
  type: object
6644
6644
  description: >-
6645
6645
  The object sent in the PUT
6646
6646
  /thirdpartyRequests/authorizations/{ID} callback.
6647
6647
  properties: &ref_147
6648
6648
  responseType:
6649
- title: AuthorizationResponseType
6649
+ title: AuthorizationResponseTypeRejected
6650
6650
  description: |
6651
6651
  The customer rejected the terms of the transfer.
6652
6652
  type: string
@@ -7426,7 +7426,7 @@ paths:
7426
7426
  information regarding a previously created or requested authorization.
7427
7427
  The *{ID}*
7428
7428
 
7429
- in the URI should contain the verification request ID
7429
+ in the URI should contain the verification request ID
7430
7430
  parameters:
7431
7431
  - name: Accept
7432
7432
  in: header
@@ -7476,18 +7476,17 @@ paths:
7476
7476
  - sampled
7477
7477
  operationId: PutThirdpartyRequestsVerificationsById
7478
7478
  summary: PutThirdpartyRequestsVerificationsById
7479
- description: >
7479
+ description: >-
7480
7480
  The HTTP request `PUT /thirdpartyRequests/verifications/{ID}` is used by
7481
- the Auth-Service to inform
7482
-
7483
- the DFSP of a successful result in validating the verification of a
7484
- Thirdparty Transaction Request.
7481
+ the Auth-Service to inform the DFSP of a successful result in validating
7482
+ the verification of a Thirdparty Transaction Request.
7485
7483
 
7484
+ If the validation fails, the auth-service will send back `PUT
7485
+ /thirdpartyRequests/verifications/{ID}` with `authenticationResponse:
7486
+ 'REJECTED'`.
7486
7487
 
7487
- If the validation fails, The Auth-Service MUST use `PUT
7488
- /thirdpartyRequests/verifications/{ID}/error`
7489
-
7490
- instead.
7488
+ In unplanned error cases the Auth-Service MUST use `PUT
7489
+ /thirdpartyRequests/verifications/{ID}/error`.
7491
7490
  parameters:
7492
7491
  - name: Content-Length
7493
7492
  in: header
@@ -7511,13 +7510,21 @@ paths:
7511
7510
  description: >-
7512
7511
  The object sent in the PUT
7513
7512
  /thirdpartyRequests/verifications/{ID} request.
7514
- properties: &ref_157
7513
+ properties: &ref_158
7515
7514
  authenticationResponse:
7515
+ title: AuthenticationResponse
7516
7516
  type: string
7517
- enum:
7517
+ enum: &ref_157
7518
7518
  - VERIFIED
7519
- description: The verification passed
7520
- required: &ref_158
7519
+ - REJECTED
7520
+ description: >-
7521
+ Below are the allowed values for the enumeration
7522
+ AuthenticationResponse.
7523
+
7524
+ - VERIFIED - The challenge was correctly signed.
7525
+
7526
+ - REJECTED - The challenge was not correctly signed.
7527
+ required: &ref_159
7521
7528
  - authenticationResponse
7522
7529
  example:
7523
7530
  authenticationResponse: VERIFIED
@@ -8490,7 +8497,7 @@ components:
8490
8497
  - "FIDO" - A FIDO public/private keypair
8491
8498
  - "GENERIC" - A Generic public/private keypair
8492
8499
  CredentialStatusPending:
8493
- title: CredentialStatus
8500
+ title: CredentialStatusPending
8494
8501
  type: string
8495
8502
  enum: *ref_115
8496
8503
  description: |
@@ -8618,7 +8625,7 @@ components:
8618
8625
  required: *ref_127
8619
8626
  additionalProperties: false
8620
8627
  CredentialStatusVerified:
8621
- title: CredentialStatus
8628
+ title: CredentialStatusVerified
8622
8629
  type: string
8623
8630
  enum: *ref_128
8624
8631
  description: |
@@ -8708,13 +8715,13 @@ components:
8708
8715
  required: *ref_145
8709
8716
  additionalProperties: false
8710
8717
  AuthorizationResponseTypeRejected:
8711
- title: AuthorizationResponseType
8718
+ title: AuthorizationResponseTypeRejected
8712
8719
  description: |
8713
8720
  The customer rejected the terms of the transfer.
8714
8721
  type: string
8715
8722
  enum: *ref_146
8716
8723
  ThirdpartyRequestsAuthorizationsIDPutResponseRejected:
8717
- title: ThirdpartyRequestsAuthorizationsIDPutResponseGeneric
8724
+ title: ThirdpartyRequestsAuthorizationsIDPutResponseRejected
8718
8725
  type: object
8719
8726
  description: >-
8720
8727
  The object sent in the PUT /thirdpartyRequests/authorizations/{ID}
@@ -8780,14 +8787,22 @@ components:
8780
8787
  description: The object sent in the POST /thirdpartyRequests/verifications request.
8781
8788
  properties: *ref_155
8782
8789
  required: *ref_156
8790
+ AuthenticationResponse:
8791
+ title: AuthenticationResponse
8792
+ type: string
8793
+ enum: *ref_157
8794
+ description: |-
8795
+ Below are the allowed values for the enumeration AuthenticationResponse.
8796
+ - VERIFIED - The challenge was correctly signed.
8797
+ - REJECTED - The challenge was not correctly signed.
8783
8798
  ThirdpartyRequestsVerificationsIDPutResponse:
8784
8799
  title: ThirdpartyRequestsVerificationsIDPutResponse
8785
8800
  type: object
8786
8801
  description: >-
8787
8802
  The object sent in the PUT /thirdpartyRequests/verifications/{ID}
8788
8803
  request.
8789
- properties: *ref_157
8790
- required: *ref_158
8804
+ properties: *ref_158
8805
+ required: *ref_159
8791
8806
  parameters:
8792
8807
  ID:
8793
8808
  name: ID
@@ -6,6 +6,7 @@ export declare namespace Schemas {
6
6
  type AccountsIDPutResponse = components['schemas']['AccountsIDPutResponse'];
7
7
  type Amount = components['schemas']['Amount'];
8
8
  type AmountType = components['schemas']['AmountType'];
9
+ type AuthenticationResponse = components['schemas']['AuthenticationResponse'];
9
10
  type AuthenticationType = components['schemas']['AuthenticationType'];
10
11
  type AuthorizationChannelType = components['schemas']['AuthorizationChannelType'];
11
12
  type AuthorizationResponseType = components['schemas']['AuthorizationResponseType'];
@@ -16318,11 +16318,9 @@ export interface operations {
16318
16318
  };
16319
16319
  };
16320
16320
  /**
16321
- * The HTTP request `PUT /thirdpartyRequests/verifications/{ID}` is used by the Auth-Service to inform
16322
- * the DFSP of a successful result in validating the verification of a Thirdparty Transaction Request.
16323
- *
16324
- * If the validation fails, The Auth-Service MUST use `PUT /thirdpartyRequests/verifications/{ID}/error`
16325
- * instead.
16321
+ * The HTTP request `PUT /thirdpartyRequests/verifications/{ID}` is used by the Auth-Service to inform the DFSP of a successful result in validating the verification of a Thirdparty Transaction Request.
16322
+ * If the validation fails, the auth-service will send back `PUT /thirdpartyRequests/verifications/{ID}` with `authenticationResponse: 'REJECTED'`.
16323
+ * In unplanned error cases the Auth-Service MUST use `PUT /thirdpartyRequests/verifications/{ID}/error`.
16326
16324
  */
16327
16325
  PutThirdpartyRequestsVerificationsById: {
16328
16326
  parameters: {
@@ -16338,9 +16336,11 @@ export interface operations {
16338
16336
  requestBody: {
16339
16337
  "application/json": {
16340
16338
  /**
16341
- * The verification passed
16339
+ * Below are the allowed values for the enumeration AuthenticationResponse.
16340
+ * - VERIFIED - The challenge was correctly signed.
16341
+ * - REJECTED - The challenge was not correctly signed.
16342
16342
  */
16343
- authenticationResponse: "VERIFIED";
16343
+ authenticationResponse: "VERIFIED" | "REJECTED";
16344
16344
  };
16345
16345
  };
16346
16346
  responses: {
@@ -20450,14 +20450,22 @@ export interface components {
20450
20450
  */
20451
20451
  genericSignedPayload: string;
20452
20452
  };
20453
+ /**
20454
+ * Below are the allowed values for the enumeration AuthenticationResponse.
20455
+ * - VERIFIED - The challenge was correctly signed.
20456
+ * - REJECTED - The challenge was not correctly signed.
20457
+ */
20458
+ AuthenticationResponse: "VERIFIED" | "REJECTED";
20453
20459
  /**
20454
20460
  * The object sent in the PUT /thirdpartyRequests/verifications/{ID} request.
20455
20461
  */
20456
20462
  ThirdpartyRequestsVerificationsIDPutResponse: {
20457
20463
  /**
20458
- * The verification passed
20464
+ * Below are the allowed values for the enumeration AuthenticationResponse.
20465
+ * - VERIFIED - The challenge was correctly signed.
20466
+ * - REJECTED - The challenge was not correctly signed.
20459
20467
  */
20460
- authenticationResponse: "VERIFIED";
20468
+ authenticationResponse: "VERIFIED" | "REJECTED";
20461
20469
  };
20462
20470
  };
20463
20471
  responses: {
package/package.json CHANGED
@@ -1,9 +1,12 @@
1
1
  {
2
2
  "name": "@mojaloop/api-snippets",
3
- "version": "13.0.4",
3
+ "version": "13.0.5",
4
4
  "description": "Mojaloop API specification reusable snippets",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
7
+ "engines": {
8
+ "node": ">=12.0.0"
9
+ },
7
10
  "scripts": {
8
11
  "audit:resolve": "SHELL=sh resolve-audit --production",
9
12
  "audit:check": "SHELL=sh check-audit --production",
@@ -0,0 +1,9 @@
1
+ title: AuthenticationResponse
2
+ type: string
3
+ enum:
4
+ - VERIFIED
5
+ - REJECTED
6
+ description: |-
7
+ Below are the allowed values for the enumeration AuthenticationResponse.
8
+ - VERIFIED - The challenge was correctly signed.
9
+ - REJECTED - The challenge was not correctly signed.
@@ -1,4 +1,4 @@
1
- title: AuthorizationResponseType
1
+ title: AuthorizationResponseTypeRejected
2
2
  description: |
3
3
  The customer rejected the terms of the transfer.
4
4
  type: string
@@ -1,4 +1,4 @@
1
- title: CredentialStatus
1
+ title: CredentialStatusPending
2
2
  type: string
3
3
  enum:
4
4
  - PENDING
@@ -1,4 +1,4 @@
1
- title: CredentialStatus
1
+ title: CredentialStatusVerified
2
2
  type: string
3
3
  enum:
4
4
  - VERIFIED
@@ -12,7 +12,7 @@ properties:
12
12
  $ref: ./CredentialType.yaml
13
13
  # The challenge has signed but not yet verified.
14
14
  status:
15
- $ref: ./CredentialStatusPending.yaml
15
+ $ref: ./CredentialStatusPending.yaml
16
16
  genericPayload:
17
17
  $ref: ./GenericCredential.yaml
18
18
  fidoPayload:
@@ -1,8 +1,8 @@
1
- title: ThirdpartyRequestsAuthorizationsIDPutResponseGeneric
1
+ title: ThirdpartyRequestsAuthorizationsIDPutResponseRejected
2
2
  type: object
3
3
  description: 'The object sent in the PUT /thirdpartyRequests/authorizations/{ID} callback.'
4
4
  properties:
5
- responseType:
6
- $ref: ./AuthorizationResponseTypeRejected.yaml
5
+ responseType:
6
+ $ref: ./AuthorizationResponseTypeRejected.yaml
7
7
  required:
8
8
  - responseType
@@ -3,10 +3,6 @@ type: object
3
3
  description: The object sent in the PUT /thirdpartyRequests/verifications/{ID} request.
4
4
  properties:
5
5
  authenticationResponse:
6
- type: string
7
- enum:
8
- - VERIFIED
9
- description: 'The verification passed'
6
+ $ref: ./AuthenticationResponse.yaml
10
7
  required:
11
8
  - authenticationResponse
12
-
@@ -9,11 +9,13 @@ Amount:
9
9
  AmountType:
10
10
  $ref: ./AmountType.yaml
11
11
  AuthenticationInfo:
12
- $ref: ./AuthenticationInfo.yaml
12
+ $ref: ./AuthenticationInfo.yaml
13
+ AuthenticationResponse:
14
+ $ref: ./AuthenticationResponse.yaml
13
15
  AuthenticationType:
14
16
  $ref: ./AuthenticationType.yaml
15
17
  AuthenticationValue:
16
- $ref: ./AuthenticationValue.yaml
18
+ $ref: ./AuthenticationValue.yaml
17
19
  AuthorizationChannelType:
18
20
  $ref: ./AuthorizationChannelType.yaml
19
21
  AuthorizationResponseType:
@@ -20,7 +20,7 @@ get:
20
20
  description: |
21
21
  The HTTP request `/thirdpartyRequests/verifications/{ID}` is used to get
22
22
  information regarding a previously created or requested authorization. The *{ID}*
23
- in the URI should contain the verification request ID
23
+ in the URI should contain the verification request ID
24
24
  parameters:
25
25
  #Headers
26
26
  - $ref: ../components/parameters/Accept.yaml
@@ -49,12 +49,14 @@ put:
49
49
  - sampled
50
50
  operationId: PutThirdpartyRequestsVerificationsById
51
51
  summary: PutThirdpartyRequestsVerificationsById
52
- description: |
52
+ description: >-
53
53
  The HTTP request `PUT /thirdpartyRequests/verifications/{ID}` is used by the Auth-Service to inform
54
54
  the DFSP of a successful result in validating the verification of a Thirdparty Transaction Request.
55
55
 
56
- If the validation fails, The Auth-Service MUST use `PUT /thirdpartyRequests/verifications/{ID}/error`
57
- instead.
56
+ If the validation fails, the auth-service will send back `PUT /thirdpartyRequests/verifications/{ID}`
57
+ with `authenticationResponse: 'REJECTED'`.
58
+
59
+ In unplanned error cases the Auth-Service MUST use `PUT /thirdpartyRequests/verifications/{ID}/error`.
58
60
  parameters:
59
61
  - $ref: ../components/parameters/Content-Length.yaml
60
62
  requestBody: