@flashbacktech/flashbackclient 0.1.45 → 0.1.46

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.
@@ -1,5 +1,5 @@
1
1
  import { ClientContext } from '.';
2
- import { Bucket, BucketCreateParams, BucketUpdateBasicParams, BucketUpdatePricingParams, BucketUpdateSLAParams } from '../models';
2
+ import { Bucket, BucketCreateParams, BucketUpdateBasicParams, BucketUpdateConditionsParams } from '../models';
3
3
  /**
4
4
  * Bucket operations client for FlashOnStellar V2
5
5
  * Implements all bucket-related contract methods
@@ -34,15 +34,7 @@ export declare class BucketOps {
34
34
  * @param params - Pricing update parameters
35
35
  * @returns Promise resolving to the update result
36
36
  */
37
- updateBucketPricing: (provider_id: string, bucket_id: number, params: BucketUpdatePricingParams) => Promise<void>;
38
- /**
39
- * Updates bucket SLA information
40
- * @param provider_id - Address of the provider owning the bucket
41
- * @param bucket_id - ID of the bucket to update
42
- * @param params - SLA update parameters
43
- * @returns Promise resolving to the update result
44
- */
45
- updateBucketSLA: (provider_id: string, bucket_id: number, params: BucketUpdateSLAParams) => Promise<void>;
37
+ updateBucketConditions: (provider_id: string, bucket_id: number, params: BucketUpdateConditionsParams) => Promise<void>;
46
38
  /**
47
39
  * Locks a bucket to prevent modifications during active deals
48
40
  * @param provider_id - Address of the provider owning the bucket
@@ -87,25 +87,11 @@ class BucketOps {
87
87
  * @param params - Pricing update parameters
88
88
  * @returns Promise resolving to the update result
89
89
  */
90
- this.updateBucketPricing = (0, decorator_1.withSignature)(async (provider_id, bucket_id, params) => {
91
- await (0, transaction_1.executeWalletTransaction)(this.context, provider_id, "update_bucket_pricing", [
90
+ this.updateBucketConditions = (0, decorator_1.withSignature)(async (provider_id, bucket_id, params) => {
91
+ await (0, transaction_1.executeWalletTransaction)(this.context, provider_id, "update_bucket_conditions", [
92
92
  { value: bucket_id, type: 'u32' },
93
93
  { value: params.price_per_gb_storage || null, type: 'u128' },
94
94
  { value: params.price_per_gb_egress || null, type: 'u128' },
95
- { value: params.max_storage_gb || null, type: 'u32' },
96
- { value: params.max_egress_gb || null, type: 'u32' }
97
- ]);
98
- });
99
- /**
100
- * Updates bucket SLA information
101
- * @param provider_id - Address of the provider owning the bucket
102
- * @param bucket_id - ID of the bucket to update
103
- * @param params - SLA update parameters
104
- * @returns Promise resolving to the update result
105
- */
106
- this.updateBucketSLA = (0, decorator_1.withSignature)(async (provider_id, bucket_id, params) => {
107
- await (0, transaction_1.executeWalletTransaction)(this.context, provider_id, "update_bucket_sla", [
108
- { value: bucket_id, type: 'u32' },
109
95
  { value: params.sla_avg_latency_ms || null, type: 'u32' },
110
96
  { value: params.sla_avg_uptime_pct || null, type: 'u32' }
111
97
  ]);
@@ -129,13 +129,9 @@ export interface BucketUpdateBasicParams {
129
129
  region?: string;
130
130
  country?: string;
131
131
  }
132
- export interface BucketUpdatePricingParams {
132
+ export interface BucketUpdateConditionsParams {
133
133
  price_per_gb_storage?: bigint;
134
134
  price_per_gb_egress?: bigint;
135
- max_storage_gb?: number;
136
- max_egress_gb?: number;
137
- }
138
- export interface BucketUpdateSLAParams {
139
135
  sla_avg_latency_ms?: number;
140
136
  sla_avg_uptime_pct?: number;
141
137
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flashbacktech/flashbackclient",
3
- "version": "0.1.45",
3
+ "version": "0.1.46",
4
4
  "type": "commonjs",
5
5
  "publishConfig": {
6
6
  "access": "public"