@koraidv/core 1.7.2 → 1.7.4
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/dist/index.d.mts +16 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +18 -2
- package/dist/index.mjs +18 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -605,6 +605,22 @@ declare class ApiClient {
|
|
|
605
605
|
submitLivenessChallenge(verificationId: string, challenge: LivenessChallenge, imageData: Blob): Promise<LivenessChallengeResponse>;
|
|
606
606
|
/**
|
|
607
607
|
* Check document quality before uploading.
|
|
608
|
+
*
|
|
609
|
+
* Outlier endpoint: backend's `CheckDocumentQualityRequest` is the
|
|
610
|
+
* one struct in identity-service still using snake_case JSON tags
|
|
611
|
+
* (`document_front_base64`, `document_type`). Every other request
|
|
612
|
+
* body on this client is camelCase. The v1.7.1 wire-format pass
|
|
613
|
+
* blanket-converted this one too and broke it with a 400 from
|
|
614
|
+
* gin's `binding:"required"` validator — fixed in v1.7.3 by
|
|
615
|
+
* sending snake_case for just this one endpoint. The response
|
|
616
|
+
* decoder still goes through transformResponse() which converts
|
|
617
|
+
* snake_case → camelCase, so DocumentQualityResponse on the SDK
|
|
618
|
+
* surface is unchanged.
|
|
619
|
+
*
|
|
620
|
+
* If the backend is ever unified onto camelCase, this can revert
|
|
621
|
+
* to the standard camelCase body — but Android currently sends
|
|
622
|
+
* snake_case via @SerializedName, so any backend change there
|
|
623
|
+
* needs an Android coordination first.
|
|
608
624
|
*/
|
|
609
625
|
checkDocumentQuality(imageData: Blob, documentType: string): Promise<DocumentQualityResponse>;
|
|
610
626
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -605,6 +605,22 @@ declare class ApiClient {
|
|
|
605
605
|
submitLivenessChallenge(verificationId: string, challenge: LivenessChallenge, imageData: Blob): Promise<LivenessChallengeResponse>;
|
|
606
606
|
/**
|
|
607
607
|
* Check document quality before uploading.
|
|
608
|
+
*
|
|
609
|
+
* Outlier endpoint: backend's `CheckDocumentQualityRequest` is the
|
|
610
|
+
* one struct in identity-service still using snake_case JSON tags
|
|
611
|
+
* (`document_front_base64`, `document_type`). Every other request
|
|
612
|
+
* body on this client is camelCase. The v1.7.1 wire-format pass
|
|
613
|
+
* blanket-converted this one too and broke it with a 400 from
|
|
614
|
+
* gin's `binding:"required"` validator — fixed in v1.7.3 by
|
|
615
|
+
* sending snake_case for just this one endpoint. The response
|
|
616
|
+
* decoder still goes through transformResponse() which converts
|
|
617
|
+
* snake_case → camelCase, so DocumentQualityResponse on the SDK
|
|
618
|
+
* surface is unchanged.
|
|
619
|
+
*
|
|
620
|
+
* If the backend is ever unified onto camelCase, this can revert
|
|
621
|
+
* to the standard camelCase body — but Android currently sends
|
|
622
|
+
* snake_case via @SerializedName, so any backend change there
|
|
623
|
+
* needs an Android coordination first.
|
|
608
624
|
*/
|
|
609
625
|
checkDocumentQuality(imageData: Blob, documentType: string): Promise<DocumentQualityResponse>;
|
|
610
626
|
/**
|
package/dist/index.js
CHANGED
|
@@ -692,14 +692,30 @@ var ApiClient = class {
|
|
|
692
692
|
}
|
|
693
693
|
/**
|
|
694
694
|
* Check document quality before uploading.
|
|
695
|
+
*
|
|
696
|
+
* Outlier endpoint: backend's `CheckDocumentQualityRequest` is the
|
|
697
|
+
* one struct in identity-service still using snake_case JSON tags
|
|
698
|
+
* (`document_front_base64`, `document_type`). Every other request
|
|
699
|
+
* body on this client is camelCase. The v1.7.1 wire-format pass
|
|
700
|
+
* blanket-converted this one too and broke it with a 400 from
|
|
701
|
+
* gin's `binding:"required"` validator — fixed in v1.7.3 by
|
|
702
|
+
* sending snake_case for just this one endpoint. The response
|
|
703
|
+
* decoder still goes through transformResponse() which converts
|
|
704
|
+
* snake_case → camelCase, so DocumentQualityResponse on the SDK
|
|
705
|
+
* surface is unchanged.
|
|
706
|
+
*
|
|
707
|
+
* If the backend is ever unified onto camelCase, this can revert
|
|
708
|
+
* to the standard camelCase body — but Android currently sends
|
|
709
|
+
* snake_case via @SerializedName, so any backend change there
|
|
710
|
+
* needs an Android coordination first.
|
|
695
711
|
*/
|
|
696
712
|
async checkDocumentQuality(imageData, documentType) {
|
|
697
713
|
const documentFrontBase64 = await blobToBase64(imageData);
|
|
698
714
|
return this.request("/kyc/document-quality", {
|
|
699
715
|
method: "POST",
|
|
700
716
|
body: JSON.stringify({
|
|
701
|
-
documentFrontBase64,
|
|
702
|
-
documentType
|
|
717
|
+
document_front_base64: documentFrontBase64,
|
|
718
|
+
document_type: documentType
|
|
703
719
|
})
|
|
704
720
|
});
|
|
705
721
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -648,14 +648,30 @@ var ApiClient = class {
|
|
|
648
648
|
}
|
|
649
649
|
/**
|
|
650
650
|
* Check document quality before uploading.
|
|
651
|
+
*
|
|
652
|
+
* Outlier endpoint: backend's `CheckDocumentQualityRequest` is the
|
|
653
|
+
* one struct in identity-service still using snake_case JSON tags
|
|
654
|
+
* (`document_front_base64`, `document_type`). Every other request
|
|
655
|
+
* body on this client is camelCase. The v1.7.1 wire-format pass
|
|
656
|
+
* blanket-converted this one too and broke it with a 400 from
|
|
657
|
+
* gin's `binding:"required"` validator — fixed in v1.7.3 by
|
|
658
|
+
* sending snake_case for just this one endpoint. The response
|
|
659
|
+
* decoder still goes through transformResponse() which converts
|
|
660
|
+
* snake_case → camelCase, so DocumentQualityResponse on the SDK
|
|
661
|
+
* surface is unchanged.
|
|
662
|
+
*
|
|
663
|
+
* If the backend is ever unified onto camelCase, this can revert
|
|
664
|
+
* to the standard camelCase body — but Android currently sends
|
|
665
|
+
* snake_case via @SerializedName, so any backend change there
|
|
666
|
+
* needs an Android coordination first.
|
|
651
667
|
*/
|
|
652
668
|
async checkDocumentQuality(imageData, documentType) {
|
|
653
669
|
const documentFrontBase64 = await blobToBase64(imageData);
|
|
654
670
|
return this.request("/kyc/document-quality", {
|
|
655
671
|
method: "POST",
|
|
656
672
|
body: JSON.stringify({
|
|
657
|
-
documentFrontBase64,
|
|
658
|
-
documentType
|
|
673
|
+
document_front_base64: documentFrontBase64,
|
|
674
|
+
document_type: documentType
|
|
659
675
|
})
|
|
660
676
|
});
|
|
661
677
|
}
|