@cauthyhq/spec 0.0.0 → 0.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/index.d.ts ADDED
@@ -0,0 +1,24 @@
1
+ // The types of Cauthy's public API (openapi/cauthy.yaml) and of the auth-bff
2
+ // protocol (openapi/auth-bff.yaml), generated by openapi-typescript into
3
+ // cauthy.d.ts and auth-bff.d.ts. Types only: import them with `import type`.
4
+ import type { components as CauthyComponents, operations as CauthyOperations, paths as CauthyPaths } from './cauthy.js'
5
+ import type { components as AuthBffComponents, paths as AuthBffPaths } from './auth-bff.js'
6
+
7
+ export type { AuthBffComponents, AuthBffPaths, CauthyComponents, CauthyOperations, CauthyPaths }
8
+
9
+ /** A schema of Cauthy's public API by name: `CauthySchema<'OAuthUserInfo'>`. */
10
+ export type CauthySchema<Name extends keyof CauthyComponents['schemas']> = CauthyComponents['schemas'][Name]
11
+
12
+ /** `{"data": T}`: how Cauthy answers with one resource. */
13
+ export interface CauthyData<T> {
14
+ data: T
15
+ }
16
+
17
+ /** `{"data": T[], "total_count": n}`: how Cauthy answers with a list. */
18
+ export interface CauthyList<T> {
19
+ data: T[]
20
+ total_count: number
21
+ }
22
+
23
+ /** The auth-bff protocol version these types describe (cauthy-sdk-spec's VERSION). */
24
+ export type ProtocolVersion = 1
package/package.json CHANGED
@@ -1,8 +1,46 @@
1
1
  {
2
2
  "name": "@cauthyhq/spec",
3
- "version": "0.0.0",
4
- "description": "Reserved for Cauthy. The real package is coming; see https://github.com/vennet-developers.",
3
+ "version": "0.2.0",
4
+ "description": "TypeScript types of Cauthy's public API and of the auth-bff protocol, generated from cauthy-sdk-spec.",
5
5
  "license": "Apache-2.0",
6
- "repository": { "type": "git", "url": "https://github.com/vennet-developers/cauthy-sdk-spec" },
7
- "files": ["README.md"]
6
+ "author": "Vennet Developers",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/vennet-developers/cauthy-sdk-spec.git",
10
+ "directory": "packages/spec"
11
+ },
12
+ "homepage": "https://github.com/vennet-developers/cauthy-sdk-spec/tree/main/packages/spec#readme",
13
+ "bugs": "https://github.com/vennet-developers/cauthy-sdk-spec/issues",
14
+ "cauthy": {
15
+ "protocol": 1
16
+ },
17
+ "types": "./index.d.ts",
18
+ "exports": {
19
+ ".": {
20
+ "types": "./index.d.ts"
21
+ },
22
+ "./package.json": "./package.json"
23
+ },
24
+ "files": [
25
+ "index.d.ts",
26
+ "cauthy.d.ts",
27
+ "auth-bff.d.ts",
28
+ "README.md",
29
+ "LICENSE",
30
+ "NOTICE"
31
+ ],
32
+ "sideEffects": false,
33
+ "scripts": {
34
+ "generate": "openapi-typescript ../../openapi/cauthy.yaml -o cauthy.d.ts && openapi-typescript ../../openapi/auth-bff.yaml -o auth-bff.d.ts",
35
+ "typecheck": "tsc -p tsconfig.json",
36
+ "prepack": "cp ../../LICENSE ../../NOTICE ."
37
+ },
38
+ "publishConfig": {
39
+ "access": "public",
40
+ "provenance": true
41
+ },
42
+ "devDependencies": {
43
+ "openapi-typescript": "7.13.0",
44
+ "typescript": "5.9.3"
45
+ }
8
46
  }