meet-my-ride 1.0.0 → 1.0.1
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/dist/client.d.ts +11 -0
- package/dist/client.js +46 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +17 -0
- package/package.json +20 -3
- package/.idea/copilot.data.migration.agent.xml +0 -6
- package/.idea/copilot.data.migration.ask.xml +0 -6
- package/.idea/copilot.data.migration.ask2agent.xml +0 -6
- package/.idea/copilot.data.migration.edit.xml +0 -6
- package/.idea/jsLibraryMappings.xml +0 -6
- package/.idea/meet-my-ride.iml +0 -12
- package/.idea/modules.xml +0 -8
- package/.idea/vcs.xml +0 -6
- package/index.js +0 -3
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare class MeetMyRideClient {
|
|
2
|
+
private baseUrl;
|
|
3
|
+
private apiKey?;
|
|
4
|
+
private http;
|
|
5
|
+
constructor(baseUrl: string, apiKey?: string | undefined);
|
|
6
|
+
getUsers(): Promise<any>;
|
|
7
|
+
getUser(id: string): Promise<any>;
|
|
8
|
+
createUser(user: any): Promise<any>;
|
|
9
|
+
updateUser(id: string, user: any): Promise<any>;
|
|
10
|
+
deleteUser(id: string): Promise<any>;
|
|
11
|
+
}
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.MeetMyRideClient = void 0;
|
|
7
|
+
const axios_1 = __importDefault(require("axios"));
|
|
8
|
+
class MeetMyRideClient {
|
|
9
|
+
constructor(baseUrl, apiKey) {
|
|
10
|
+
this.baseUrl = baseUrl;
|
|
11
|
+
this.apiKey = apiKey;
|
|
12
|
+
this.http = axios_1.default.create({
|
|
13
|
+
baseURL: baseUrl,
|
|
14
|
+
headers: {
|
|
15
|
+
"Content-Type": "application/json",
|
|
16
|
+
...(apiKey ? { "Authorization": `Bearer ${apiKey}` } : {})
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
/* Example GET endpoint */
|
|
21
|
+
async getUsers() {
|
|
22
|
+
const response = await this.http.get("/users");
|
|
23
|
+
return response.data;
|
|
24
|
+
}
|
|
25
|
+
/* Example GET by ID */
|
|
26
|
+
async getUser(id) {
|
|
27
|
+
const response = await this.http.get(`/users/${id}`);
|
|
28
|
+
return response.data;
|
|
29
|
+
}
|
|
30
|
+
/* Example POST */
|
|
31
|
+
async createUser(user) {
|
|
32
|
+
const response = await this.http.post("/users", user);
|
|
33
|
+
return response.data;
|
|
34
|
+
}
|
|
35
|
+
/* Example PUT */
|
|
36
|
+
async updateUser(id, user) {
|
|
37
|
+
const response = await this.http.put(`/users/${id}`, user);
|
|
38
|
+
return response.data;
|
|
39
|
+
}
|
|
40
|
+
/* Example DELETE */
|
|
41
|
+
async deleteUser(id) {
|
|
42
|
+
const response = await this.http.delete(`/users/${id}`);
|
|
43
|
+
return response.data;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.MeetMyRideClient = MeetMyRideClient;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "meet-my-ride",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Private library for the MeetMyRide applications",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,9 +8,26 @@
|
|
|
8
8
|
},
|
|
9
9
|
"license": "ISC",
|
|
10
10
|
"author": "MightyMitta",
|
|
11
|
-
|
|
12
|
-
"main": "index.js",
|
|
11
|
+
|
|
12
|
+
"main": "dist/index.js",
|
|
13
|
+
"types": "dist/index.d.ts",
|
|
14
|
+
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
|
|
13
19
|
"scripts": {
|
|
20
|
+
"build": "tsc",
|
|
14
21
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"axios": "^1.13.2"
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/node": "^24.10.1",
|
|
30
|
+
"ts-node": "^10.9.2",
|
|
31
|
+
"typescript": "^5.9.3"
|
|
15
32
|
}
|
|
16
33
|
}
|
package/.idea/meet-my-ride.iml
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<module type="WEB_MODULE" version="4">
|
|
3
|
-
<component name="NewModuleRootManager">
|
|
4
|
-
<content url="file://$MODULE_DIR$">
|
|
5
|
-
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
|
6
|
-
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
|
7
|
-
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
|
8
|
-
</content>
|
|
9
|
-
<orderEntry type="inheritedJdk" />
|
|
10
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
|
11
|
-
</component>
|
|
12
|
-
</module>
|
package/.idea/modules.xml
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="ProjectModuleManager">
|
|
4
|
-
<modules>
|
|
5
|
-
<module fileurl="file://$PROJECT_DIR$/.idea/meet-my-ride.iml" filepath="$PROJECT_DIR$/.idea/meet-my-ride.iml" />
|
|
6
|
-
</modules>
|
|
7
|
-
</component>
|
|
8
|
-
</project>
|
package/.idea/vcs.xml
DELETED
package/index.js
DELETED