@commercengine/pos 0.3.1 → 0.3.2
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/index.d.ts +336 -262
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1123,6 +1123,26 @@ var PosClient = class extends PosAPIClient {
|
|
|
1123
1123
|
return this.executeRequest(() => this.client.POST("/pos/auth/refresh-token", { body }));
|
|
1124
1124
|
}
|
|
1125
1125
|
/**
|
|
1126
|
+
* Get POS user details
|
|
1127
|
+
* @param pathParams - User ID
|
|
1128
|
+
* @returns Promise with user details
|
|
1129
|
+
* @example
|
|
1130
|
+
* ```typescript
|
|
1131
|
+
* const { data, error } = await pos.getUser({
|
|
1132
|
+
* id: "01H9USER12345ABCDE"
|
|
1133
|
+
* });
|
|
1134
|
+
*
|
|
1135
|
+
* if (error) {
|
|
1136
|
+
* console.error("Failed to get user:", error.message);
|
|
1137
|
+
* } else {
|
|
1138
|
+
* console.log("User:", data.user);
|
|
1139
|
+
* }
|
|
1140
|
+
* ```
|
|
1141
|
+
*/
|
|
1142
|
+
async getUser(pathParams) {
|
|
1143
|
+
return this.executeRequest(() => this.client.GET("/pos/users/{id}", { params: { path: pathParams } }));
|
|
1144
|
+
}
|
|
1145
|
+
/**
|
|
1126
1146
|
* Logout
|
|
1127
1147
|
* @returns Promise with logout confirmation
|
|
1128
1148
|
* @example
|