@@ -38,7 +38,7 @@ export class Wallet {
3838 Authorization : await this . _getAuthorizationHeader ( ) ,
3939 "X-Fern-Language" : "JavaScript" ,
4040 "X-Fern-SDK-Name" : "@syndicateio/syndicate-node" ,
41- "X-Fern-SDK-Version" : "0.0.428 " ,
41+ "X-Fern-SDK-Version" : "0.0.441 " ,
4242 } ,
4343 contentType : "application/json" ,
4444 body : await serializers . wallet . CreateWalletRequest . jsonOrThrow ( request , {
@@ -104,7 +104,7 @@ export class Wallet {
104104 Authorization : await this . _getAuthorizationHeader ( ) ,
105105 "X-Fern-Language" : "JavaScript" ,
106106 "X-Fern-SDK-Name" : "@syndicateio/syndicate-node" ,
107- "X-Fern-SDK-Version" : "0.0.428 " ,
107+ "X-Fern-SDK-Version" : "0.0.441 " ,
108108 } ,
109109 contentType : "application/json" ,
110110 body : await serializers . wallet . RetireWalletRequest . jsonOrThrow ( request , {
@@ -148,6 +148,65 @@ export class Wallet {
148148 }
149149 }
150150
151+ /**
152+ * Toggle a wallet's isActive status
153+ * @throws {@link Syndicate.wallet.WalletNotFoundError }
154+ */
155+ public async toggleIsActive (
156+ request : Syndicate . wallet . ToggleIsActiveRequest ,
157+ requestOptions ?: Wallet . RequestOptions
158+ ) : Promise < Syndicate . wallet . Wallet > {
159+ const _response = await core . fetcher ( {
160+ url : urlJoin ( environments . SyndicateEnvironment . Production , "/wallet/toggleIsActive" ) ,
161+ method : "POST" ,
162+ headers : {
163+ Authorization : await this . _getAuthorizationHeader ( ) ,
164+ "X-Fern-Language" : "JavaScript" ,
165+ "X-Fern-SDK-Name" : "@syndicateio/syndicate-node" ,
166+ "X-Fern-SDK-Version" : "0.0.441" ,
167+ } ,
168+ contentType : "application/json" ,
169+ body : await serializers . wallet . ToggleIsActiveRequest . jsonOrThrow ( request , {
170+ unrecognizedObjectKeys : "strip" ,
171+ } ) ,
172+ timeoutMs : requestOptions ?. timeoutInSeconds != null ? requestOptions . timeoutInSeconds * 1000 : 60000 ,
173+ } ) ;
174+ if ( _response . ok ) {
175+ return await serializers . wallet . Wallet . parseOrThrow ( _response . body , {
176+ unrecognizedObjectKeys : "passthrough" ,
177+ allowUnrecognizedUnionMembers : true ,
178+ allowUnrecognizedEnumValues : true ,
179+ breadcrumbsPrefix : [ "response" ] ,
180+ } ) ;
181+ }
182+
183+ if ( _response . error . reason === "status-code" ) {
184+ switch ( _response . error . statusCode ) {
185+ case 404 :
186+ throw new Syndicate . wallet . WalletNotFoundError ( ) ;
187+ default :
188+ throw new errors . SyndicateError ( {
189+ statusCode : _response . error . statusCode ,
190+ body : _response . error . body ,
191+ } ) ;
192+ }
193+ }
194+
195+ switch ( _response . error . reason ) {
196+ case "non-json" :
197+ throw new errors . SyndicateError ( {
198+ statusCode : _response . error . statusCode ,
199+ body : _response . error . rawBody ,
200+ } ) ;
201+ case "timeout" :
202+ throw new errors . SyndicateTimeoutError ( ) ;
203+ case "unknown" :
204+ throw new errors . SyndicateError ( {
205+ message : _response . error . errorMessage ,
206+ } ) ;
207+ }
208+ }
209+
151210 /**
152211 * Get a transaction request by id
153212 * @throws {@link Syndicate.wallet.TransactionNotFoundError }
@@ -167,7 +226,7 @@ export class Wallet {
167226 Authorization : await this . _getAuthorizationHeader ( ) ,
168227 "X-Fern-Language" : "JavaScript" ,
169228 "X-Fern-SDK-Name" : "@syndicateio/syndicate-node" ,
170- "X-Fern-SDK-Version" : "0.0.428 " ,
229+ "X-Fern-SDK-Version" : "0.0.441 " ,
171230 } ,
172231 contentType : "application/json" ,
173232 timeoutMs : requestOptions ?. timeoutInSeconds != null ? requestOptions . timeoutInSeconds * 1000 : 60000 ,
@@ -242,7 +301,7 @@ export class Wallet {
242301 Authorization : await this . _getAuthorizationHeader ( ) ,
243302 "X-Fern-Language" : "JavaScript" ,
244303 "X-Fern-SDK-Name" : "@syndicateio/syndicate-node" ,
245- "X-Fern-SDK-Version" : "0.0.428 " ,
304+ "X-Fern-SDK-Version" : "0.0.441 " ,
246305 } ,
247306 contentType : "application/json" ,
248307 queryParameters : _queryParams ,
@@ -306,7 +365,7 @@ export class Wallet {
306365 Authorization : await this . _getAuthorizationHeader ( ) ,
307366 "X-Fern-Language" : "JavaScript" ,
308367 "X-Fern-SDK-Name" : "@syndicateio/syndicate-node" ,
309- "X-Fern-SDK-Version" : "0.0.428 " ,
368+ "X-Fern-SDK-Version" : "0.0.441 " ,
310369 } ,
311370 contentType : "application/json" ,
312371 queryParameters : _queryParams ,
@@ -391,7 +450,7 @@ export class Wallet {
391450 Authorization : await this . _getAuthorizationHeader ( ) ,
392451 "X-Fern-Language" : "JavaScript" ,
393452 "X-Fern-SDK-Name" : "@syndicateio/syndicate-node" ,
394- "X-Fern-SDK-Version" : "0.0.428 " ,
453+ "X-Fern-SDK-Version" : "0.0.441 " ,
395454 } ,
396455 contentType : "application/json" ,
397456 queryParameters : _queryParams ,
@@ -442,7 +501,7 @@ export class Wallet {
442501 Authorization : await this . _getAuthorizationHeader ( ) ,
443502 "X-Fern-Language" : "JavaScript" ,
444503 "X-Fern-SDK-Name" : "@syndicateio/syndicate-node" ,
445- "X-Fern-SDK-Version" : "0.0.428 " ,
504+ "X-Fern-SDK-Version" : "0.0.441 " ,
446505 } ,
447506 contentType : "application/json" ,
448507 timeoutMs : requestOptions ?. timeoutInSeconds != null ? requestOptions . timeoutInSeconds * 1000 : 60000 ,
0 commit comments