@proxima-nexus/sdk-typescript 1.0.0 → 2.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.
Files changed (36) hide show
  1. package/CHANGELOG.md +90 -0
  2. package/dist/api/event-api.d.ts +171 -65
  3. package/dist/api/event-api.js +273 -93
  4. package/dist/api/group-api.d.ts +147 -70
  5. package/dist/api/group-api.js +234 -101
  6. package/dist/api/user-api.d.ts +210 -125
  7. package/dist/api/user-api.js +297 -171
  8. package/dist/models/create-event-dto.d.ts +4 -4
  9. package/dist/models/create-group-dto.d.ts +6 -5
  10. package/dist/models/create-group-dto.js +7 -1
  11. package/dist/models/create-user-dto.d.ts +0 -4
  12. package/dist/models/entity-connection-dto.d.ts +17 -1
  13. package/dist/models/entity-connection-dto.js +14 -1
  14. package/dist/models/event-dto.d.ts +13 -4
  15. package/dist/models/event-entity-connection-dto.d.ts +17 -1
  16. package/dist/models/event-entity-connection-dto.js +14 -1
  17. package/dist/models/group-dto.d.ts +15 -5
  18. package/dist/models/group-dto.js +7 -1
  19. package/dist/models/group-entity-connection-dto.d.ts +17 -1
  20. package/dist/models/group-entity-connection-dto.js +14 -1
  21. package/dist/models/index.d.ts +3 -0
  22. package/dist/models/index.js +3 -0
  23. package/dist/models/mutate-event-entity-connection-dto.d.ts +22 -0
  24. package/dist/models/mutate-event-entity-connection-dto.js +22 -0
  25. package/dist/models/mutate-group-entity-connection-dto.d.ts +22 -0
  26. package/dist/models/mutate-group-entity-connection-dto.js +22 -0
  27. package/dist/models/mutate-user-connection-dto.d.ts +21 -0
  28. package/dist/models/mutate-user-connection-dto.js +21 -0
  29. package/dist/models/update-event-dto.d.ts +4 -4
  30. package/dist/models/update-group-dto.d.ts +6 -5
  31. package/dist/models/update-group-dto.js +7 -1
  32. package/dist/models/update-user-dto.d.ts +0 -4
  33. package/dist/models/user-dto.d.ts +5 -4
  34. package/dist/models/user-entity-connection-dto.d.ts +17 -1
  35. package/dist/models/user-entity-connection-dto.js +14 -1
  36. package/package.json +5 -4
@@ -16,7 +16,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
16
16
  return (mod && mod.__esModule) ? mod : { "default": mod };
17
17
  };
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.UserApi = exports.UserApiFactory = exports.UserApiFp = exports.UserApiAxiosParamCreator = void 0;
19
+ exports.UserControllerGetConnectionsTypeEnum = exports.UserControllerGetConnectionsStateEnum = exports.UserControllerDeleteConnectionTypeEnum = exports.UserApi = exports.UserApiFactory = exports.UserApiFp = exports.UserApiAxiosParamCreator = void 0;
20
20
  const axios_1 = __importDefault(require("axios"));
21
21
  // Some imports not used depending on template conditions
22
22
  // @ts-ignore
@@ -30,68 +30,79 @@ const UserApiAxiosParamCreator = function (configuration) {
30
30
  return {
31
31
  /**
32
32
  *
33
- * @summary Add a friend to a user
34
- * @param {string} userId
35
- * @param {string} friendUserId
33
+ * @summary Create a user
34
+ * @param {CreateUserDto} createUserDto
36
35
  * @param {*} [options] Override http request option.
37
36
  * @throws {RequiredError}
38
37
  */
39
- addFriend: async (userId, friendUserId, options = {}) => {
40
- // verify required parameter 'userId' is not null or undefined
41
- (0, common_1.assertParamExists)('addFriend', 'userId', userId);
42
- // verify required parameter 'friendUserId' is not null or undefined
43
- (0, common_1.assertParamExists)('addFriend', 'friendUserId', friendUserId);
44
- const localVarPath = `/user/{userId}/friends/{friendUserId}`
45
- .replace(`{${"userId"}}`, encodeURIComponent(String(userId)))
46
- .replace(`{${"friendUserId"}}`, encodeURIComponent(String(friendUserId)));
38
+ create: async (createUserDto, options = {}) => {
39
+ // verify required parameter 'createUserDto' is not null or undefined
40
+ (0, common_1.assertParamExists)('create', 'createUserDto', createUserDto);
41
+ const localVarPath = `/user`;
47
42
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
48
43
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
49
44
  let baseOptions;
50
45
  if (configuration) {
51
46
  baseOptions = configuration.baseOptions;
52
47
  }
53
- const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options };
48
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
54
49
  const localVarHeaderParameter = {};
55
50
  const localVarQueryParameter = {};
56
51
  // authentication api_key required
57
52
  await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "X-Proxima-Nexus-Api-Key", configuration);
53
+ localVarHeaderParameter['Content-Type'] = 'application/json';
58
54
  localVarHeaderParameter['Accept'] = 'application/json';
59
55
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
60
56
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
61
57
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
58
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createUserDto, localVarRequestOptions, configuration);
62
59
  return {
63
60
  url: (0, common_1.toPathString)(localVarUrlObj),
64
61
  options: localVarRequestOptions,
65
62
  };
66
63
  },
67
64
  /**
68
- *
69
- * @summary Create a user
70
- * @param {CreateUserDto} createUserDto
65
+ * Remove a friend connection or unblock a user. For BLOCKED connections, only the user who initiated the block can unblock.
66
+ * @summary Delete a connection with another user
67
+ * @param {string} userId
68
+ * @param {string} targetUserId
69
+ * @param {UserControllerDeleteConnectionTypeEnum} type Type of connection to delete
70
+ * @param {string} xProximaNexusRequesterUserId ID of the user deleting the connection
71
71
  * @param {*} [options] Override http request option.
72
72
  * @throws {RequiredError}
73
73
  */
74
- create: async (createUserDto, options = {}) => {
75
- // verify required parameter 'createUserDto' is not null or undefined
76
- (0, common_1.assertParamExists)('create', 'createUserDto', createUserDto);
77
- const localVarPath = `/user`;
74
+ deleteConnection: async (userId, targetUserId, type, xProximaNexusRequesterUserId, options = {}) => {
75
+ // verify required parameter 'userId' is not null or undefined
76
+ (0, common_1.assertParamExists)('deleteConnection', 'userId', userId);
77
+ // verify required parameter 'targetUserId' is not null or undefined
78
+ (0, common_1.assertParamExists)('deleteConnection', 'targetUserId', targetUserId);
79
+ // verify required parameter 'type' is not null or undefined
80
+ (0, common_1.assertParamExists)('deleteConnection', 'type', type);
81
+ // verify required parameter 'xProximaNexusRequesterUserId' is not null or undefined
82
+ (0, common_1.assertParamExists)('deleteConnection', 'xProximaNexusRequesterUserId', xProximaNexusRequesterUserId);
83
+ const localVarPath = `/user/{userId}/connections/{targetUserId}`
84
+ .replace(`{${"userId"}}`, encodeURIComponent(String(userId)))
85
+ .replace(`{${"targetUserId"}}`, encodeURIComponent(String(targetUserId)));
78
86
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
79
87
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
80
88
  let baseOptions;
81
89
  if (configuration) {
82
90
  baseOptions = configuration.baseOptions;
83
91
  }
84
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
92
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options };
85
93
  const localVarHeaderParameter = {};
86
94
  const localVarQueryParameter = {};
87
95
  // authentication api_key required
88
96
  await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "X-Proxima-Nexus-Api-Key", configuration);
89
- localVarHeaderParameter['Content-Type'] = 'application/json';
90
- localVarHeaderParameter['Accept'] = 'application/json';
97
+ if (type !== undefined) {
98
+ localVarQueryParameter['type'] = type;
99
+ }
100
+ if (xProximaNexusRequesterUserId != null) {
101
+ localVarHeaderParameter['X-Proxima-Nexus-Requester-User-Id'] = String(xProximaNexusRequesterUserId);
102
+ }
91
103
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
92
104
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
93
105
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
94
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createUserDto, localVarRequestOptions, configuration);
95
106
  return {
96
107
  url: (0, common_1.toPathString)(localVarUrlObj),
97
108
  options: localVarRequestOptions,
@@ -101,12 +112,13 @@ const UserApiAxiosParamCreator = function (configuration) {
101
112
  *
102
113
  * @summary Get a user by ID
103
114
  * @param {string} userId
115
+ * @param {string} [xProximaNexusRequesterUserId] ID of the user getting a user by ID. If set, 401 may be returned if the user cannot view the user, otherwise requesterConnection will be set on the result.
104
116
  * @param {*} [options] Override http request option.
105
117
  * @throws {RequiredError}
106
118
  */
107
- findOne: async (userId, options = {}) => {
119
+ get: async (userId, xProximaNexusRequesterUserId, options = {}) => {
108
120
  // verify required parameter 'userId' is not null or undefined
109
- (0, common_1.assertParamExists)('findOne', 'userId', userId);
121
+ (0, common_1.assertParamExists)('get', 'userId', userId);
110
122
  const localVarPath = `/user/{userId}`
111
123
  .replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
112
124
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
@@ -121,6 +133,9 @@ const UserApiAxiosParamCreator = function (configuration) {
121
133
  // authentication api_key required
122
134
  await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "X-Proxima-Nexus-Api-Key", configuration);
123
135
  localVarHeaderParameter['Accept'] = 'application/json';
136
+ if (xProximaNexusRequesterUserId != null) {
137
+ localVarHeaderParameter['X-Proxima-Nexus-Requester-User-Id'] = String(xProximaNexusRequesterUserId);
138
+ }
124
139
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
125
140
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
126
141
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
@@ -133,10 +148,11 @@ const UserApiAxiosParamCreator = function (configuration) {
133
148
  *
134
149
  * @summary Get a batch of users by IDs
135
150
  * @param {GetUsersDto} getUsersDto
151
+ * @param {string} [xProximaNexusRequesterUserId] ID of the user getting a batch of users. If set, users will be filtered to only include users that the user can see, and requesterConnection will be set on the results.
136
152
  * @param {*} [options] Override http request option.
137
153
  * @throws {RequiredError}
138
154
  */
139
- getBatch: async (getUsersDto, options = {}) => {
155
+ getBatch: async (getUsersDto, xProximaNexusRequesterUserId, options = {}) => {
140
156
  // verify required parameter 'getUsersDto' is not null or undefined
141
157
  (0, common_1.assertParamExists)('getBatch', 'getUsersDto', getUsersDto);
142
158
  const localVarPath = `/user/batch`;
@@ -153,6 +169,9 @@ const UserApiAxiosParamCreator = function (configuration) {
153
169
  await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "X-Proxima-Nexus-Api-Key", configuration);
154
170
  localVarHeaderParameter['Content-Type'] = 'application/json';
155
171
  localVarHeaderParameter['Accept'] = 'application/json';
172
+ if (xProximaNexusRequesterUserId != null) {
173
+ localVarHeaderParameter['X-Proxima-Nexus-Requester-User-Id'] = String(xProximaNexusRequesterUserId);
174
+ }
156
175
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
157
176
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
158
177
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
@@ -163,16 +182,19 @@ const UserApiAxiosParamCreator = function (configuration) {
163
182
  };
164
183
  },
165
184
  /**
166
- *
167
- * @summary Get events of a user
185
+ * Get user connections with optional type and state filters. Visibility rules apply: HIDDEN/CONNECTIONS users only show connections to self or connected users. Only the user themselves can see BLOCKED connections or non-ACTIVE states.
186
+ * @summary Get connections of a user
168
187
  * @param {string} userId
188
+ * @param {Array<UserControllerGetConnectionsStateEnum>} [state] Filter connections by state. Can be multiple values. Non-self requesters can only see ACTIVE connections.
189
+ * @param {Array<UserControllerGetConnectionsTypeEnum>} [type] Filter connections by type. Can be multiple values.
190
+ * @param {string} [xProximaNexusRequesterUserId] ID of the user viewing connections. Required for non-PUBLIC users. Only the user themselves can view BLOCKED or non-ACTIVE connections.
169
191
  * @param {*} [options] Override http request option.
170
192
  * @throws {RequiredError}
171
193
  */
172
- getEvents: async (userId, options = {}) => {
194
+ getConnections: async (userId, state, type, xProximaNexusRequesterUserId, options = {}) => {
173
195
  // verify required parameter 'userId' is not null or undefined
174
- (0, common_1.assertParamExists)('getEvents', 'userId', userId);
175
- const localVarPath = `/user/{userId}/events`
196
+ (0, common_1.assertParamExists)('getConnections', 'userId', userId);
197
+ const localVarPath = `/user/{userId}/connections`
176
198
  .replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
177
199
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
178
200
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -185,7 +207,16 @@ const UserApiAxiosParamCreator = function (configuration) {
185
207
  const localVarQueryParameter = {};
186
208
  // authentication api_key required
187
209
  await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "X-Proxima-Nexus-Api-Key", configuration);
210
+ if (state) {
211
+ localVarQueryParameter['state'] = state;
212
+ }
213
+ if (type) {
214
+ localVarQueryParameter['type'] = type;
215
+ }
188
216
  localVarHeaderParameter['Accept'] = 'application/json';
217
+ if (xProximaNexusRequesterUserId != null) {
218
+ localVarHeaderParameter['X-Proxima-Nexus-Requester-User-Id'] = String(xProximaNexusRequesterUserId);
219
+ }
189
220
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
190
221
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
191
222
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
@@ -196,15 +227,16 @@ const UserApiAxiosParamCreator = function (configuration) {
196
227
  },
197
228
  /**
198
229
  *
199
- * @summary Get friends of a user
230
+ * @summary Get events of a user
200
231
  * @param {string} userId
232
+ * @param {string} [xProximaNexusRequesterUserId] ID of the user getting events of a user. If set, events will be filtered to only include events that the user can see, and requesterConnection will be set on the results.
201
233
  * @param {*} [options] Override http request option.
202
234
  * @throws {RequiredError}
203
235
  */
204
- getFriends: async (userId, options = {}) => {
236
+ getEvents: async (userId, xProximaNexusRequesterUserId, options = {}) => {
205
237
  // verify required parameter 'userId' is not null or undefined
206
- (0, common_1.assertParamExists)('getFriends', 'userId', userId);
207
- const localVarPath = `/user/{userId}/friends`
238
+ (0, common_1.assertParamExists)('getEvents', 'userId', userId);
239
+ const localVarPath = `/user/{userId}/events`
208
240
  .replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
209
241
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
210
242
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -218,6 +250,9 @@ const UserApiAxiosParamCreator = function (configuration) {
218
250
  // authentication api_key required
219
251
  await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "X-Proxima-Nexus-Api-Key", configuration);
220
252
  localVarHeaderParameter['Accept'] = 'application/json';
253
+ if (xProximaNexusRequesterUserId != null) {
254
+ localVarHeaderParameter['X-Proxima-Nexus-Requester-User-Id'] = String(xProximaNexusRequesterUserId);
255
+ }
221
256
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
222
257
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
223
258
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
@@ -230,10 +265,11 @@ const UserApiAxiosParamCreator = function (configuration) {
230
265
  *
231
266
  * @summary Get groups of a user
232
267
  * @param {string} userId
268
+ * @param {string} [xProximaNexusRequesterUserId] ID of the user getting groups of a user. If set, groups will be filtered to only include groups that the user can see, and requesterConnection will be set on the results.
233
269
  * @param {*} [options] Override http request option.
234
270
  * @throws {RequiredError}
235
271
  */
236
- getGroups: async (userId, options = {}) => {
272
+ getGroups: async (userId, xProximaNexusRequesterUserId, options = {}) => {
237
273
  // verify required parameter 'userId' is not null or undefined
238
274
  (0, common_1.assertParamExists)('getGroups', 'userId', userId);
239
275
  const localVarPath = `/user/{userId}/groups`
@@ -250,6 +286,9 @@ const UserApiAxiosParamCreator = function (configuration) {
250
286
  // authentication api_key required
251
287
  await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "X-Proxima-Nexus-Api-Key", configuration);
252
288
  localVarHeaderParameter['Accept'] = 'application/json';
289
+ if (xProximaNexusRequesterUserId != null) {
290
+ localVarHeaderParameter['X-Proxima-Nexus-Requester-User-Id'] = String(xProximaNexusRequesterUserId);
291
+ }
253
292
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
254
293
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
255
294
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
@@ -259,31 +298,47 @@ const UserApiAxiosParamCreator = function (configuration) {
259
298
  };
260
299
  },
261
300
  /**
262
- *
263
- * @summary Delete a user
301
+ * Create a friend request, accept a pending request, or block a user. For FRIEND type: creates REQUESTED state if no connection exists; target user can accept by setting state to ACTIVE. For BLOCKED type: creates a mutual block.
302
+ * @summary Create or update a connection with another user
264
303
  * @param {string} userId
304
+ * @param {string} targetUserId
305
+ * @param {string} xProximaNexusRequesterUserId ID of the user creating/modifying the connection (must match userId)
306
+ * @param {MutateUserConnectionDto} mutateUserConnectionDto
265
307
  * @param {*} [options] Override http request option.
266
308
  * @throws {RequiredError}
267
309
  */
268
- remove: async (userId, options = {}) => {
310
+ putConnection: async (userId, targetUserId, xProximaNexusRequesterUserId, mutateUserConnectionDto, options = {}) => {
269
311
  // verify required parameter 'userId' is not null or undefined
270
- (0, common_1.assertParamExists)('remove', 'userId', userId);
271
- const localVarPath = `/user/{userId}`
272
- .replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
312
+ (0, common_1.assertParamExists)('putConnection', 'userId', userId);
313
+ // verify required parameter 'targetUserId' is not null or undefined
314
+ (0, common_1.assertParamExists)('putConnection', 'targetUserId', targetUserId);
315
+ // verify required parameter 'xProximaNexusRequesterUserId' is not null or undefined
316
+ (0, common_1.assertParamExists)('putConnection', 'xProximaNexusRequesterUserId', xProximaNexusRequesterUserId);
317
+ // verify required parameter 'mutateUserConnectionDto' is not null or undefined
318
+ (0, common_1.assertParamExists)('putConnection', 'mutateUserConnectionDto', mutateUserConnectionDto);
319
+ const localVarPath = `/user/{userId}/connections/{targetUserId}`
320
+ .replace(`{${"userId"}}`, encodeURIComponent(String(userId)))
321
+ .replace(`{${"targetUserId"}}`, encodeURIComponent(String(targetUserId)));
273
322
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
274
323
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
275
324
  let baseOptions;
276
325
  if (configuration) {
277
326
  baseOptions = configuration.baseOptions;
278
327
  }
279
- const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options };
328
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options };
280
329
  const localVarHeaderParameter = {};
281
330
  const localVarQueryParameter = {};
282
331
  // authentication api_key required
283
332
  await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "X-Proxima-Nexus-Api-Key", configuration);
333
+ localVarHeaderParameter['Content-Type'] = 'application/json';
334
+ localVarHeaderParameter['Accept'] = 'application/json';
335
+ if (xProximaNexusRequesterUserId != null) {
336
+ localVarHeaderParameter['X-Proxima-Nexus-Requester-User-Id'] = String(xProximaNexusRequesterUserId);
337
+ }
284
338
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
285
339
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
286
340
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
341
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(mutateUserConnectionDto, localVarRequestOptions, configuration);
287
342
  return {
288
343
  url: (0, common_1.toPathString)(localVarUrlObj),
289
344
  options: localVarRequestOptions,
@@ -291,20 +346,19 @@ const UserApiAxiosParamCreator = function (configuration) {
291
346
  },
292
347
  /**
293
348
  *
294
- * @summary Remove a friend from a user
349
+ * @summary Delete a user
295
350
  * @param {string} userId
296
- * @param {string} friendUserId
351
+ * @param {string} xProximaNexusRequesterUserId ID of the user deleting the user
297
352
  * @param {*} [options] Override http request option.
298
353
  * @throws {RequiredError}
299
354
  */
300
- removeFriend: async (userId, friendUserId, options = {}) => {
355
+ remove: async (userId, xProximaNexusRequesterUserId, options = {}) => {
301
356
  // verify required parameter 'userId' is not null or undefined
302
- (0, common_1.assertParamExists)('removeFriend', 'userId', userId);
303
- // verify required parameter 'friendUserId' is not null or undefined
304
- (0, common_1.assertParamExists)('removeFriend', 'friendUserId', friendUserId);
305
- const localVarPath = `/user/{userId}/friends/{friendUserId}`
306
- .replace(`{${"userId"}}`, encodeURIComponent(String(userId)))
307
- .replace(`{${"friendUserId"}}`, encodeURIComponent(String(friendUserId)));
357
+ (0, common_1.assertParamExists)('remove', 'userId', userId);
358
+ // verify required parameter 'xProximaNexusRequesterUserId' is not null or undefined
359
+ (0, common_1.assertParamExists)('remove', 'xProximaNexusRequesterUserId', xProximaNexusRequesterUserId);
360
+ const localVarPath = `/user/{userId}`
361
+ .replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
308
362
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
309
363
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
310
364
  let baseOptions;
@@ -316,6 +370,9 @@ const UserApiAxiosParamCreator = function (configuration) {
316
370
  const localVarQueryParameter = {};
317
371
  // authentication api_key required
318
372
  await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "X-Proxima-Nexus-Api-Key", configuration);
373
+ if (xProximaNexusRequesterUserId != null) {
374
+ localVarHeaderParameter['X-Proxima-Nexus-Requester-User-Id'] = String(xProximaNexusRequesterUserId);
375
+ }
319
376
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
320
377
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
321
378
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
@@ -325,7 +382,7 @@ const UserApiAxiosParamCreator = function (configuration) {
325
382
  };
326
383
  },
327
384
  /**
328
- *
385
+ * Search for users. When requesterUserId is provided, HIDDEN users are filtered out unless the requester is connected to them, and users who have blocked the requester are also filtered out. When requesterUserId is not provided, all users are returned without visibility filtering.
329
386
  * @summary Search users
330
387
  * @param {string} [displayName] Display name search (ILIKE)
331
388
  * @param {number} [latitude] Latitude for radius search
@@ -336,10 +393,11 @@ const UserApiAxiosParamCreator = function (configuration) {
336
393
  * @param {number} [minLongitude] Minimum longitude for bounding box
337
394
  * @param {number} [maxLongitude] Maximum longitude for bounding box
338
395
  * @param {number} [limit] Limit results (1-1000)
396
+ * @param {string} [xProximaNexusRequesterUserId] ID of the user searching for users. If set, users will be filtered to only include users that the user can see, and requesterConnection will be set on the results.
339
397
  * @param {*} [options] Override http request option.
340
398
  * @throws {RequiredError}
341
399
  */
342
- search: async (displayName, latitude, longitude, radius, minLatitude, maxLatitude, minLongitude, maxLongitude, limit, options = {}) => {
400
+ search: async (displayName, latitude, longitude, radius, minLatitude, maxLatitude, minLongitude, maxLongitude, limit, xProximaNexusRequesterUserId, options = {}) => {
343
401
  const localVarPath = `/user`;
344
402
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
345
403
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -380,6 +438,9 @@ const UserApiAxiosParamCreator = function (configuration) {
380
438
  localVarQueryParameter['limit'] = limit;
381
439
  }
382
440
  localVarHeaderParameter['Accept'] = 'application/json';
441
+ if (xProximaNexusRequesterUserId != null) {
442
+ localVarHeaderParameter['X-Proxima-Nexus-Requester-User-Id'] = String(xProximaNexusRequesterUserId);
443
+ }
383
444
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
384
445
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
385
446
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
@@ -392,13 +453,16 @@ const UserApiAxiosParamCreator = function (configuration) {
392
453
  *
393
454
  * @summary Update a user
394
455
  * @param {string} userId
456
+ * @param {string} xProximaNexusRequesterUserId ID of the user updating the user
395
457
  * @param {UpdateUserDto} updateUserDto
396
458
  * @param {*} [options] Override http request option.
397
459
  * @throws {RequiredError}
398
460
  */
399
- update: async (userId, updateUserDto, options = {}) => {
461
+ update: async (userId, xProximaNexusRequesterUserId, updateUserDto, options = {}) => {
400
462
  // verify required parameter 'userId' is not null or undefined
401
463
  (0, common_1.assertParamExists)('update', 'userId', userId);
464
+ // verify required parameter 'xProximaNexusRequesterUserId' is not null or undefined
465
+ (0, common_1.assertParamExists)('update', 'xProximaNexusRequesterUserId', xProximaNexusRequesterUserId);
402
466
  // verify required parameter 'updateUserDto' is not null or undefined
403
467
  (0, common_1.assertParamExists)('update', 'updateUserDto', updateUserDto);
404
468
  const localVarPath = `/user/{userId}`
@@ -416,6 +480,9 @@ const UserApiAxiosParamCreator = function (configuration) {
416
480
  await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "X-Proxima-Nexus-Api-Key", configuration);
417
481
  localVarHeaderParameter['Content-Type'] = 'application/json';
418
482
  localVarHeaderParameter['Accept'] = 'application/json';
483
+ if (xProximaNexusRequesterUserId != null) {
484
+ localVarHeaderParameter['X-Proxima-Nexus-Requester-User-Id'] = String(xProximaNexusRequesterUserId);
485
+ }
419
486
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
420
487
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
421
488
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
@@ -436,125 +503,137 @@ const UserApiFp = function (configuration) {
436
503
  return {
437
504
  /**
438
505
  *
439
- * @summary Add a friend to a user
440
- * @param {string} userId
441
- * @param {string} friendUserId
506
+ * @summary Create a user
507
+ * @param {CreateUserDto} createUserDto
442
508
  * @param {*} [options] Override http request option.
443
509
  * @throws {RequiredError}
444
510
  */
445
- async addFriend(userId, friendUserId, options) {
446
- const localVarAxiosArgs = await localVarAxiosParamCreator.addFriend(userId, friendUserId, options);
511
+ async create(createUserDto, options) {
512
+ const localVarAxiosArgs = await localVarAxiosParamCreator.create(createUserDto, options);
447
513
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
448
- const localVarOperationServerBasePath = base_1.operationServerMap['UserApi.addFriend']?.[localVarOperationServerIndex]?.url;
514
+ const localVarOperationServerBasePath = base_1.operationServerMap['UserApi.create']?.[localVarOperationServerIndex]?.url;
449
515
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
450
516
  },
451
517
  /**
452
- *
453
- * @summary Create a user
454
- * @param {CreateUserDto} createUserDto
518
+ * Remove a friend connection or unblock a user. For BLOCKED connections, only the user who initiated the block can unblock.
519
+ * @summary Delete a connection with another user
520
+ * @param {string} userId
521
+ * @param {string} targetUserId
522
+ * @param {UserControllerDeleteConnectionTypeEnum} type Type of connection to delete
523
+ * @param {string} xProximaNexusRequesterUserId ID of the user deleting the connection
455
524
  * @param {*} [options] Override http request option.
456
525
  * @throws {RequiredError}
457
526
  */
458
- async create(createUserDto, options) {
459
- const localVarAxiosArgs = await localVarAxiosParamCreator.create(createUserDto, options);
527
+ async deleteConnection(userId, targetUserId, type, xProximaNexusRequesterUserId, options) {
528
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteConnection(userId, targetUserId, type, xProximaNexusRequesterUserId, options);
460
529
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
461
- const localVarOperationServerBasePath = base_1.operationServerMap['UserApi.create']?.[localVarOperationServerIndex]?.url;
530
+ const localVarOperationServerBasePath = base_1.operationServerMap['UserApi.deleteConnection']?.[localVarOperationServerIndex]?.url;
462
531
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
463
532
  },
464
533
  /**
465
534
  *
466
535
  * @summary Get a user by ID
467
536
  * @param {string} userId
537
+ * @param {string} [xProximaNexusRequesterUserId] ID of the user getting a user by ID. If set, 401 may be returned if the user cannot view the user, otherwise requesterConnection will be set on the result.
468
538
  * @param {*} [options] Override http request option.
469
539
  * @throws {RequiredError}
470
540
  */
471
- async findOne(userId, options) {
472
- const localVarAxiosArgs = await localVarAxiosParamCreator.findOne(userId, options);
541
+ async get(userId, xProximaNexusRequesterUserId, options) {
542
+ const localVarAxiosArgs = await localVarAxiosParamCreator.get(userId, xProximaNexusRequesterUserId, options);
473
543
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
474
- const localVarOperationServerBasePath = base_1.operationServerMap['UserApi.findOne']?.[localVarOperationServerIndex]?.url;
544
+ const localVarOperationServerBasePath = base_1.operationServerMap['UserApi.get']?.[localVarOperationServerIndex]?.url;
475
545
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
476
546
  },
477
547
  /**
478
548
  *
479
549
  * @summary Get a batch of users by IDs
480
550
  * @param {GetUsersDto} getUsersDto
551
+ * @param {string} [xProximaNexusRequesterUserId] ID of the user getting a batch of users. If set, users will be filtered to only include users that the user can see, and requesterConnection will be set on the results.
481
552
  * @param {*} [options] Override http request option.
482
553
  * @throws {RequiredError}
483
554
  */
484
- async getBatch(getUsersDto, options) {
485
- const localVarAxiosArgs = await localVarAxiosParamCreator.getBatch(getUsersDto, options);
555
+ async getBatch(getUsersDto, xProximaNexusRequesterUserId, options) {
556
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getBatch(getUsersDto, xProximaNexusRequesterUserId, options);
486
557
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
487
558
  const localVarOperationServerBasePath = base_1.operationServerMap['UserApi.getBatch']?.[localVarOperationServerIndex]?.url;
488
559
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
489
560
  },
490
561
  /**
491
- *
492
- * @summary Get events of a user
562
+ * Get user connections with optional type and state filters. Visibility rules apply: HIDDEN/CONNECTIONS users only show connections to self or connected users. Only the user themselves can see BLOCKED connections or non-ACTIVE states.
563
+ * @summary Get connections of a user
493
564
  * @param {string} userId
565
+ * @param {Array<UserControllerGetConnectionsStateEnum>} [state] Filter connections by state. Can be multiple values. Non-self requesters can only see ACTIVE connections.
566
+ * @param {Array<UserControllerGetConnectionsTypeEnum>} [type] Filter connections by type. Can be multiple values.
567
+ * @param {string} [xProximaNexusRequesterUserId] ID of the user viewing connections. Required for non-PUBLIC users. Only the user themselves can view BLOCKED or non-ACTIVE connections.
494
568
  * @param {*} [options] Override http request option.
495
569
  * @throws {RequiredError}
496
570
  */
497
- async getEvents(userId, options) {
498
- const localVarAxiosArgs = await localVarAxiosParamCreator.getEvents(userId, options);
571
+ async getConnections(userId, state, type, xProximaNexusRequesterUserId, options) {
572
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getConnections(userId, state, type, xProximaNexusRequesterUserId, options);
499
573
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
500
- const localVarOperationServerBasePath = base_1.operationServerMap['UserApi.getEvents']?.[localVarOperationServerIndex]?.url;
574
+ const localVarOperationServerBasePath = base_1.operationServerMap['UserApi.getConnections']?.[localVarOperationServerIndex]?.url;
501
575
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
502
576
  },
503
577
  /**
504
578
  *
505
- * @summary Get friends of a user
579
+ * @summary Get events of a user
506
580
  * @param {string} userId
581
+ * @param {string} [xProximaNexusRequesterUserId] ID of the user getting events of a user. If set, events will be filtered to only include events that the user can see, and requesterConnection will be set on the results.
507
582
  * @param {*} [options] Override http request option.
508
583
  * @throws {RequiredError}
509
584
  */
510
- async getFriends(userId, options) {
511
- const localVarAxiosArgs = await localVarAxiosParamCreator.getFriends(userId, options);
585
+ async getEvents(userId, xProximaNexusRequesterUserId, options) {
586
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getEvents(userId, xProximaNexusRequesterUserId, options);
512
587
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
513
- const localVarOperationServerBasePath = base_1.operationServerMap['UserApi.getFriends']?.[localVarOperationServerIndex]?.url;
588
+ const localVarOperationServerBasePath = base_1.operationServerMap['UserApi.getEvents']?.[localVarOperationServerIndex]?.url;
514
589
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
515
590
  },
516
591
  /**
517
592
  *
518
593
  * @summary Get groups of a user
519
594
  * @param {string} userId
595
+ * @param {string} [xProximaNexusRequesterUserId] ID of the user getting groups of a user. If set, groups will be filtered to only include groups that the user can see, and requesterConnection will be set on the results.
520
596
  * @param {*} [options] Override http request option.
521
597
  * @throws {RequiredError}
522
598
  */
523
- async getGroups(userId, options) {
524
- const localVarAxiosArgs = await localVarAxiosParamCreator.getGroups(userId, options);
599
+ async getGroups(userId, xProximaNexusRequesterUserId, options) {
600
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getGroups(userId, xProximaNexusRequesterUserId, options);
525
601
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
526
602
  const localVarOperationServerBasePath = base_1.operationServerMap['UserApi.getGroups']?.[localVarOperationServerIndex]?.url;
527
603
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
528
604
  },
529
605
  /**
530
- *
531
- * @summary Delete a user
606
+ * Create a friend request, accept a pending request, or block a user. For FRIEND type: creates REQUESTED state if no connection exists; target user can accept by setting state to ACTIVE. For BLOCKED type: creates a mutual block.
607
+ * @summary Create or update a connection with another user
532
608
  * @param {string} userId
609
+ * @param {string} targetUserId
610
+ * @param {string} xProximaNexusRequesterUserId ID of the user creating/modifying the connection (must match userId)
611
+ * @param {MutateUserConnectionDto} mutateUserConnectionDto
533
612
  * @param {*} [options] Override http request option.
534
613
  * @throws {RequiredError}
535
614
  */
536
- async remove(userId, options) {
537
- const localVarAxiosArgs = await localVarAxiosParamCreator.remove(userId, options);
615
+ async putConnection(userId, targetUserId, xProximaNexusRequesterUserId, mutateUserConnectionDto, options) {
616
+ const localVarAxiosArgs = await localVarAxiosParamCreator.putConnection(userId, targetUserId, xProximaNexusRequesterUserId, mutateUserConnectionDto, options);
538
617
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
539
- const localVarOperationServerBasePath = base_1.operationServerMap['UserApi.remove']?.[localVarOperationServerIndex]?.url;
618
+ const localVarOperationServerBasePath = base_1.operationServerMap['UserApi.putConnection']?.[localVarOperationServerIndex]?.url;
540
619
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
541
620
  },
542
621
  /**
543
622
  *
544
- * @summary Remove a friend from a user
623
+ * @summary Delete a user
545
624
  * @param {string} userId
546
- * @param {string} friendUserId
625
+ * @param {string} xProximaNexusRequesterUserId ID of the user deleting the user
547
626
  * @param {*} [options] Override http request option.
548
627
  * @throws {RequiredError}
549
628
  */
550
- async removeFriend(userId, friendUserId, options) {
551
- const localVarAxiosArgs = await localVarAxiosParamCreator.removeFriend(userId, friendUserId, options);
629
+ async remove(userId, xProximaNexusRequesterUserId, options) {
630
+ const localVarAxiosArgs = await localVarAxiosParamCreator.remove(userId, xProximaNexusRequesterUserId, options);
552
631
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
553
- const localVarOperationServerBasePath = base_1.operationServerMap['UserApi.removeFriend']?.[localVarOperationServerIndex]?.url;
632
+ const localVarOperationServerBasePath = base_1.operationServerMap['UserApi.remove']?.[localVarOperationServerIndex]?.url;
554
633
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
555
634
  },
556
635
  /**
557
- *
636
+ * Search for users. When requesterUserId is provided, HIDDEN users are filtered out unless the requester is connected to them, and users who have blocked the requester are also filtered out. When requesterUserId is not provided, all users are returned without visibility filtering.
558
637
  * @summary Search users
559
638
  * @param {string} [displayName] Display name search (ILIKE)
560
639
  * @param {number} [latitude] Latitude for radius search
@@ -565,11 +644,12 @@ const UserApiFp = function (configuration) {
565
644
  * @param {number} [minLongitude] Minimum longitude for bounding box
566
645
  * @param {number} [maxLongitude] Maximum longitude for bounding box
567
646
  * @param {number} [limit] Limit results (1-1000)
647
+ * @param {string} [xProximaNexusRequesterUserId] ID of the user searching for users. If set, users will be filtered to only include users that the user can see, and requesterConnection will be set on the results.
568
648
  * @param {*} [options] Override http request option.
569
649
  * @throws {RequiredError}
570
650
  */
571
- async search(displayName, latitude, longitude, radius, minLatitude, maxLatitude, minLongitude, maxLongitude, limit, options) {
572
- const localVarAxiosArgs = await localVarAxiosParamCreator.search(displayName, latitude, longitude, radius, minLatitude, maxLatitude, minLongitude, maxLongitude, limit, options);
651
+ async search(displayName, latitude, longitude, radius, minLatitude, maxLatitude, minLongitude, maxLongitude, limit, xProximaNexusRequesterUserId, options) {
652
+ const localVarAxiosArgs = await localVarAxiosParamCreator.search(displayName, latitude, longitude, radius, minLatitude, maxLatitude, minLongitude, maxLongitude, limit, xProximaNexusRequesterUserId, options);
573
653
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
574
654
  const localVarOperationServerBasePath = base_1.operationServerMap['UserApi.search']?.[localVarOperationServerIndex]?.url;
575
655
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -578,12 +658,13 @@ const UserApiFp = function (configuration) {
578
658
  *
579
659
  * @summary Update a user
580
660
  * @param {string} userId
661
+ * @param {string} xProximaNexusRequesterUserId ID of the user updating the user
581
662
  * @param {UpdateUserDto} updateUserDto
582
663
  * @param {*} [options] Override http request option.
583
664
  * @throws {RequiredError}
584
665
  */
585
- async update(userId, updateUserDto, options) {
586
- const localVarAxiosArgs = await localVarAxiosParamCreator.update(userId, updateUserDto, options);
666
+ async update(userId, xProximaNexusRequesterUserId, updateUserDto, options) {
667
+ const localVarAxiosArgs = await localVarAxiosParamCreator.update(userId, xProximaNexusRequesterUserId, updateUserDto, options);
587
668
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
588
669
  const localVarOperationServerBasePath = base_1.operationServerMap['UserApi.update']?.[localVarOperationServerIndex]?.url;
589
670
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -599,98 +680,110 @@ const UserApiFactory = function (configuration, basePath, axios) {
599
680
  return {
600
681
  /**
601
682
  *
602
- * @summary Add a friend to a user
603
- * @param {string} userId
604
- * @param {string} friendUserId
683
+ * @summary Create a user
684
+ * @param {CreateUserDto} createUserDto
605
685
  * @param {*} [options] Override http request option.
606
686
  * @throws {RequiredError}
607
687
  */
608
- addFriend(userId, friendUserId, options) {
609
- return localVarFp.addFriend(userId, friendUserId, options).then((request) => request(axios, basePath));
688
+ create(createUserDto, options) {
689
+ return localVarFp.create(createUserDto, options).then((request) => request(axios, basePath));
610
690
  },
611
691
  /**
612
- *
613
- * @summary Create a user
614
- * @param {CreateUserDto} createUserDto
692
+ * Remove a friend connection or unblock a user. For BLOCKED connections, only the user who initiated the block can unblock.
693
+ * @summary Delete a connection with another user
694
+ * @param {string} userId
695
+ * @param {string} targetUserId
696
+ * @param {UserControllerDeleteConnectionTypeEnum} type Type of connection to delete
697
+ * @param {string} xProximaNexusRequesterUserId ID of the user deleting the connection
615
698
  * @param {*} [options] Override http request option.
616
699
  * @throws {RequiredError}
617
700
  */
618
- create(createUserDto, options) {
619
- return localVarFp.create(createUserDto, options).then((request) => request(axios, basePath));
701
+ deleteConnection(userId, targetUserId, type, xProximaNexusRequesterUserId, options) {
702
+ return localVarFp.deleteConnection(userId, targetUserId, type, xProximaNexusRequesterUserId, options).then((request) => request(axios, basePath));
620
703
  },
621
704
  /**
622
705
  *
623
706
  * @summary Get a user by ID
624
707
  * @param {string} userId
708
+ * @param {string} [xProximaNexusRequesterUserId] ID of the user getting a user by ID. If set, 401 may be returned if the user cannot view the user, otherwise requesterConnection will be set on the result.
625
709
  * @param {*} [options] Override http request option.
626
710
  * @throws {RequiredError}
627
711
  */
628
- findOne(userId, options) {
629
- return localVarFp.findOne(userId, options).then((request) => request(axios, basePath));
712
+ get(userId, xProximaNexusRequesterUserId, options) {
713
+ return localVarFp.get(userId, xProximaNexusRequesterUserId, options).then((request) => request(axios, basePath));
630
714
  },
631
715
  /**
632
716
  *
633
717
  * @summary Get a batch of users by IDs
634
718
  * @param {GetUsersDto} getUsersDto
719
+ * @param {string} [xProximaNexusRequesterUserId] ID of the user getting a batch of users. If set, users will be filtered to only include users that the user can see, and requesterConnection will be set on the results.
635
720
  * @param {*} [options] Override http request option.
636
721
  * @throws {RequiredError}
637
722
  */
638
- getBatch(getUsersDto, options) {
639
- return localVarFp.getBatch(getUsersDto, options).then((request) => request(axios, basePath));
723
+ getBatch(getUsersDto, xProximaNexusRequesterUserId, options) {
724
+ return localVarFp.getBatch(getUsersDto, xProximaNexusRequesterUserId, options).then((request) => request(axios, basePath));
640
725
  },
641
726
  /**
642
- *
643
- * @summary Get events of a user
727
+ * Get user connections with optional type and state filters. Visibility rules apply: HIDDEN/CONNECTIONS users only show connections to self or connected users. Only the user themselves can see BLOCKED connections or non-ACTIVE states.
728
+ * @summary Get connections of a user
644
729
  * @param {string} userId
730
+ * @param {Array<UserControllerGetConnectionsStateEnum>} [state] Filter connections by state. Can be multiple values. Non-self requesters can only see ACTIVE connections.
731
+ * @param {Array<UserControllerGetConnectionsTypeEnum>} [type] Filter connections by type. Can be multiple values.
732
+ * @param {string} [xProximaNexusRequesterUserId] ID of the user viewing connections. Required for non-PUBLIC users. Only the user themselves can view BLOCKED or non-ACTIVE connections.
645
733
  * @param {*} [options] Override http request option.
646
734
  * @throws {RequiredError}
647
735
  */
648
- getEvents(userId, options) {
649
- return localVarFp.getEvents(userId, options).then((request) => request(axios, basePath));
736
+ getConnections(userId, state, type, xProximaNexusRequesterUserId, options) {
737
+ return localVarFp.getConnections(userId, state, type, xProximaNexusRequesterUserId, options).then((request) => request(axios, basePath));
650
738
  },
651
739
  /**
652
740
  *
653
- * @summary Get friends of a user
741
+ * @summary Get events of a user
654
742
  * @param {string} userId
743
+ * @param {string} [xProximaNexusRequesterUserId] ID of the user getting events of a user. If set, events will be filtered to only include events that the user can see, and requesterConnection will be set on the results.
655
744
  * @param {*} [options] Override http request option.
656
745
  * @throws {RequiredError}
657
746
  */
658
- getFriends(userId, options) {
659
- return localVarFp.getFriends(userId, options).then((request) => request(axios, basePath));
747
+ getEvents(userId, xProximaNexusRequesterUserId, options) {
748
+ return localVarFp.getEvents(userId, xProximaNexusRequesterUserId, options).then((request) => request(axios, basePath));
660
749
  },
661
750
  /**
662
751
  *
663
752
  * @summary Get groups of a user
664
753
  * @param {string} userId
754
+ * @param {string} [xProximaNexusRequesterUserId] ID of the user getting groups of a user. If set, groups will be filtered to only include groups that the user can see, and requesterConnection will be set on the results.
665
755
  * @param {*} [options] Override http request option.
666
756
  * @throws {RequiredError}
667
757
  */
668
- getGroups(userId, options) {
669
- return localVarFp.getGroups(userId, options).then((request) => request(axios, basePath));
758
+ getGroups(userId, xProximaNexusRequesterUserId, options) {
759
+ return localVarFp.getGroups(userId, xProximaNexusRequesterUserId, options).then((request) => request(axios, basePath));
670
760
  },
671
761
  /**
672
- *
673
- * @summary Delete a user
762
+ * Create a friend request, accept a pending request, or block a user. For FRIEND type: creates REQUESTED state if no connection exists; target user can accept by setting state to ACTIVE. For BLOCKED type: creates a mutual block.
763
+ * @summary Create or update a connection with another user
674
764
  * @param {string} userId
765
+ * @param {string} targetUserId
766
+ * @param {string} xProximaNexusRequesterUserId ID of the user creating/modifying the connection (must match userId)
767
+ * @param {MutateUserConnectionDto} mutateUserConnectionDto
675
768
  * @param {*} [options] Override http request option.
676
769
  * @throws {RequiredError}
677
770
  */
678
- remove(userId, options) {
679
- return localVarFp.remove(userId, options).then((request) => request(axios, basePath));
771
+ putConnection(userId, targetUserId, xProximaNexusRequesterUserId, mutateUserConnectionDto, options) {
772
+ return localVarFp.putConnection(userId, targetUserId, xProximaNexusRequesterUserId, mutateUserConnectionDto, options).then((request) => request(axios, basePath));
680
773
  },
681
774
  /**
682
775
  *
683
- * @summary Remove a friend from a user
776
+ * @summary Delete a user
684
777
  * @param {string} userId
685
- * @param {string} friendUserId
778
+ * @param {string} xProximaNexusRequesterUserId ID of the user deleting the user
686
779
  * @param {*} [options] Override http request option.
687
780
  * @throws {RequiredError}
688
781
  */
689
- removeFriend(userId, friendUserId, options) {
690
- return localVarFp.removeFriend(userId, friendUserId, options).then((request) => request(axios, basePath));
782
+ remove(userId, xProximaNexusRequesterUserId, options) {
783
+ return localVarFp.remove(userId, xProximaNexusRequesterUserId, options).then((request) => request(axios, basePath));
691
784
  },
692
785
  /**
693
- *
786
+ * Search for users. When requesterUserId is provided, HIDDEN users are filtered out unless the requester is connected to them, and users who have blocked the requester are also filtered out. When requesterUserId is not provided, all users are returned without visibility filtering.
694
787
  * @summary Search users
695
788
  * @param {string} [displayName] Display name search (ILIKE)
696
789
  * @param {number} [latitude] Latitude for radius search
@@ -701,22 +794,24 @@ const UserApiFactory = function (configuration, basePath, axios) {
701
794
  * @param {number} [minLongitude] Minimum longitude for bounding box
702
795
  * @param {number} [maxLongitude] Maximum longitude for bounding box
703
796
  * @param {number} [limit] Limit results (1-1000)
797
+ * @param {string} [xProximaNexusRequesterUserId] ID of the user searching for users. If set, users will be filtered to only include users that the user can see, and requesterConnection will be set on the results.
704
798
  * @param {*} [options] Override http request option.
705
799
  * @throws {RequiredError}
706
800
  */
707
- search(displayName, latitude, longitude, radius, minLatitude, maxLatitude, minLongitude, maxLongitude, limit, options) {
708
- return localVarFp.search(displayName, latitude, longitude, radius, minLatitude, maxLatitude, minLongitude, maxLongitude, limit, options).then((request) => request(axios, basePath));
801
+ search(displayName, latitude, longitude, radius, minLatitude, maxLatitude, minLongitude, maxLongitude, limit, xProximaNexusRequesterUserId, options) {
802
+ return localVarFp.search(displayName, latitude, longitude, radius, minLatitude, maxLatitude, minLongitude, maxLongitude, limit, xProximaNexusRequesterUserId, options).then((request) => request(axios, basePath));
709
803
  },
710
804
  /**
711
805
  *
712
806
  * @summary Update a user
713
807
  * @param {string} userId
808
+ * @param {string} xProximaNexusRequesterUserId ID of the user updating the user
714
809
  * @param {UpdateUserDto} updateUserDto
715
810
  * @param {*} [options] Override http request option.
716
811
  * @throws {RequiredError}
717
812
  */
718
- update(userId, updateUserDto, options) {
719
- return localVarFp.update(userId, updateUserDto, options).then((request) => request(axios, basePath));
813
+ update(userId, xProximaNexusRequesterUserId, updateUserDto, options) {
814
+ return localVarFp.update(userId, xProximaNexusRequesterUserId, updateUserDto, options).then((request) => request(axios, basePath));
720
815
  },
721
816
  };
722
817
  };
@@ -727,98 +822,110 @@ exports.UserApiFactory = UserApiFactory;
727
822
  class UserApi extends base_1.BaseAPI {
728
823
  /**
729
824
  *
730
- * @summary Add a friend to a user
731
- * @param {string} userId
732
- * @param {string} friendUserId
825
+ * @summary Create a user
826
+ * @param {CreateUserDto} createUserDto
733
827
  * @param {*} [options] Override http request option.
734
828
  * @throws {RequiredError}
735
829
  */
736
- addFriend(userId, friendUserId, options) {
737
- return (0, exports.UserApiFp)(this.configuration).addFriend(userId, friendUserId, options).then((request) => request(this.axios, this.basePath));
830
+ create(createUserDto, options) {
831
+ return (0, exports.UserApiFp)(this.configuration).create(createUserDto, options).then((request) => request(this.axios, this.basePath));
738
832
  }
739
833
  /**
740
- *
741
- * @summary Create a user
742
- * @param {CreateUserDto} createUserDto
834
+ * Remove a friend connection or unblock a user. For BLOCKED connections, only the user who initiated the block can unblock.
835
+ * @summary Delete a connection with another user
836
+ * @param {string} userId
837
+ * @param {string} targetUserId
838
+ * @param {UserControllerDeleteConnectionTypeEnum} type Type of connection to delete
839
+ * @param {string} xProximaNexusRequesterUserId ID of the user deleting the connection
743
840
  * @param {*} [options] Override http request option.
744
841
  * @throws {RequiredError}
745
842
  */
746
- create(createUserDto, options) {
747
- return (0, exports.UserApiFp)(this.configuration).create(createUserDto, options).then((request) => request(this.axios, this.basePath));
843
+ deleteConnection(userId, targetUserId, type, xProximaNexusRequesterUserId, options) {
844
+ return (0, exports.UserApiFp)(this.configuration).deleteConnection(userId, targetUserId, type, xProximaNexusRequesterUserId, options).then((request) => request(this.axios, this.basePath));
748
845
  }
749
846
  /**
750
847
  *
751
848
  * @summary Get a user by ID
752
849
  * @param {string} userId
850
+ * @param {string} [xProximaNexusRequesterUserId] ID of the user getting a user by ID. If set, 401 may be returned if the user cannot view the user, otherwise requesterConnection will be set on the result.
753
851
  * @param {*} [options] Override http request option.
754
852
  * @throws {RequiredError}
755
853
  */
756
- findOne(userId, options) {
757
- return (0, exports.UserApiFp)(this.configuration).findOne(userId, options).then((request) => request(this.axios, this.basePath));
854
+ get(userId, xProximaNexusRequesterUserId, options) {
855
+ return (0, exports.UserApiFp)(this.configuration).get(userId, xProximaNexusRequesterUserId, options).then((request) => request(this.axios, this.basePath));
758
856
  }
759
857
  /**
760
858
  *
761
859
  * @summary Get a batch of users by IDs
762
860
  * @param {GetUsersDto} getUsersDto
861
+ * @param {string} [xProximaNexusRequesterUserId] ID of the user getting a batch of users. If set, users will be filtered to only include users that the user can see, and requesterConnection will be set on the results.
763
862
  * @param {*} [options] Override http request option.
764
863
  * @throws {RequiredError}
765
864
  */
766
- getBatch(getUsersDto, options) {
767
- return (0, exports.UserApiFp)(this.configuration).getBatch(getUsersDto, options).then((request) => request(this.axios, this.basePath));
865
+ getBatch(getUsersDto, xProximaNexusRequesterUserId, options) {
866
+ return (0, exports.UserApiFp)(this.configuration).getBatch(getUsersDto, xProximaNexusRequesterUserId, options).then((request) => request(this.axios, this.basePath));
768
867
  }
769
868
  /**
770
- *
771
- * @summary Get events of a user
869
+ * Get user connections with optional type and state filters. Visibility rules apply: HIDDEN/CONNECTIONS users only show connections to self or connected users. Only the user themselves can see BLOCKED connections or non-ACTIVE states.
870
+ * @summary Get connections of a user
772
871
  * @param {string} userId
872
+ * @param {Array<UserControllerGetConnectionsStateEnum>} [state] Filter connections by state. Can be multiple values. Non-self requesters can only see ACTIVE connections.
873
+ * @param {Array<UserControllerGetConnectionsTypeEnum>} [type] Filter connections by type. Can be multiple values.
874
+ * @param {string} [xProximaNexusRequesterUserId] ID of the user viewing connections. Required for non-PUBLIC users. Only the user themselves can view BLOCKED or non-ACTIVE connections.
773
875
  * @param {*} [options] Override http request option.
774
876
  * @throws {RequiredError}
775
877
  */
776
- getEvents(userId, options) {
777
- return (0, exports.UserApiFp)(this.configuration).getEvents(userId, options).then((request) => request(this.axios, this.basePath));
878
+ getConnections(userId, state, type, xProximaNexusRequesterUserId, options) {
879
+ return (0, exports.UserApiFp)(this.configuration).getConnections(userId, state, type, xProximaNexusRequesterUserId, options).then((request) => request(this.axios, this.basePath));
778
880
  }
779
881
  /**
780
882
  *
781
- * @summary Get friends of a user
883
+ * @summary Get events of a user
782
884
  * @param {string} userId
885
+ * @param {string} [xProximaNexusRequesterUserId] ID of the user getting events of a user. If set, events will be filtered to only include events that the user can see, and requesterConnection will be set on the results.
783
886
  * @param {*} [options] Override http request option.
784
887
  * @throws {RequiredError}
785
888
  */
786
- getFriends(userId, options) {
787
- return (0, exports.UserApiFp)(this.configuration).getFriends(userId, options).then((request) => request(this.axios, this.basePath));
889
+ getEvents(userId, xProximaNexusRequesterUserId, options) {
890
+ return (0, exports.UserApiFp)(this.configuration).getEvents(userId, xProximaNexusRequesterUserId, options).then((request) => request(this.axios, this.basePath));
788
891
  }
789
892
  /**
790
893
  *
791
894
  * @summary Get groups of a user
792
895
  * @param {string} userId
896
+ * @param {string} [xProximaNexusRequesterUserId] ID of the user getting groups of a user. If set, groups will be filtered to only include groups that the user can see, and requesterConnection will be set on the results.
793
897
  * @param {*} [options] Override http request option.
794
898
  * @throws {RequiredError}
795
899
  */
796
- getGroups(userId, options) {
797
- return (0, exports.UserApiFp)(this.configuration).getGroups(userId, options).then((request) => request(this.axios, this.basePath));
900
+ getGroups(userId, xProximaNexusRequesterUserId, options) {
901
+ return (0, exports.UserApiFp)(this.configuration).getGroups(userId, xProximaNexusRequesterUserId, options).then((request) => request(this.axios, this.basePath));
798
902
  }
799
903
  /**
800
- *
801
- * @summary Delete a user
904
+ * Create a friend request, accept a pending request, or block a user. For FRIEND type: creates REQUESTED state if no connection exists; target user can accept by setting state to ACTIVE. For BLOCKED type: creates a mutual block.
905
+ * @summary Create or update a connection with another user
802
906
  * @param {string} userId
907
+ * @param {string} targetUserId
908
+ * @param {string} xProximaNexusRequesterUserId ID of the user creating/modifying the connection (must match userId)
909
+ * @param {MutateUserConnectionDto} mutateUserConnectionDto
803
910
  * @param {*} [options] Override http request option.
804
911
  * @throws {RequiredError}
805
912
  */
806
- remove(userId, options) {
807
- return (0, exports.UserApiFp)(this.configuration).remove(userId, options).then((request) => request(this.axios, this.basePath));
913
+ putConnection(userId, targetUserId, xProximaNexusRequesterUserId, mutateUserConnectionDto, options) {
914
+ return (0, exports.UserApiFp)(this.configuration).putConnection(userId, targetUserId, xProximaNexusRequesterUserId, mutateUserConnectionDto, options).then((request) => request(this.axios, this.basePath));
808
915
  }
809
916
  /**
810
917
  *
811
- * @summary Remove a friend from a user
918
+ * @summary Delete a user
812
919
  * @param {string} userId
813
- * @param {string} friendUserId
920
+ * @param {string} xProximaNexusRequesterUserId ID of the user deleting the user
814
921
  * @param {*} [options] Override http request option.
815
922
  * @throws {RequiredError}
816
923
  */
817
- removeFriend(userId, friendUserId, options) {
818
- return (0, exports.UserApiFp)(this.configuration).removeFriend(userId, friendUserId, options).then((request) => request(this.axios, this.basePath));
924
+ remove(userId, xProximaNexusRequesterUserId, options) {
925
+ return (0, exports.UserApiFp)(this.configuration).remove(userId, xProximaNexusRequesterUserId, options).then((request) => request(this.axios, this.basePath));
819
926
  }
820
927
  /**
821
- *
928
+ * Search for users. When requesterUserId is provided, HIDDEN users are filtered out unless the requester is connected to them, and users who have blocked the requester are also filtered out. When requesterUserId is not provided, all users are returned without visibility filtering.
822
929
  * @summary Search users
823
930
  * @param {string} [displayName] Display name search (ILIKE)
824
931
  * @param {number} [latitude] Latitude for radius search
@@ -829,22 +936,41 @@ class UserApi extends base_1.BaseAPI {
829
936
  * @param {number} [minLongitude] Minimum longitude for bounding box
830
937
  * @param {number} [maxLongitude] Maximum longitude for bounding box
831
938
  * @param {number} [limit] Limit results (1-1000)
939
+ * @param {string} [xProximaNexusRequesterUserId] ID of the user searching for users. If set, users will be filtered to only include users that the user can see, and requesterConnection will be set on the results.
832
940
  * @param {*} [options] Override http request option.
833
941
  * @throws {RequiredError}
834
942
  */
835
- search(displayName, latitude, longitude, radius, minLatitude, maxLatitude, minLongitude, maxLongitude, limit, options) {
836
- return (0, exports.UserApiFp)(this.configuration).search(displayName, latitude, longitude, radius, minLatitude, maxLatitude, minLongitude, maxLongitude, limit, options).then((request) => request(this.axios, this.basePath));
943
+ search(displayName, latitude, longitude, radius, minLatitude, maxLatitude, minLongitude, maxLongitude, limit, xProximaNexusRequesterUserId, options) {
944
+ return (0, exports.UserApiFp)(this.configuration).search(displayName, latitude, longitude, radius, minLatitude, maxLatitude, minLongitude, maxLongitude, limit, xProximaNexusRequesterUserId, options).then((request) => request(this.axios, this.basePath));
837
945
  }
838
946
  /**
839
947
  *
840
948
  * @summary Update a user
841
949
  * @param {string} userId
950
+ * @param {string} xProximaNexusRequesterUserId ID of the user updating the user
842
951
  * @param {UpdateUserDto} updateUserDto
843
952
  * @param {*} [options] Override http request option.
844
953
  * @throws {RequiredError}
845
954
  */
846
- update(userId, updateUserDto, options) {
847
- return (0, exports.UserApiFp)(this.configuration).update(userId, updateUserDto, options).then((request) => request(this.axios, this.basePath));
955
+ update(userId, xProximaNexusRequesterUserId, updateUserDto, options) {
956
+ return (0, exports.UserApiFp)(this.configuration).update(userId, xProximaNexusRequesterUserId, updateUserDto, options).then((request) => request(this.axios, this.basePath));
848
957
  }
849
958
  }
850
959
  exports.UserApi = UserApi;
960
+ var UserControllerDeleteConnectionTypeEnum;
961
+ (function (UserControllerDeleteConnectionTypeEnum) {
962
+ UserControllerDeleteConnectionTypeEnum["friend"] = "friend";
963
+ UserControllerDeleteConnectionTypeEnum["blocked"] = "blocked";
964
+ })(UserControllerDeleteConnectionTypeEnum || (exports.UserControllerDeleteConnectionTypeEnum = UserControllerDeleteConnectionTypeEnum = {}));
965
+ var UserControllerGetConnectionsStateEnum;
966
+ (function (UserControllerGetConnectionsStateEnum) {
967
+ UserControllerGetConnectionsStateEnum["requested"] = "requested";
968
+ UserControllerGetConnectionsStateEnum["active"] = "active";
969
+ UserControllerGetConnectionsStateEnum["rejected"] = "rejected";
970
+ UserControllerGetConnectionsStateEnum["blocked"] = "blocked";
971
+ })(UserControllerGetConnectionsStateEnum || (exports.UserControllerGetConnectionsStateEnum = UserControllerGetConnectionsStateEnum = {}));
972
+ var UserControllerGetConnectionsTypeEnum;
973
+ (function (UserControllerGetConnectionsTypeEnum) {
974
+ UserControllerGetConnectionsTypeEnum["friend"] = "friend";
975
+ UserControllerGetConnectionsTypeEnum["blocked"] = "blocked";
976
+ })(UserControllerGetConnectionsTypeEnum || (exports.UserControllerGetConnectionsTypeEnum = UserControllerGetConnectionsTypeEnum = {}));