whio-api-sdk 1.0.188-bet-staging → 1.0.189-bet-staging

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.
@@ -174,4 +174,24 @@ export declare class ApiSDK {
174
174
  logError(message: string, context?: string, action?: string, data?: any): Promise<Log>;
175
175
  logWarn(message: string, context?: string, action?: string, data?: any): Promise<Log>;
176
176
  logDebug(message: string, context?: string, action?: string, data?: any): Promise<Log>;
177
+ /**
178
+ * Get logs by role
179
+ */
180
+ getLogsByRole(role: string, limit?: number, offset?: number): Promise<LogsResponse>;
181
+ /**
182
+ * Get logs by organization role
183
+ */
184
+ getLogsByOrganizationRole(organizationRole: string, limit?: number, offset?: number): Promise<LogsResponse>;
185
+ /**
186
+ * Get logs by team role
187
+ */
188
+ getLogsByTeamRole(teamRole: string, limit?: number, offset?: number): Promise<LogsResponse>;
189
+ /**
190
+ * Get available roles for filtering
191
+ */
192
+ getAvailableRoles(): Promise<{
193
+ roles: string[];
194
+ organizationRoles: string[];
195
+ teamRoles: string[];
196
+ }>;
177
197
  }
@@ -1106,4 +1106,57 @@ export class ApiSDK {
1106
1106
  });
1107
1107
  });
1108
1108
  }
1109
+ /**
1110
+ * Get logs by role
1111
+ */
1112
+ getLogsByRole(role, limit, offset) {
1113
+ return __awaiter(this, void 0, void 0, function* () {
1114
+ const params = new URLSearchParams();
1115
+ if (limit !== undefined)
1116
+ params.append('limit', limit.toString());
1117
+ if (offset !== undefined)
1118
+ params.append('offset', offset.toString());
1119
+ const queryString = params.toString();
1120
+ const url = queryString ? `${urls.logs}/role/${role}?${queryString}` : `${urls.logs}/role/${role}`;
1121
+ return this.request(url, 'GET');
1122
+ });
1123
+ }
1124
+ /**
1125
+ * Get logs by organization role
1126
+ */
1127
+ getLogsByOrganizationRole(organizationRole, limit, offset) {
1128
+ return __awaiter(this, void 0, void 0, function* () {
1129
+ const params = new URLSearchParams();
1130
+ if (limit !== undefined)
1131
+ params.append('limit', limit.toString());
1132
+ if (offset !== undefined)
1133
+ params.append('offset', offset.toString());
1134
+ const queryString = params.toString();
1135
+ const url = queryString ? `${urls.logs}/organization-role/${organizationRole}?${queryString}` : `${urls.logs}/organization-role/${organizationRole}`;
1136
+ return this.request(url, 'GET');
1137
+ });
1138
+ }
1139
+ /**
1140
+ * Get logs by team role
1141
+ */
1142
+ getLogsByTeamRole(teamRole, limit, offset) {
1143
+ return __awaiter(this, void 0, void 0, function* () {
1144
+ const params = new URLSearchParams();
1145
+ if (limit !== undefined)
1146
+ params.append('limit', limit.toString());
1147
+ if (offset !== undefined)
1148
+ params.append('offset', offset.toString());
1149
+ const queryString = params.toString();
1150
+ const url = queryString ? `${urls.logs}/team-role/${teamRole}?${queryString}` : `${urls.logs}/team-role/${teamRole}`;
1151
+ return this.request(url, 'GET');
1152
+ });
1153
+ }
1154
+ /**
1155
+ * Get available roles for filtering
1156
+ */
1157
+ getAvailableRoles() {
1158
+ return __awaiter(this, void 0, void 0, function* () {
1159
+ return this.request(`${urls.logs}/available-roles`, 'GET');
1160
+ });
1161
+ }
1109
1162
  }
@@ -477,6 +477,9 @@ export interface FilterLogsDto {
477
477
  userId?: string;
478
478
  organizationId?: string;
479
479
  level?: 'error' | 'warn' | 'info' | 'debug' | 'verbose';
480
+ role?: string;
481
+ organizationRole?: string;
482
+ teamRole?: string;
480
483
  startDate?: string;
481
484
  endDate?: string;
482
485
  limit?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whio-api-sdk",
3
- "version": "1.0.188-bet-staging",
3
+ "version": "1.0.189-bet-staging",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
package/src/sdk/sdk.ts CHANGED
@@ -1168,4 +1168,61 @@ export class ApiSDK {
1168
1168
  });
1169
1169
  }
1170
1170
 
1171
+ /**
1172
+ * Get logs by role
1173
+ */
1174
+ public async getLogsByRole(role: string, limit?: number, offset?: number): Promise<LogsResponse> {
1175
+ const params = new URLSearchParams();
1176
+ if (limit !== undefined) params.append('limit', limit.toString());
1177
+ if (offset !== undefined) params.append('offset', offset.toString());
1178
+
1179
+ const queryString = params.toString();
1180
+ const url = queryString ? `${urls.logs}/role/${role}?${queryString}` : `${urls.logs}/role/${role}`;
1181
+
1182
+ return this.request<LogsResponse>(url, 'GET');
1183
+ }
1184
+
1185
+ /**
1186
+ * Get logs by organization role
1187
+ */
1188
+ public async getLogsByOrganizationRole(organizationRole: string, limit?: number, offset?: number): Promise<LogsResponse> {
1189
+ const params = new URLSearchParams();
1190
+ if (limit !== undefined) params.append('limit', limit.toString());
1191
+ if (offset !== undefined) params.append('offset', offset.toString());
1192
+
1193
+ const queryString = params.toString();
1194
+ const url = queryString ? `${urls.logs}/organization-role/${organizationRole}?${queryString}` : `${urls.logs}/organization-role/${organizationRole}`;
1195
+
1196
+ return this.request<LogsResponse>(url, 'GET');
1197
+ }
1198
+
1199
+ /**
1200
+ * Get logs by team role
1201
+ */
1202
+ public async getLogsByTeamRole(teamRole: string, limit?: number, offset?: number): Promise<LogsResponse> {
1203
+ const params = new URLSearchParams();
1204
+ if (limit !== undefined) params.append('limit', limit.toString());
1205
+ if (offset !== undefined) params.append('offset', offset.toString());
1206
+
1207
+ const queryString = params.toString();
1208
+ const url = queryString ? `${urls.logs}/team-role/${teamRole}?${queryString}` : `${urls.logs}/team-role/${teamRole}`;
1209
+
1210
+ return this.request<LogsResponse>(url, 'GET');
1211
+ }
1212
+
1213
+ /**
1214
+ * Get available roles for filtering
1215
+ */
1216
+ public async getAvailableRoles(): Promise<{
1217
+ roles: string[];
1218
+ organizationRoles: string[];
1219
+ teamRoles: string[];
1220
+ }> {
1221
+ return this.request<{
1222
+ roles: string[];
1223
+ organizationRoles: string[];
1224
+ teamRoles: string[];
1225
+ }>(`${urls.logs}/available-roles`, 'GET');
1226
+ }
1227
+
1171
1228
  }
package/src/sdk/types.ts CHANGED
@@ -606,6 +606,9 @@ export interface FilterLogsDto {
606
606
  userId?: string;
607
607
  organizationId?: string;
608
608
  level?: 'error' | 'warn' | 'info' | 'debug' | 'verbose';
609
+ role?: string;
610
+ organizationRole?: string;
611
+ teamRole?: string;
609
612
  startDate?: string;
610
613
  endDate?: string;
611
614
  limit?: number;