|
3 | 3 | InvertedIndexConfigUpdate, |
4 | 4 | MultiTenancyConfigCreate, |
5 | 5 | ReplicationConfigCreate, |
| 6 | + ReplicationConfigUpdate, |
| 7 | + ReplicationDeletionStrategy, |
6 | 8 | ShardingConfigCreate, |
7 | 9 | VectorConfigUpdate, |
8 | 10 | VectorIndexType, |
@@ -131,10 +133,19 @@ const configure = { |
131 | 133 | * See [the docs](https://weaviate.io/developers/weaviate/concepts/replication-architecture#replication-vs-sharding) for more details. |
132 | 134 | * |
133 | 135 | * @param {boolean} [options.asyncEnabled] Whether asynchronous replication is enabled. Default is false. |
| 136 | + * @param {ReplicationDeletionStrategy} [options.deletionStrategy] The deletion strategy when replication conflicts are detected between deletes and reads. |
134 | 137 | * @param {number} [options.factor] The replication factor. Default is 1. |
135 | 138 | */ |
136 | | - replication: (options: { asyncEnabled?: boolean; factor?: number }): ReplicationConfigCreate => { |
137 | | - return { asyncEnabled: options.asyncEnabled, factor: options.factor }; |
| 139 | + replication: (options: { |
| 140 | + asyncEnabled?: boolean; |
| 141 | + deletionStrategy?: ReplicationDeletionStrategy; |
| 142 | + factor?: number; |
| 143 | + }): ReplicationConfigCreate => { |
| 144 | + return { |
| 145 | + asyncEnabled: options.asyncEnabled, |
| 146 | + deletionStrategy: options.deletionStrategy, |
| 147 | + factor: options.factor, |
| 148 | + }; |
138 | 149 | }, |
139 | 150 | /** |
140 | 151 | * Create a `ShardingConfigCreate` object to be used when defining the sharding configuration of your collection. |
@@ -217,10 +228,19 @@ const reconfigure = { |
217 | 228 | * See [the docs](https://weaviate.io/developers/weaviate/concepts/replication-architecture#replication-vs-sharding) for more details. |
218 | 229 | * |
219 | 230 | * @param {boolean} [options.asyncEnabled] Whether asynchronous replication is enabled. |
| 231 | + * @param {ReplicationDeletionStrategy} [options.deletionStrategy] The deletion strategy when replication conflicts are detected between deletes and reads. |
220 | 232 | * @param {number} [options.factor] The replication factor. |
221 | 233 | */ |
222 | | - replication: (options: { asyncEnabled?: boolean; factor?: number }): ReplicationConfigCreate => { |
223 | | - return { asyncEnabled: options.asyncEnabled, factor: options.factor }; |
| 234 | + replication: (options: { |
| 235 | + asyncEnabled?: boolean; |
| 236 | + deletionStrategy?: ReplicationDeletionStrategy; |
| 237 | + factor?: number; |
| 238 | + }): ReplicationConfigUpdate => { |
| 239 | + return { |
| 240 | + asyncEnabled: options.asyncEnabled, |
| 241 | + deletionStrategy: options.deletionStrategy, |
| 242 | + factor: options.factor, |
| 243 | + }; |
224 | 244 | }, |
225 | 245 | }; |
226 | 246 |
|
|
0 commit comments