@rivascva/dt-idl 1.1.48 → 1.1.49

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.
@@ -3,7 +3,7 @@ package responder
3
3
  // Base error struct.
4
4
  //
5
5
  // The struct should match the base "Error" schema in all services.
6
- type Error[T any] struct {
6
+ type Error[T ~string] struct {
7
7
  Status int64 `json:"status"`
8
8
  Code T `json:"code"`
9
9
  Message string `json:"message"`
@@ -8,18 +8,18 @@ import (
8
8
  "github.com/RivasCVA/dt-idl/go/utils/logger"
9
9
  )
10
10
 
11
- type Responder[T any] interface {
11
+ type Responder[T ~string] interface {
12
12
  Write(w http.ResponseWriter, status int, data any)
13
13
  WriteError(w http.ResponseWriter, status int, message string)
14
14
  WriteErrorWithCode(w http.ResponseWriter, status int, code T, message string)
15
15
  }
16
16
 
17
- type StandardResponder[T any] struct {
17
+ type StandardResponder[T ~string] struct {
18
18
  log logger.Logger
19
19
  baseErrorCode T
20
20
  }
21
21
 
22
- func NewStandardResponder[T any](log logger.Logger, baseErrorCode T) *StandardResponder[T] {
22
+ func NewStandardResponder[T ~string](log logger.Logger, baseErrorCode T) *StandardResponder[T] {
23
23
  return &StandardResponder[T]{
24
24
  log: log,
25
25
  baseErrorCode: baseErrorCode,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivascva/dt-idl",
3
- "version": "1.1.48",
3
+ "version": "1.1.49",
4
4
  "description": "Dream Trade - Interface Definition Language",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",