Skip to content

Commit 775552a

Browse files
Release 1.8.61
1 parent 84fb44c commit 775552a

39 files changed

Lines changed: 243 additions & 91 deletions

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "flagright",
3-
"version": "1.8.60",
3+
"version": "1.8.61",
44
"private": false,
55
"repository": "https://github.com/flagright/flagright-node",
66
"main": "./index.js",

reference.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1447,7 +1447,7 @@ await client.businessUsers.get("userId");
14471447

14481448
## ConsumerUserEvents
14491449

1450-
<details><summary><code>client.consumerUserEvents.<a href="/src/api/resources/consumerUserEvents/client/Client.ts">create</a>({ ...params }) -> Flagright.UserWithRulesResult</code></summary>
1450+
<details><summary><code>client.consumerUserEvents.<a href="/src/api/resources/consumerUserEvents/client/Client.ts">create</a>({ ...params }) -> Flagright.ConsumerUserEventsCreateResponse</code></summary>
14511451
<dl>
14521452
<dd>
14531453

@@ -1496,6 +1496,7 @@ await client.consumerUserEvents.create({
14961496
allowUserTypeConversion: "true",
14971497
lockKycRiskLevel: "true",
14981498
lockCraRiskLevel: "true",
1499+
changeUserId: "true",
14991500
body: {
15001501
timestamp: 1.1,
15011502
userId: "userId",
@@ -1601,7 +1602,7 @@ await client.consumerUserEvents.get("eventId");
16011602

16021603
## BusinessUserEvents
16031604

1604-
<details><summary><code>client.businessUserEvents.<a href="/src/api/resources/businessUserEvents/client/Client.ts">create</a>({ ...params }) -> Flagright.BusinessWithRulesResult</code></summary>
1605+
<details><summary><code>client.businessUserEvents.<a href="/src/api/resources/businessUserEvents/client/Client.ts">create</a>({ ...params }) -> Flagright.BusinessUserEventsCreateResponse</code></summary>
16051606
<dl>
16061607
<dd>
16071608

@@ -1650,6 +1651,7 @@ await client.businessUserEvents.create({
16501651
allowUserTypeConversion: "true",
16511652
lockKycRiskLevel: "true",
16521653
lockCraRiskLevel: "true",
1654+
changeUserId: "true",
16531655
body: {
16541656
timestamp: 1.1,
16551657
userId: "userId",

src/api/resources/batch/client/Client.ts

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ export class Batch {
8888
headers: {
8989
"X-Fern-Language": "JavaScript",
9090
"X-Fern-SDK-Name": "flagright",
91-
"X-Fern-SDK-Version": "1.8.60",
92-
"User-Agent": "flagright/1.8.60",
91+
"X-Fern-SDK-Version": "1.8.61",
92+
"User-Agent": "flagright/1.8.61",
9393
"X-Fern-Runtime": core.RUNTIME.type,
9494
"X-Fern-Runtime-Version": core.RUNTIME.version,
9595
...(await this._getCustomAuthorizationHeaders()),
@@ -222,8 +222,8 @@ export class Batch {
222222
headers: {
223223
"X-Fern-Language": "JavaScript",
224224
"X-Fern-SDK-Name": "flagright",
225-
"X-Fern-SDK-Version": "1.8.60",
226-
"User-Agent": "flagright/1.8.60",
225+
"X-Fern-SDK-Version": "1.8.61",
226+
"User-Agent": "flagright/1.8.61",
227227
"X-Fern-Runtime": core.RUNTIME.type,
228228
"X-Fern-Runtime-Version": core.RUNTIME.version,
229229
...(await this._getCustomAuthorizationHeaders()),
@@ -347,8 +347,8 @@ export class Batch {
347347
headers: {
348348
"X-Fern-Language": "JavaScript",
349349
"X-Fern-SDK-Name": "flagright",
350-
"X-Fern-SDK-Version": "1.8.60",
351-
"User-Agent": "flagright/1.8.60",
350+
"X-Fern-SDK-Version": "1.8.61",
351+
"User-Agent": "flagright/1.8.61",
352352
"X-Fern-Runtime": core.RUNTIME.type,
353353
"X-Fern-Runtime-Version": core.RUNTIME.version,
354354
...(await this._getCustomAuthorizationHeaders()),
@@ -480,8 +480,8 @@ export class Batch {
480480
headers: {
481481
"X-Fern-Language": "JavaScript",
482482
"X-Fern-SDK-Name": "flagright",
483-
"X-Fern-SDK-Version": "1.8.60",
484-
"User-Agent": "flagright/1.8.60",
483+
"X-Fern-SDK-Version": "1.8.61",
484+
"User-Agent": "flagright/1.8.61",
485485
"X-Fern-Runtime": core.RUNTIME.type,
486486
"X-Fern-Runtime-Version": core.RUNTIME.version,
487487
...(await this._getCustomAuthorizationHeaders()),
@@ -620,8 +620,8 @@ export class Batch {
620620
headers: {
621621
"X-Fern-Language": "JavaScript",
622622
"X-Fern-SDK-Name": "flagright",
623-
"X-Fern-SDK-Version": "1.8.60",
624-
"User-Agent": "flagright/1.8.60",
623+
"X-Fern-SDK-Version": "1.8.61",
624+
"User-Agent": "flagright/1.8.61",
625625
"X-Fern-Runtime": core.RUNTIME.type,
626626
"X-Fern-Runtime-Version": core.RUNTIME.version,
627627
...(await this._getCustomAuthorizationHeaders()),
@@ -754,8 +754,8 @@ export class Batch {
754754
headers: {
755755
"X-Fern-Language": "JavaScript",
756756
"X-Fern-SDK-Name": "flagright",
757-
"X-Fern-SDK-Version": "1.8.60",
758-
"User-Agent": "flagright/1.8.60",
757+
"X-Fern-SDK-Version": "1.8.61",
758+
"User-Agent": "flagright/1.8.61",
759759
"X-Fern-Runtime": core.RUNTIME.type,
760760
"X-Fern-Runtime-Version": core.RUNTIME.version,
761761
...(await this._getCustomAuthorizationHeaders()),
@@ -902,8 +902,8 @@ export class Batch {
902902
headers: {
903903
"X-Fern-Language": "JavaScript",
904904
"X-Fern-SDK-Name": "flagright",
905-
"X-Fern-SDK-Version": "1.8.60",
906-
"User-Agent": "flagright/1.8.60",
905+
"X-Fern-SDK-Version": "1.8.61",
906+
"User-Agent": "flagright/1.8.61",
907907
"X-Fern-Runtime": core.RUNTIME.type,
908908
"X-Fern-Runtime-Version": core.RUNTIME.version,
909909
...(await this._getCustomAuthorizationHeaders()),
@@ -1036,8 +1036,8 @@ export class Batch {
10361036
headers: {
10371037
"X-Fern-Language": "JavaScript",
10381038
"X-Fern-SDK-Name": "flagright",
1039-
"X-Fern-SDK-Version": "1.8.60",
1040-
"User-Agent": "flagright/1.8.60",
1039+
"X-Fern-SDK-Version": "1.8.61",
1040+
"User-Agent": "flagright/1.8.61",
10411041
"X-Fern-Runtime": core.RUNTIME.type,
10421042
"X-Fern-Runtime-Version": core.RUNTIME.version,
10431043
...(await this._getCustomAuthorizationHeaders()),
@@ -1176,8 +1176,8 @@ export class Batch {
11761176
headers: {
11771177
"X-Fern-Language": "JavaScript",
11781178
"X-Fern-SDK-Name": "flagright",
1179-
"X-Fern-SDK-Version": "1.8.60",
1180-
"User-Agent": "flagright/1.8.60",
1179+
"X-Fern-SDK-Version": "1.8.61",
1180+
"User-Agent": "flagright/1.8.61",
11811181
"X-Fern-Runtime": core.RUNTIME.type,
11821182
"X-Fern-Runtime-Version": core.RUNTIME.version,
11831183
...(await this._getCustomAuthorizationHeaders()),
@@ -1312,8 +1312,8 @@ export class Batch {
13121312
headers: {
13131313
"X-Fern-Language": "JavaScript",
13141314
"X-Fern-SDK-Name": "flagright",
1315-
"X-Fern-SDK-Version": "1.8.60",
1316-
"User-Agent": "flagright/1.8.60",
1315+
"X-Fern-SDK-Version": "1.8.61",
1316+
"User-Agent": "flagright/1.8.61",
13171317
"X-Fern-Runtime": core.RUNTIME.type,
13181318
"X-Fern-Runtime-Version": core.RUNTIME.version,
13191319
...(await this._getCustomAuthorizationHeaders()),
@@ -1452,8 +1452,8 @@ export class Batch {
14521452
headers: {
14531453
"X-Fern-Language": "JavaScript",
14541454
"X-Fern-SDK-Name": "flagright",
1455-
"X-Fern-SDK-Version": "1.8.60",
1456-
"User-Agent": "flagright/1.8.60",
1455+
"X-Fern-SDK-Version": "1.8.61",
1456+
"User-Agent": "flagright/1.8.61",
14571457
"X-Fern-Runtime": core.RUNTIME.type,
14581458
"X-Fern-Runtime-Version": core.RUNTIME.version,
14591459
...(await this._getCustomAuthorizationHeaders()),
@@ -1588,8 +1588,8 @@ export class Batch {
15881588
headers: {
15891589
"X-Fern-Language": "JavaScript",
15901590
"X-Fern-SDK-Name": "flagright",
1591-
"X-Fern-SDK-Version": "1.8.60",
1592-
"User-Agent": "flagright/1.8.60",
1591+
"X-Fern-SDK-Version": "1.8.61",
1592+
"User-Agent": "flagright/1.8.61",
15931593
"X-Fern-Runtime": core.RUNTIME.type,
15941594
"X-Fern-Runtime-Version": core.RUNTIME.version,
15951595
...(await this._getCustomAuthorizationHeaders()),

src/api/resources/businessUserEvents/client/Client.ts

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export class BusinessUserEvents {
5858
*
5959
* @throws {@link Flagright.BadRequestError}
6060
* @throws {@link Flagright.UnauthorizedError}
61+
* @throws {@link Flagright.NotFoundError}
6162
* @throws {@link Flagright.ConflictError}
6263
* @throws {@link Flagright.TooManyRequestsError}
6364
*
@@ -66,6 +67,7 @@ export class BusinessUserEvents {
6667
* allowUserTypeConversion: "true",
6768
* lockKycRiskLevel: "true",
6869
* lockCraRiskLevel: "true",
70+
* changeUserId: "true",
6971
* body: {
7072
* timestamp: 1.1,
7173
* userId: "userId"
@@ -75,15 +77,15 @@ export class BusinessUserEvents {
7577
public create(
7678
request: Flagright.BusinessUserEventsCreateRequest,
7779
requestOptions?: BusinessUserEvents.RequestOptions,
78-
): core.HttpResponsePromise<Flagright.BusinessWithRulesResult> {
80+
): core.HttpResponsePromise<Flagright.BusinessUserEventsCreateResponse> {
7981
return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
8082
}
8183

8284
private async __create(
8385
request: Flagright.BusinessUserEventsCreateRequest,
8486
requestOptions?: BusinessUserEvents.RequestOptions,
85-
): Promise<core.WithRawResponse<Flagright.BusinessWithRulesResult>> {
86-
const { allowUserTypeConversion, lockKycRiskLevel, lockCraRiskLevel, body: _body } = request;
87+
): Promise<core.WithRawResponse<Flagright.BusinessUserEventsCreateResponse>> {
88+
const { allowUserTypeConversion, lockKycRiskLevel, lockCraRiskLevel, changeUserId, body: _body } = request;
8789
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
8890
if (allowUserTypeConversion != null) {
8991
_queryParams["allowUserTypeConversion"] = serializers.BooleanString.jsonOrThrow(allowUserTypeConversion, {
@@ -103,6 +105,12 @@ export class BusinessUserEvents {
103105
});
104106
}
105107

108+
if (changeUserId != null) {
109+
_queryParams["changeUserId"] = serializers.BooleanString.jsonOrThrow(changeUserId, {
110+
unrecognizedObjectKeys: "strip",
111+
});
112+
}
113+
106114
const _response = await core.fetcher({
107115
url: urlJoin(
108116
(await core.Supplier.get(this._options.baseUrl)) ??
@@ -114,8 +122,8 @@ export class BusinessUserEvents {
114122
headers: {
115123
"X-Fern-Language": "JavaScript",
116124
"X-Fern-SDK-Name": "flagright",
117-
"X-Fern-SDK-Version": "1.8.60",
118-
"User-Agent": "flagright/1.8.60",
125+
"X-Fern-SDK-Version": "1.8.61",
126+
"User-Agent": "flagright/1.8.61",
119127
"X-Fern-Runtime": core.RUNTIME.type,
120128
"X-Fern-Runtime-Version": core.RUNTIME.version,
121129
...(await this._getCustomAuthorizationHeaders()),
@@ -131,7 +139,7 @@ export class BusinessUserEvents {
131139
});
132140
if (_response.ok) {
133141
return {
134-
data: serializers.BusinessWithRulesResult.parseOrThrow(_response.body, {
142+
data: serializers.BusinessUserEventsCreateResponse.parseOrThrow(_response.body, {
135143
unrecognizedObjectKeys: "passthrough",
136144
allowUnrecognizedUnionMembers: true,
137145
allowUnrecognizedEnumValues: true,
@@ -163,6 +171,16 @@ export class BusinessUserEvents {
163171
}),
164172
_response.rawResponse,
165173
);
174+
case 404:
175+
throw new Flagright.NotFoundError(
176+
serializers.ApiErrorResponse.parseOrThrow(_response.error.body, {
177+
unrecognizedObjectKeys: "passthrough",
178+
allowUnrecognizedUnionMembers: true,
179+
allowUnrecognizedEnumValues: true,
180+
breadcrumbsPrefix: ["response"],
181+
}),
182+
_response.rawResponse,
183+
);
166184
case 409:
167185
throw new Flagright.ConflictError(
168186
serializers.ApiErrorResponse.parseOrThrow(_response.error.body, {
@@ -245,8 +263,8 @@ export class BusinessUserEvents {
245263
headers: {
246264
"X-Fern-Language": "JavaScript",
247265
"X-Fern-SDK-Name": "flagright",
248-
"X-Fern-SDK-Version": "1.8.60",
249-
"User-Agent": "flagright/1.8.60",
266+
"X-Fern-SDK-Version": "1.8.61",
267+
"User-Agent": "flagright/1.8.61",
250268
"X-Fern-Runtime": core.RUNTIME.type,
251269
"X-Fern-Runtime-Version": core.RUNTIME.version,
252270
...(await this._getCustomAuthorizationHeaders()),

src/api/resources/businessUserEvents/client/requests/BusinessUserEventsCreateRequest.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import * as Flagright from "../../../../index";
1010
* allowUserTypeConversion: "true",
1111
* lockKycRiskLevel: "true",
1212
* lockCraRiskLevel: "true",
13+
* changeUserId: "true",
1314
* body: {
1415
* timestamp: 1.1,
1516
* userId: "userId"
@@ -29,5 +30,10 @@ export interface BusinessUserEventsCreateRequest {
2930
* Boolean string whether Flagright should lock the CRA risk level for the user.
3031
*/
3132
lockCraRiskLevel?: Flagright.BooleanString;
33+
/**
34+
* Boolean string whether Flagright should change userId of the user.
35+
* (Note: Only allowed for users with no associated transactions).
36+
*/
37+
changeUserId?: Flagright.BooleanString;
3238
body: Flagright.BusinessUserEvent;
3339
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
export * from "./types";
12
export * from "./client";
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
5+
import * as Flagright from "../../../index";
6+
7+
export interface BusinessUserEventsCreateResponse extends Flagright.BusinessWithRulesResult {
8+
message?: string;
9+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./BusinessUserEventsCreateResponse";

src/api/resources/businessUsers/client/Client.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ export class BusinessUsers {
116116
headers: {
117117
"X-Fern-Language": "JavaScript",
118118
"X-Fern-SDK-Name": "flagright",
119-
"X-Fern-SDK-Version": "1.8.60",
120-
"User-Agent": "flagright/1.8.60",
119+
"X-Fern-SDK-Version": "1.8.61",
120+
"User-Agent": "flagright/1.8.61",
121121
"X-Fern-Runtime": core.RUNTIME.type,
122122
"X-Fern-Runtime-Version": core.RUNTIME.version,
123123
...(await this._getCustomAuthorizationHeaders()),
@@ -240,8 +240,8 @@ export class BusinessUsers {
240240
headers: {
241241
"X-Fern-Language": "JavaScript",
242242
"X-Fern-SDK-Name": "flagright",
243-
"X-Fern-SDK-Version": "1.8.60",
244-
"User-Agent": "flagright/1.8.60",
243+
"X-Fern-SDK-Version": "1.8.61",
244+
"User-Agent": "flagright/1.8.61",
245245
"X-Fern-Runtime": core.RUNTIME.type,
246246
"X-Fern-Runtime-Version": core.RUNTIME.version,
247247
...(await this._getCustomAuthorizationHeaders()),

0 commit comments

Comments
 (0)