@dynamic-labs/sdk-api-core 0.0.1107 → 0.0.1108

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-api-core",
3
- "version": "0.0.1107",
3
+ "version": "0.0.1108",
4
4
  "author": "Dynamic Labs",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
@@ -289,6 +289,7 @@ require('../models/WaasPolicyConstraintCondition.cjs');
289
289
  var WaasPolicyLayerResponse = require('../models/WaasPolicyLayerResponse.cjs');
290
290
  require('../models/WaasPolicyRuleType.cjs');
291
291
  var WaasPolicyLayerUpdateRequest = require('../models/WaasPolicyLayerUpdateRequest.cjs');
292
+ var WaasSignerPolicyLayerUpdateRequest = require('../models/WaasSignerPolicyLayerUpdateRequest.cjs');
292
293
  require('../models/WaasTransactionBroadcastSubmissionState.cjs');
293
294
  var WaasTransactionBroadcastRequest = require('../models/WaasTransactionBroadcastRequest.cjs');
294
295
  var WaasTransactionBroadcastResponse = require('../models/WaasTransactionBroadcastResponse.cjs');
@@ -5313,8 +5314,8 @@ class SDKApi extends runtime.BaseAPI {
5313
5314
  return await response.value();
5314
5315
  }
5315
5316
  /**
5316
- * Returns the Composition Layer content for the calling wallet\'s own active Signer without mutating it.
5317
- * Get the caller\'s own signer-Layer Rules
5317
+ * Returns the Composition Layer content for the calling wallet\'s own active Signer, or (given signerId) another share set of the same wallet — e.g. a delegated share set — without mutating it. Only the wallet\'s own owner may target another share set\'s signerId.
5318
+ * Get a signer-Layer\'s Rules
5318
5319
  */
5319
5320
  async getWaasSignerSelfPolicyLayerRaw(requestParameters, initOverrides) {
5320
5321
  if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
@@ -5324,6 +5325,9 @@ class SDKApi extends runtime.BaseAPI {
5324
5325
  throw new runtime.RequiredError('walletId', 'Required parameter requestParameters.walletId was null or undefined when calling getWaasSignerSelfPolicyLayer.');
5325
5326
  }
5326
5327
  const queryParameters = {};
5328
+ if (requestParameters.signerId !== undefined) {
5329
+ queryParameters['signerId'] = requestParameters.signerId;
5330
+ }
5327
5331
  const headerParameters = {};
5328
5332
  if (this.configuration && this.configuration.accessToken) {
5329
5333
  const token = this.configuration.accessToken;
@@ -5341,13 +5345,49 @@ class SDKApi extends runtime.BaseAPI {
5341
5345
  return new runtime.JSONApiResponse(response, (jsonValue) => WaasPolicyLayerResponse.WaasPolicyLayerResponseFromJSON(jsonValue));
5342
5346
  }
5343
5347
  /**
5344
- * Returns the Composition Layer content for the calling wallet\'s own active Signer without mutating it.
5345
- * Get the caller\'s own signer-Layer Rules
5348
+ * Returns the Composition Layer content for the calling wallet\'s own active Signer, or (given signerId) another share set of the same wallet — e.g. a delegated share set — without mutating it. Only the wallet\'s own owner may target another share set\'s signerId.
5349
+ * Get a signer-Layer\'s Rules
5346
5350
  */
5347
5351
  async getWaasSignerSelfPolicyLayer(requestParameters, initOverrides) {
5348
5352
  const response = await this.getWaasSignerSelfPolicyLayerRaw(requestParameters, initOverrides);
5349
5353
  return await response.value();
5350
5354
  }
5355
+ /**
5356
+ * Returns the Composition Layer content for the calling wallet\'s own wallet-Layer, without mutating it. Only the wallet\'s own owner may call this.
5357
+ * Get a wallet-Layer\'s Rules
5358
+ */
5359
+ async getWaasWalletSelfPolicyLayerRaw(requestParameters, initOverrides) {
5360
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
5361
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getWaasWalletSelfPolicyLayer.');
5362
+ }
5363
+ if (requestParameters.walletId === null || requestParameters.walletId === undefined) {
5364
+ throw new runtime.RequiredError('walletId', 'Required parameter requestParameters.walletId was null or undefined when calling getWaasWalletSelfPolicyLayer.');
5365
+ }
5366
+ const queryParameters = {};
5367
+ const headerParameters = {};
5368
+ if (this.configuration && this.configuration.accessToken) {
5369
+ const token = this.configuration.accessToken;
5370
+ const tokenString = await token("bearerAuth", []);
5371
+ if (tokenString) {
5372
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
5373
+ }
5374
+ }
5375
+ const response = await this.request({
5376
+ path: `/sdk/{environmentId}/waas/{walletId}/policy-layer`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"walletId"}}`, encodeURIComponent(String(requestParameters.walletId))),
5377
+ method: 'GET',
5378
+ headers: headerParameters,
5379
+ query: queryParameters,
5380
+ }, initOverrides);
5381
+ return new runtime.JSONApiResponse(response, (jsonValue) => WaasPolicyLayerResponse.WaasPolicyLayerResponseFromJSON(jsonValue));
5382
+ }
5383
+ /**
5384
+ * Returns the Composition Layer content for the calling wallet\'s own wallet-Layer, without mutating it. Only the wallet\'s own owner may call this.
5385
+ * Get a wallet-Layer\'s Rules
5386
+ */
5387
+ async getWaasWalletSelfPolicyLayer(requestParameters, initOverrides) {
5388
+ const response = await this.getWaasWalletSelfPolicyLayerRaw(requestParameters, initOverrides);
5389
+ return await response.value();
5390
+ }
5351
5391
  /**
5352
5392
  * Fetches a single WaaS wallet and returns it with the same payload structure as the users endpoint. This endpoint returns user information along with verified credentials filtered to only include the specified WaaS wallet.
5353
5393
  * Get a WAAS wallet by address
@@ -10586,8 +10626,8 @@ class SDKApi extends runtime.BaseAPI {
10586
10626
  await this.updateUserMfaDeviceRaw(requestParameters, initOverrides);
10587
10627
  }
10588
10628
  /**
10589
- * Applies a single per-Rule upsert or remove operation, restricted to Rules a dashboardAdmin granted to the calling wallet\'s own Signer.
10590
- * Loosen or remove a signer-managed default on the caller\'s own signer-Layer
10629
+ * Applies a single per-Rule upsert (create when ruleId is new, update when it already exists) or remove operation to the calling wallet\'s own signer-Layer, or (given signerId in the request body) another share set of the same wallet — e.g. a delegated share set. Only the wallet\'s own owner may target another share set\'s signerId. Field permissions, grant/authorship, and the remove-vs-marker decision are enforced by wallet-service, not this route.
10630
+ * Create, update, or remove a Rule on a signer-Layer
10591
10631
  */
10592
10632
  async updateWaasSignerSelfPolicyLayerRaw(requestParameters, initOverrides) {
10593
10633
  if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
@@ -10596,8 +10636,8 @@ class SDKApi extends runtime.BaseAPI {
10596
10636
  if (requestParameters.walletId === null || requestParameters.walletId === undefined) {
10597
10637
  throw new runtime.RequiredError('walletId', 'Required parameter requestParameters.walletId was null or undefined when calling updateWaasSignerSelfPolicyLayer.');
10598
10638
  }
10599
- if (requestParameters.waasPolicyLayerUpdateRequest === null || requestParameters.waasPolicyLayerUpdateRequest === undefined) {
10600
- throw new runtime.RequiredError('waasPolicyLayerUpdateRequest', 'Required parameter requestParameters.waasPolicyLayerUpdateRequest was null or undefined when calling updateWaasSignerSelfPolicyLayer.');
10639
+ if (requestParameters.waasSignerPolicyLayerUpdateRequest === null || requestParameters.waasSignerPolicyLayerUpdateRequest === undefined) {
10640
+ throw new runtime.RequiredError('waasSignerPolicyLayerUpdateRequest', 'Required parameter requestParameters.waasSignerPolicyLayerUpdateRequest was null or undefined when calling updateWaasSignerSelfPolicyLayer.');
10601
10641
  }
10602
10642
  const queryParameters = {};
10603
10643
  const headerParameters = {};
@@ -10614,18 +10654,59 @@ class SDKApi extends runtime.BaseAPI {
10614
10654
  method: 'PATCH',
10615
10655
  headers: headerParameters,
10616
10656
  query: queryParameters,
10617
- body: WaasPolicyLayerUpdateRequest.WaasPolicyLayerUpdateRequestToJSON(requestParameters.waasPolicyLayerUpdateRequest),
10657
+ body: WaasSignerPolicyLayerUpdateRequest.WaasSignerPolicyLayerUpdateRequestToJSON(requestParameters.waasSignerPolicyLayerUpdateRequest),
10618
10658
  }, initOverrides);
10619
10659
  return new runtime.JSONApiResponse(response, (jsonValue) => WaasPolicyLayerResponse.WaasPolicyLayerResponseFromJSON(jsonValue));
10620
10660
  }
10621
10661
  /**
10622
- * Applies a single per-Rule upsert or remove operation, restricted to Rules a dashboardAdmin granted to the calling wallet\'s own Signer.
10623
- * Loosen or remove a signer-managed default on the caller\'s own signer-Layer
10662
+ * Applies a single per-Rule upsert (create when ruleId is new, update when it already exists) or remove operation to the calling wallet\'s own signer-Layer, or (given signerId in the request body) another share set of the same wallet — e.g. a delegated share set. Only the wallet\'s own owner may target another share set\'s signerId. Field permissions, grant/authorship, and the remove-vs-marker decision are enforced by wallet-service, not this route.
10663
+ * Create, update, or remove a Rule on a signer-Layer
10624
10664
  */
10625
10665
  async updateWaasSignerSelfPolicyLayer(requestParameters, initOverrides) {
10626
10666
  const response = await this.updateWaasSignerSelfPolicyLayerRaw(requestParameters, initOverrides);
10627
10667
  return await response.value();
10628
10668
  }
10669
+ /**
10670
+ * Applies a single per-Rule upsert (create when ruleId is new, update when it already exists) or remove operation to the calling wallet\'s own wallet-Layer. Only the wallet\'s own owner may call this. Field permissions and the remove-vs-marker decision are enforced by wallet-service, not this route.
10671
+ * Create, update, or remove a Rule on a wallet-Layer
10672
+ */
10673
+ async updateWaasWalletSelfPolicyLayerRaw(requestParameters, initOverrides) {
10674
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
10675
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling updateWaasWalletSelfPolicyLayer.');
10676
+ }
10677
+ if (requestParameters.walletId === null || requestParameters.walletId === undefined) {
10678
+ throw new runtime.RequiredError('walletId', 'Required parameter requestParameters.walletId was null or undefined when calling updateWaasWalletSelfPolicyLayer.');
10679
+ }
10680
+ if (requestParameters.waasPolicyLayerUpdateRequest === null || requestParameters.waasPolicyLayerUpdateRequest === undefined) {
10681
+ throw new runtime.RequiredError('waasPolicyLayerUpdateRequest', 'Required parameter requestParameters.waasPolicyLayerUpdateRequest was null or undefined when calling updateWaasWalletSelfPolicyLayer.');
10682
+ }
10683
+ const queryParameters = {};
10684
+ const headerParameters = {};
10685
+ headerParameters['Content-Type'] = 'application/json';
10686
+ if (this.configuration && this.configuration.accessToken) {
10687
+ const token = this.configuration.accessToken;
10688
+ const tokenString = await token("bearerAuth", []);
10689
+ if (tokenString) {
10690
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
10691
+ }
10692
+ }
10693
+ const response = await this.request({
10694
+ path: `/sdk/{environmentId}/waas/{walletId}/policy-layer`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"walletId"}}`, encodeURIComponent(String(requestParameters.walletId))),
10695
+ method: 'PATCH',
10696
+ headers: headerParameters,
10697
+ query: queryParameters,
10698
+ body: WaasPolicyLayerUpdateRequest.WaasPolicyLayerUpdateRequestToJSON(requestParameters.waasPolicyLayerUpdateRequest),
10699
+ }, initOverrides);
10700
+ return new runtime.JSONApiResponse(response, (jsonValue) => WaasPolicyLayerResponse.WaasPolicyLayerResponseFromJSON(jsonValue));
10701
+ }
10702
+ /**
10703
+ * Applies a single per-Rule upsert (create when ruleId is new, update when it already exists) or remove operation to the calling wallet\'s own wallet-Layer. Only the wallet\'s own owner may call this. Field permissions and the remove-vs-marker decision are enforced by wallet-service, not this route.
10704
+ * Create, update, or remove a Rule on a wallet-Layer
10705
+ */
10706
+ async updateWaasWalletSelfPolicyLayer(requestParameters, initOverrides) {
10707
+ const response = await this.updateWaasWalletSelfPolicyLayerRaw(requestParameters, initOverrides);
10708
+ return await response.value();
10709
+ }
10629
10710
  /**
10630
10711
  * Updates the settings for a WAAS wallet
10631
10712
  * Update WAAS wallet settings
@@ -11236,6 +11317,32 @@ class SDKApi extends runtime.BaseAPI {
11236
11317
  async waasSignerSelfPolicyLayerOptions(requestParameters, initOverrides) {
11237
11318
  await this.waasSignerSelfPolicyLayerOptionsRaw(requestParameters, initOverrides);
11238
11319
  }
11320
+ /**
11321
+ * Options call for this endpoint
11322
+ */
11323
+ async waasWalletSelfPolicyLayerOptionsRaw(requestParameters, initOverrides) {
11324
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
11325
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling waasWalletSelfPolicyLayerOptions.');
11326
+ }
11327
+ if (requestParameters.walletId === null || requestParameters.walletId === undefined) {
11328
+ throw new runtime.RequiredError('walletId', 'Required parameter requestParameters.walletId was null or undefined when calling waasWalletSelfPolicyLayerOptions.');
11329
+ }
11330
+ const queryParameters = {};
11331
+ const headerParameters = {};
11332
+ const response = await this.request({
11333
+ path: `/sdk/{environmentId}/waas/{walletId}/policy-layer`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"walletId"}}`, encodeURIComponent(String(requestParameters.walletId))),
11334
+ method: 'OPTIONS',
11335
+ headers: headerParameters,
11336
+ query: queryParameters,
11337
+ }, initOverrides);
11338
+ return new runtime.VoidApiResponse(response);
11339
+ }
11340
+ /**
11341
+ * Options call for this endpoint
11342
+ */
11343
+ async waasWalletSelfPolicyLayerOptions(requestParameters, initOverrides) {
11344
+ await this.waasWalletSelfPolicyLayerOptionsRaw(requestParameters, initOverrides);
11345
+ }
11239
11346
  /**
11240
11347
  * Options call for this endpoint
11241
11348
  */