@commercengine/pos 0.3.1 → 0.3.3

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.js CHANGED
@@ -441,8 +441,6 @@ function extractUserInfoFromToken(token) {
441
441
  lastName: payload.last_name,
442
442
  storeId: payload.store_id,
443
443
  isLoggedIn: payload.is_logged_in,
444
- customerId: payload.customer_id,
445
- customerGroupId: payload.customer_group_id,
446
444
  roles: payload.roles.map((role) => ({
447
445
  roleId: role.role_id,
448
446
  roleName: role.role_name,
@@ -1123,6 +1121,26 @@ var PosClient = class extends PosAPIClient {
1123
1121
  return this.executeRequest(() => this.client.POST("/pos/auth/refresh-token", { body }));
1124
1122
  }
1125
1123
  /**
1124
+ * Get POS user details
1125
+ * @param pathParams - User ID
1126
+ * @returns Promise with user details
1127
+ * @example
1128
+ * ```typescript
1129
+ * const { data, error } = await pos.getUser({
1130
+ * id: "01H9USER12345ABCDE"
1131
+ * });
1132
+ *
1133
+ * if (error) {
1134
+ * console.error("Failed to get user:", error.message);
1135
+ * } else {
1136
+ * console.log("User:", data.user);
1137
+ * }
1138
+ * ```
1139
+ */
1140
+ async getUser(pathParams) {
1141
+ return this.executeRequest(() => this.client.GET("/pos/users/{id}", { params: { path: pathParams } }));
1142
+ }
1143
+ /**
1126
1144
  * Logout
1127
1145
  * @returns Promise with logout confirmation
1128
1146
  * @example