@medalsocial/sdk 1.1.7 → 1.2.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medalsocial/sdk",
3
- "version": "1.1.7",
3
+ "version": "1.2.0",
4
4
  "description": "TypeScript SDK for Medal Social API — posts, emails, contacts, deals, and GDPR compliance",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Medal Social / Ali Aljumaili",
@@ -25,6 +25,15 @@
25
25
  "types": "./dist/pilot/index.d.ts",
26
26
  "import": "./dist/pilot/index.mjs",
27
27
  "require": "./dist/pilot/index.js"
28
+ },
29
+ "./openapi.json": {
30
+ "default": "./dist/openapi/medal-social.openapi.json"
31
+ },
32
+ "./openapi.yaml": "./openapi/medal-social.openapi.yaml",
33
+ "./openapi-types": {
34
+ "types": "./dist/src/openapi.generated.d.ts",
35
+ "import": "./dist/src/openapi.generated.mjs",
36
+ "require": "./dist/src/openapi.generated.js"
28
37
  }
29
38
  },
30
39
  "sideEffects": false,
@@ -40,7 +49,8 @@
40
49
  ]
41
50
  },
42
51
  "files": [
43
- "dist"
52
+ "dist",
53
+ "openapi"
44
54
  ],
45
55
  "keywords": [
46
56
  "medal",
@@ -66,6 +76,7 @@
66
76
  "@changesets/cli": "^2.31.0",
67
77
  "@commitlint/cli": "^19.4.0",
68
78
  "@commitlint/config-conventional": "^19.4.0",
79
+ "@redocly/cli": "^2.31.4",
69
80
  "@secretlint/secretlint-rule-preset-recommend": "^9.3.2",
70
81
  "@types/node": "^24.3.2",
71
82
  "@vitest/coverage-v8": "^2.0.5",
@@ -74,6 +85,7 @@
74
85
  "knip": "^5.63.1",
75
86
  "lint-staged": "^16.2.6",
76
87
  "only-allow": "^1.2.1",
88
+ "openapi-typescript": "^7.13.0",
77
89
  "secretlint": "^9.3.2",
78
90
  "tsup": "^8.3.0",
79
91
  "typedoc": "^0.26.6",
@@ -82,7 +94,7 @@
82
94
  },
83
95
  "scripts": {
84
96
  "preinstall": "npx only-allow pnpm",
85
- "build": "tsup src/index.ts pilot/index.ts --dts --format esm,cjs --sourcemap",
97
+ "build": "pnpm openapi:types && tsup src/index.ts src/openapi.generated.ts pilot/index.ts --dts --format esm,cjs --sourcemap && pnpm openapi:bundle",
86
98
  "dev": "tsup src/index.ts --watch",
87
99
  "clean": "rm -rf dist",
88
100
  "test": "vitest run",
@@ -93,6 +105,11 @@
93
105
  "quality": "pnpm lint && pnpm test",
94
106
  "typecheck": "tsc --noEmit",
95
107
  "verify:paths": "node scripts/verify-package-paths.mjs",
108
+ "openapi:lint": "redocly lint openapi/medal-social.openapi.yaml",
109
+ "openapi:types": "openapi-typescript && biome format --write src/openapi.generated.ts",
110
+ "openapi:bundle": "node -e \"require('node:fs').mkdirSync('dist/openapi',{recursive:true})\" && redocly bundle openapi/medal-social.openapi.yaml --output dist/openapi/medal-social.openapi.json",
111
+ "openapi:coverage": "node scripts/assert-openapi-sdk-coverage.mjs",
112
+ "openapi:check": "pnpm openapi:lint && pnpm openapi:types && pnpm openapi:bundle && pnpm openapi:coverage",
96
113
  "version": "changeset version && node -e \"const fs=require('fs');const p=JSON.parse(fs.readFileSync('./package.json','utf8'));const j=JSON.parse(fs.readFileSync('./jsr.json','utf8'));j.version=p.version;fs.writeFileSync('./jsr.json',JSON.stringify(j,null,2)+'\\n')\"",
97
114
  "release": "pnpm build && pnpm verify:paths && changeset publish && pnpm exec jsr publish",
98
115
  "changeset": "changeset",