@growsober/types 1.0.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/README.md +116 -0
- package/dist/generated.d.ts +9964 -0
- package/dist/generated.js +7 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +30 -0
- package/package.json +47 -0
- package/src/generated.ts +9965 -0
- package/src/index.ts +41 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GrowSober API Types
|
|
3
|
+
*
|
|
4
|
+
* This file exports all auto-generated types from the GrowSober API.
|
|
5
|
+
* Types are generated from the OpenAPI specification using openapi-typescript.
|
|
6
|
+
*
|
|
7
|
+
* To regenerate types:
|
|
8
|
+
* 1. Start the API: cd ../growsober-api && npm run start:dev
|
|
9
|
+
* 2. Generate types: npm run generate
|
|
10
|
+
* 3. Build: npm run build
|
|
11
|
+
*/
|
|
12
|
+
export * from './generated';
|
|
13
|
+
export type ApiResponse<T> = {
|
|
14
|
+
data: T;
|
|
15
|
+
message?: string;
|
|
16
|
+
statusCode: number;
|
|
17
|
+
};
|
|
18
|
+
export type PaginatedResponse<T> = {
|
|
19
|
+
data: T[];
|
|
20
|
+
meta: {
|
|
21
|
+
total: number;
|
|
22
|
+
page: number;
|
|
23
|
+
limit: number;
|
|
24
|
+
totalPages: number;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export type DrinkingIdentity = 'alcohol_free' | 'sober_curious' | 'occasional';
|
|
28
|
+
export interface GrowSoberUserFields {
|
|
29
|
+
drinkingIdentity: DrinkingIdentity;
|
|
30
|
+
sobrietyDate?: string;
|
|
31
|
+
openToMeet: boolean;
|
|
32
|
+
lookingFor?: string;
|
|
33
|
+
}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* GrowSober API Types
|
|
4
|
+
*
|
|
5
|
+
* This file exports all auto-generated types from the GrowSober API.
|
|
6
|
+
* Types are generated from the OpenAPI specification using openapi-typescript.
|
|
7
|
+
*
|
|
8
|
+
* To regenerate types:
|
|
9
|
+
* 1. Start the API: cd ../growsober-api && npm run start:dev
|
|
10
|
+
* 2. Generate types: npm run generate
|
|
11
|
+
* 3. Build: npm run build
|
|
12
|
+
*/
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
25
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
// Re-export generated types (will be created by `npm run generate`)
|
|
29
|
+
__exportStar(require("./generated"), exports);
|
|
30
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7O0dBVUc7Ozs7Ozs7Ozs7Ozs7Ozs7QUFFSCxvRUFBb0U7QUFDcEUsOENBQTRCIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHcm93U29iZXIgQVBJIFR5cGVzXG4gKlxuICogVGh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hc2lvbmFsJztcblxuZXhwb3J0IGludGVyZmFjZSBHcm93U29iZXJVc2VyRmllbGRzIHtcbiAgZHJpbmtpbmdJZGVudGl0eTogRHJpbmtpbmdJZGVudGl0eTtcbiAgc29icmlldHlEYXRlPzogc3RyaW5nO1xuICBvcGVuVG9NZWV0OiBib29sZWFuO1xuICBsb29raW5nRm9yPzogc3RyaW5nO1xufVxuIl19
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@growsober/types",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Auto-generated TypeScript types from the GrowSober API OpenAPI specification",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.js",
|
|
7
|
+
"source": "src/index.ts",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"require": "./dist/index.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"src"
|
|
19
|
+
],
|
|
20
|
+
"publishConfig": {
|
|
21
|
+
"access": "public"
|
|
22
|
+
},
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "https://github.com/souldevsoul/growsober-types.git"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"generate": "openapi-typescript http://localhost:3001/api/docs-json -o src/generated.ts",
|
|
29
|
+
"generate:prod": "openapi-typescript https://api.growsober.app/api/docs-json -o src/generated.ts",
|
|
30
|
+
"build": "tsc",
|
|
31
|
+
"type-check": "tsc --noEmit",
|
|
32
|
+
"prepublishOnly": "npm run build"
|
|
33
|
+
},
|
|
34
|
+
"keywords": [
|
|
35
|
+
"growsober",
|
|
36
|
+
"api",
|
|
37
|
+
"types",
|
|
38
|
+
"typescript",
|
|
39
|
+
"openapi"
|
|
40
|
+
],
|
|
41
|
+
"author": "SoulToSoul",
|
|
42
|
+
"license": "MIT",
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"openapi-typescript": "^7.4.3",
|
|
45
|
+
"typescript": "^5.7.0"
|
|
46
|
+
}
|
|
47
|
+
}
|