sdk-sapi-promarketing 0.0.1 → 0.0.3
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/README.md +20 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# sdk-
|
|
1
|
+
# sdk-sapi-promarketing
|
|
2
2
|
|
|
3
3
|
Cliente TypeScript para consumir la API SAPI (skins, jugador, pagos, bonos, etc.). Se publica en npm como paquete dual **CommonJS + ESM** con tipos incluidos.
|
|
4
4
|
|
|
@@ -9,15 +9,25 @@ Cliente TypeScript para consumir la API SAPI (skins, jugador, pagos, bonos, etc.
|
|
|
9
9
|
|
|
10
10
|
## Instalación
|
|
11
11
|
|
|
12
|
+
**Nombre del paquete en npm:** `sdk-sapi-promarketing`
|
|
13
|
+
(No usar `sdk-sapi2`, `sdk-sapi2-promarketing` ni variantes antiguas.)
|
|
14
|
+
|
|
15
|
+
### pnpm (recomendado)
|
|
16
|
+
|
|
12
17
|
```bash
|
|
13
|
-
|
|
18
|
+
pnpm add sdk-sapi-promarketing
|
|
14
19
|
```
|
|
15
20
|
|
|
16
|
-
|
|
21
|
+
### npm
|
|
17
22
|
|
|
18
23
|
```bash
|
|
19
|
-
|
|
20
|
-
|
|
24
|
+
npm install sdk-sapi-promarketing
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### yarn
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
yarn add sdk-sapi-promarketing
|
|
21
31
|
```
|
|
22
32
|
|
|
23
33
|
## Uso rápido
|
|
@@ -27,7 +37,7 @@ La clase principal es **`SdkSAPI`**. Debes construir un objeto **`SdkSapiContext
|
|
|
27
37
|
### ESM (`import`)
|
|
28
38
|
|
|
29
39
|
```typescript
|
|
30
|
-
import { SdkSAPI, type SdkSapiContext } from "sdk-
|
|
40
|
+
import { SdkSAPI, type SdkSapiContext } from "sdk-sapi-promarketing";
|
|
31
41
|
|
|
32
42
|
const context: SdkSapiContext = {
|
|
33
43
|
url: "https://api.ejemplo.com",
|
|
@@ -50,7 +60,7 @@ const client = new SdkSAPI(context);
|
|
|
50
60
|
### CommonJS (`require`)
|
|
51
61
|
|
|
52
62
|
```javascript
|
|
53
|
-
const { SdkSAPI } = require("sdk-
|
|
63
|
+
const { SdkSAPI } = require("sdk-sapi-promarketing");
|
|
54
64
|
|
|
55
65
|
const client = new SdkSAPI({
|
|
56
66
|
url: "https://api.ejemplo.com",
|
|
@@ -66,7 +76,7 @@ const client = new SdkSAPI({
|
|
|
66
76
|
Los tipos de dominio se reexportan desde la raíz del paquete:
|
|
67
77
|
|
|
68
78
|
```typescript
|
|
69
|
-
import type { QueryType, PlayerType } from "sdk-
|
|
79
|
+
import type { QueryType, PlayerType } from "sdk-sapi-promarketing";
|
|
70
80
|
```
|
|
71
81
|
|
|
72
82
|
## Contexto (`SdkSapiContext`)
|
|
@@ -85,6 +95,8 @@ Ajusta valores según el entorno (desarrollo / producción).
|
|
|
85
95
|
|
|
86
96
|
## Desarrollo del paquete (mantenedores)
|
|
87
97
|
|
|
98
|
+
**Publicar en npm:** ver [docs/PUBLISHING.md](./docs/PUBLISHING.md).
|
|
99
|
+
|
|
88
100
|
Clonar el repositorio, instalar dependencias y compilar:
|
|
89
101
|
|
|
90
102
|
```bash
|