@twin.org/entity-storage-rest-client 0.0.3-next.8 → 0.9.0-next.1

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.
@@ -28,28 +28,45 @@ export class EntityStorageRestClient extends BaseRestClient {
28
28
  /**
29
29
  * Set an entity.
30
30
  * @param entity The entity to set.
31
+ * @param conditions The optional conditions to match for the entities.
31
32
  * @returns The id of the entity.
32
33
  */
33
- async set(entity) {
34
+ async set(entity, conditions) {
34
35
  Guards.object(EntityStorageRestClient.CLASS_NAME, "entity", entity);
35
36
  await this.fetch("/", "POST", {
36
- body: entity
37
+ body: entity,
38
+ query: {
39
+ conditions: HttpParameterHelper.objectToString(conditions)
40
+ }
41
+ });
42
+ }
43
+ /**
44
+ * Set multiple entities in a batch.
45
+ * @param entities The entities to set.
46
+ * @returns Nothing.
47
+ */
48
+ async setBatch(entities) {
49
+ Guards.arrayValue(EntityStorageRestClient.CLASS_NAME, "entities", entities);
50
+ await this.fetch("/batch", "POST", {
51
+ body: entities
37
52
  });
38
53
  }
39
54
  /**
40
55
  * Get an entity.
41
56
  * @param id The id of the entity to get, or the index value if secondaryIndex is set.
42
57
  * @param secondaryIndex Get the item using a secondary index.
58
+ * @param conditions The optional conditions to match for the entities.
43
59
  * @returns The object if it can be found or undefined.
44
60
  */
45
- async get(id, secondaryIndex) {
61
+ async get(id, secondaryIndex, conditions) {
46
62
  Guards.stringValue(EntityStorageRestClient.CLASS_NAME, "id", id);
47
63
  const response = await this.fetch("/:id", "GET", {
48
64
  pathParams: {
49
65
  id
50
66
  },
51
67
  query: {
52
- secondaryIndex: secondaryIndex
68
+ secondaryIndex: secondaryIndex,
69
+ conditions: HttpParameterHelper.objectToString(conditions)
53
70
  }
54
71
  });
55
72
  return response.body;
@@ -57,15 +74,50 @@ export class EntityStorageRestClient extends BaseRestClient {
57
74
  /**
58
75
  * Remove the entity.
59
76
  * @param id The id of the entity to remove.
77
+ * @param conditions The optional conditions to match for the entities.
60
78
  * @returns Nothing.
61
79
  */
62
- async remove(id) {
80
+ async remove(id, conditions) {
63
81
  Guards.stringValue(EntityStorageRestClient.CLASS_NAME, "id", id);
64
82
  await this.fetch("/:id", "DELETE", {
65
83
  pathParams: {
66
84
  id
85
+ },
86
+ query: {
87
+ conditions: HttpParameterHelper.objectToString(conditions)
88
+ }
89
+ });
90
+ }
91
+ /**
92
+ * Remove multiple entities by id.
93
+ * @param ids The ids of the entities to remove.
94
+ * @returns Nothing.
95
+ */
96
+ async removeBatch(ids) {
97
+ Guards.arrayValue(EntityStorageRestClient.CLASS_NAME, "ids", ids);
98
+ await this.fetch("/batch", "DELETE", {
99
+ body: ids
100
+ });
101
+ }
102
+ /**
103
+ * Remove all entities from the storage.
104
+ * @returns Nothing.
105
+ */
106
+ async empty() {
107
+ await this.fetch("/", "DELETE", {});
108
+ }
109
+ /**
110
+ * Count all the entities which match the conditions.
111
+ * @param conditions The optional conditions to match for the entities.
112
+ * @returns The total count of entities in the storage.
113
+ */
114
+ async count(conditions) {
115
+ const result = await this.fetch("/count", "GET", {
116
+ query: {
117
+ conditions: HttpParameterHelper.objectToString(conditions)
67
118
  }
68
119
  });
120
+ return result.body.count;
69
121
  }
70
122
  /**
71
123
  * Query all the entities which match the conditions.
@@ -1 +1 @@
1
- {"version":3,"file":"entityStorageRestClient.js","sourceRoot":"","sources":["../../src/entityStorageRestClient.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EACN,mBAAmB,EAGnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAahD;;GAEG;AACH,MAAM,OAAO,uBACZ,SAAQ,cAAc;IAGtB;;OAEG;IACI,MAAM,CAAU,UAAU,6BAAsD;IAEvF;;;OAGG;IACH,YAAY,MAA6B;QACxC,KAAK,4BAAuC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACvE,CAAC;IAED;;;OAGG;IACI,SAAS;QACf,OAAO,uBAAuB,CAAC,UAAU,CAAC;IAC3C,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,GAAG,CAAC,MAAS;QACzB,MAAM,CAAC,MAAM,CAAC,uBAAuB,CAAC,UAAU,YAAkB,MAAM,CAAC,CAAC;QAE1E,MAAM,IAAI,CAAC,KAAK,CAA+C,GAAG,EAAE,MAAM,EAAE;YAC3E,IAAI,EAAE,MAAM;SACZ,CAAC,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,GAAG,CAAC,EAAU,EAAE,cAAwB;QACpD,MAAM,CAAC,WAAW,CAAC,uBAAuB,CAAC,UAAU,QAAc,EAAE,CAAC,CAAC;QAEvE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAChC,MAAM,EACN,KAAK,EACL;YACC,UAAU,EAAE;gBACX,EAAE;aACF;YACD,KAAK,EAAE;gBACN,cAAc,EAAE,cAAwB;aACxC;SACD,CACD,CAAC;QAEF,OAAO,QAAQ,CAAC,IAAS,CAAC;IAC3B,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,MAAM,CAAC,EAAU;QAC7B,MAAM,CAAC,WAAW,CAAC,uBAAuB,CAAC,UAAU,QAAc,EAAE,CAAC,CAAC;QAEvE,MAAM,IAAI,CAAC,KAAK,CAAkD,MAAM,EAAE,QAAQ,EAAE;YACnF,UAAU,EAAE;gBACX,EAAE;aACF;SACD,CAAC,CAAC;IACJ,CAAC;IAED;;;;;;;;;;OAUG;IACI,KAAK,CAAC,KAAK,CACjB,UAA+B,EAC/B,OAAiB,EACjB,gBAAgC,EAChC,UAAwB,EACxB,MAAe,EACf,KAAc;QAWd,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAC9B,GAAG,EACH,KAAK,EACL;YACC,KAAK,EAAE;gBACN,UAAU,EAAE,mBAAmB,CAAC,cAAc,CAAC,UAAU,CAAC;gBAC1D,OAAO,EAAE,OAAiB;gBAC1B,gBAAgB;gBAChB,UAAU,EAAE,mBAAmB,CAAC,aAAa,CAAC,UAAU,CAAC;gBACzD,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;gBAC3B,MAAM;aACN;SACD,CACD,CAAC;QAEF,OAAO;YACN,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,QAAwB;YAC9C,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM;SAC1B,CAAC;IACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { BaseRestClient } from \"@twin.org/api-core\";\nimport {\n\tHttpParameterHelper,\n\ttype IBaseRestClientConfig,\n\ttype INoContentResponse\n} from \"@twin.org/api-models\";\nimport { Coerce, Guards } from \"@twin.org/core\";\nimport type { EntityCondition, SortDirection } from \"@twin.org/entity\";\nimport type {\n\tIEntityStorageComponent,\n\tIEntityStorageGetRequest,\n\tIEntityStorageGetResponse,\n\tIEntityStorageListRequest,\n\tIEntityStorageListResponse,\n\tIEntityStorageRemoveRequest,\n\tIEntityStorageSetRequest\n} from \"@twin.org/entity-storage-models\";\nimport { nameof } from \"@twin.org/nameof\";\n\n/**\n * Client for performing entity storage through to REST endpoints.\n */\nexport class EntityStorageRestClient<T>\n\textends BaseRestClient\n\timplements IEntityStorageComponent<T>\n{\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = nameof<EntityStorageRestClient<unknown>>();\n\n\t/**\n\t * Create a new instance of EntityStorageRestClient.\n\t * @param config The configuration for the client.\n\t */\n\tconstructor(config: IBaseRestClientConfig) {\n\t\tsuper(nameof<EntityStorageRestClient<T>>(), config, \"entity-storage\");\n\t}\n\n\t/**\n\t * Returns the class name of the component.\n\t * @returns The class name of the component.\n\t */\n\tpublic className(): string {\n\t\treturn EntityStorageRestClient.CLASS_NAME;\n\t}\n\n\t/**\n\t * Set an entity.\n\t * @param entity The entity to set.\n\t * @returns The id of the entity.\n\t */\n\tpublic async set(entity: T): Promise<void> {\n\t\tGuards.object(EntityStorageRestClient.CLASS_NAME, nameof(entity), entity);\n\n\t\tawait this.fetch<IEntityStorageSetRequest, INoContentResponse>(\"/\", \"POST\", {\n\t\t\tbody: entity\n\t\t});\n\t}\n\n\t/**\n\t * Get an entity.\n\t * @param id The id of the entity to get, or the index value if secondaryIndex is set.\n\t * @param secondaryIndex Get the item using a secondary index.\n\t * @returns The object if it can be found or undefined.\n\t */\n\tpublic async get(id: string, secondaryIndex?: keyof T): Promise<T | undefined> {\n\t\tGuards.stringValue(EntityStorageRestClient.CLASS_NAME, nameof(id), id);\n\n\t\tconst response = await this.fetch<IEntityStorageGetRequest, IEntityStorageGetResponse>(\n\t\t\t\"/:id\",\n\t\t\t\"GET\",\n\t\t\t{\n\t\t\t\tpathParams: {\n\t\t\t\t\tid\n\t\t\t\t},\n\t\t\t\tquery: {\n\t\t\t\t\tsecondaryIndex: secondaryIndex as string\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\treturn response.body as T;\n\t}\n\n\t/**\n\t * Remove the entity.\n\t * @param id The id of the entity to remove.\n\t * @returns Nothing.\n\t */\n\tpublic async remove(id: string): Promise<void> {\n\t\tGuards.stringValue(EntityStorageRestClient.CLASS_NAME, nameof(id), id);\n\n\t\tawait this.fetch<IEntityStorageRemoveRequest, INoContentResponse>(\"/:id\", \"DELETE\", {\n\t\t\tpathParams: {\n\t\t\t\tid\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Query all the entities which match the conditions.\n\t * @param conditions The conditions to match for the entities.\n\t * @param orderBy The order for the results.\n\t * @param orderByDirection The direction for the order, defaults to ascending.\n\t * @param properties The optional properties to return, defaults to all.\n\t * @param cursor The cursor to request the next chunk of entities.\n\t * @param limit The suggested number of entities to return in each chunk, in some scenarios can return a different amount.\n\t * @returns All the entities for the storage matching the conditions,\n\t * and a cursor which can be used to request more entities.\n\t */\n\tpublic async query(\n\t\tconditions?: EntityCondition<T>,\n\t\torderBy?: keyof T,\n\t\torderByDirection?: SortDirection,\n\t\tproperties?: (keyof T)[],\n\t\tcursor?: string,\n\t\tlimit?: number\n\t): Promise<{\n\t\t/**\n\t\t * The entities, which can be partial if a limited keys list was provided.\n\t\t */\n\t\tentities: Partial<T>[];\n\t\t/**\n\t\t * An optional cursor, when defined can be used to call find to get more entities.\n\t\t */\n\t\tcursor?: string;\n\t}> {\n\t\tconst result = await this.fetch<IEntityStorageListRequest, IEntityStorageListResponse>(\n\t\t\t\"/\",\n\t\t\t\"GET\",\n\t\t\t{\n\t\t\t\tquery: {\n\t\t\t\t\tconditions: HttpParameterHelper.objectToString(conditions),\n\t\t\t\t\torderBy: orderBy as string,\n\t\t\t\t\torderByDirection,\n\t\t\t\t\tproperties: HttpParameterHelper.arrayToString(properties),\n\t\t\t\t\tlimit: Coerce.string(limit),\n\t\t\t\t\tcursor\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\treturn {\n\t\t\tentities: result.body.entities as Partial<T>[],\n\t\t\tcursor: result.body.cursor\n\t\t};\n\t}\n}\n"]}
1
+ {"version":3,"file":"entityStorageRestClient.js","sourceRoot":"","sources":["../../src/entityStorageRestClient.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EACN,mBAAmB,EAGnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAkBhD;;GAEG;AACH,MAAM,OAAO,uBACZ,SAAQ,cAAc;IAGtB;;OAEG;IACI,MAAM,CAAU,UAAU,6BAAsD;IAEvF;;;OAGG;IACH,YAAY,MAA6B;QACxC,KAAK,4BAAuC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACvE,CAAC;IAED;;;OAGG;IACI,SAAS;QACf,OAAO,uBAAuB,CAAC,UAAU,CAAC;IAC3C,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,GAAG,CAAC,MAAS,EAAE,UAAoD;QAC/E,MAAM,CAAC,MAAM,CAAC,uBAAuB,CAAC,UAAU,YAAkB,MAAM,CAAC,CAAC;QAE1E,MAAM,IAAI,CAAC,KAAK,CAA+C,GAAG,EAAE,MAAM,EAAE;YAC3E,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE;gBACN,UAAU,EAAE,mBAAmB,CAAC,cAAc,CAAC,UAAU,CAAC;aAC1D;SACD,CAAC,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,QAAQ,CAAC,QAAa;QAClC,MAAM,CAAC,UAAU,CAAC,uBAAuB,CAAC,UAAU,cAAoB,QAAQ,CAAC,CAAC;QAElF,MAAM,IAAI,CAAC,KAAK,CAAoD,QAAQ,EAAE,MAAM,EAAE;YACrF,IAAI,EAAE,QAAQ;SACd,CAAC,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,GAAG,CACf,EAAU,EACV,cAAwB,EACxB,UAAoD;QAEpD,MAAM,CAAC,WAAW,CAAC,uBAAuB,CAAC,UAAU,QAAc,EAAE,CAAC,CAAC;QAEvE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAChC,MAAM,EACN,KAAK,EACL;YACC,UAAU,EAAE;gBACX,EAAE;aACF;YACD,KAAK,EAAE;gBACN,cAAc,EAAE,cAAwB;gBACxC,UAAU,EAAE,mBAAmB,CAAC,cAAc,CAAC,UAAU,CAAC;aAC1D;SACD,CACD,CAAC;QAEF,OAAO,QAAQ,CAAC,IAAS,CAAC;IAC3B,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,MAAM,CAClB,EAAU,EACV,UAAoD;QAEpD,MAAM,CAAC,WAAW,CAAC,uBAAuB,CAAC,UAAU,QAAc,EAAE,CAAC,CAAC;QAEvE,MAAM,IAAI,CAAC,KAAK,CAAkD,MAAM,EAAE,QAAQ,EAAE;YACnF,UAAU,EAAE;gBACX,EAAE;aACF;YACD,KAAK,EAAE;gBACN,UAAU,EAAE,mBAAmB,CAAC,cAAc,CAAC,UAAU,CAAC;aAC1D;SACD,CAAC,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,WAAW,CAAC,GAAa;QACrC,MAAM,CAAC,UAAU,CAAC,uBAAuB,CAAC,UAAU,SAAe,GAAG,CAAC,CAAC;QAExE,MAAM,IAAI,CAAC,KAAK,CAAuD,QAAQ,EAAE,QAAQ,EAAE;YAC1F,IAAI,EAAE,GAAG;SACT,CAAC,CAAC;IACJ,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,KAAK;QACjB,MAAM,IAAI,CAAC,KAAK,CAAiD,GAAG,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;IACrF,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,KAAK,CAAC,UAA+B;QACjD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAC9B,QAAQ,EACR,KAAK,EACL;YACC,KAAK,EAAE;gBACN,UAAU,EAAE,mBAAmB,CAAC,cAAc,CAAC,UAAU,CAAC;aAC1D;SACD,CACD,CAAC;QACF,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;IAC1B,CAAC;IAED;;;;;;;;;;OAUG;IACI,KAAK,CAAC,KAAK,CACjB,UAA+B,EAC/B,OAAiB,EACjB,gBAAgC,EAChC,UAAwB,EACxB,MAAe,EACf,KAAc;QAWd,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAC9B,GAAG,EACH,KAAK,EACL;YACC,KAAK,EAAE;gBACN,UAAU,EAAE,mBAAmB,CAAC,cAAc,CAAC,UAAU,CAAC;gBAC1D,OAAO,EAAE,OAAiB;gBAC1B,gBAAgB;gBAChB,UAAU,EAAE,mBAAmB,CAAC,aAAa,CAAC,UAAU,CAAC;gBACzD,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;gBAC3B,MAAM;aACN;SACD,CACD,CAAC;QAEF,OAAO;YACN,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,QAAwB;YAC9C,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM;SAC1B,CAAC;IACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { BaseRestClient } from \"@twin.org/api-core\";\nimport {\n\tHttpParameterHelper,\n\ttype IBaseRestClientConfig,\n\ttype INoContentResponse\n} from \"@twin.org/api-models\";\nimport { Coerce, Guards } from \"@twin.org/core\";\nimport type { EntityCondition, SortDirection } from \"@twin.org/entity\";\nimport type {\n\tIEntityStorageComponent,\n\tIEntityStorageCountRequest,\n\tIEntityStorageCountResponse,\n\tIEntityStorageEmptyRequest,\n\tIEntityStorageGetRequest,\n\tIEntityStorageGetResponse,\n\tIEntityStorageListRequest,\n\tIEntityStorageListResponse,\n\tIEntityStorageRemoveBatchRequest,\n\tIEntityStorageRemoveRequest,\n\tIEntityStorageSetBatchRequest,\n\tIEntityStorageSetRequest\n} from \"@twin.org/entity-storage-models\";\nimport { nameof } from \"@twin.org/nameof\";\n\n/**\n * Client for performing entity storage through to REST endpoints.\n */\nexport class EntityStorageRestClient<T>\n\textends BaseRestClient\n\timplements IEntityStorageComponent<T>\n{\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = nameof<EntityStorageRestClient<unknown>>();\n\n\t/**\n\t * Create a new instance of EntityStorageRestClient.\n\t * @param config The configuration for the client.\n\t */\n\tconstructor(config: IBaseRestClientConfig) {\n\t\tsuper(nameof<EntityStorageRestClient<T>>(), config, \"entity-storage\");\n\t}\n\n\t/**\n\t * Returns the class name of the component.\n\t * @returns The class name of the component.\n\t */\n\tpublic className(): string {\n\t\treturn EntityStorageRestClient.CLASS_NAME;\n\t}\n\n\t/**\n\t * Set an entity.\n\t * @param entity The entity to set.\n\t * @param conditions The optional conditions to match for the entities.\n\t * @returns The id of the entity.\n\t */\n\tpublic async set(entity: T, conditions?: { property: keyof T; value: unknown }[]): Promise<void> {\n\t\tGuards.object(EntityStorageRestClient.CLASS_NAME, nameof(entity), entity);\n\n\t\tawait this.fetch<IEntityStorageSetRequest, INoContentResponse>(\"/\", \"POST\", {\n\t\t\tbody: entity,\n\t\t\tquery: {\n\t\t\t\tconditions: HttpParameterHelper.objectToString(conditions)\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Set multiple entities in a batch.\n\t * @param entities The entities to set.\n\t * @returns Nothing.\n\t */\n\tpublic async setBatch(entities: T[]): Promise<void> {\n\t\tGuards.arrayValue(EntityStorageRestClient.CLASS_NAME, nameof(entities), entities);\n\n\t\tawait this.fetch<IEntityStorageSetBatchRequest, INoContentResponse>(\"/batch\", \"POST\", {\n\t\t\tbody: entities\n\t\t});\n\t}\n\n\t/**\n\t * Get an entity.\n\t * @param id The id of the entity to get, or the index value if secondaryIndex is set.\n\t * @param secondaryIndex Get the item using a secondary index.\n\t * @param conditions The optional conditions to match for the entities.\n\t * @returns The object if it can be found or undefined.\n\t */\n\tpublic async get(\n\t\tid: string,\n\t\tsecondaryIndex?: keyof T,\n\t\tconditions?: { property: keyof T; value: unknown }[]\n\t): Promise<T | undefined> {\n\t\tGuards.stringValue(EntityStorageRestClient.CLASS_NAME, nameof(id), id);\n\n\t\tconst response = await this.fetch<IEntityStorageGetRequest, IEntityStorageGetResponse>(\n\t\t\t\"/:id\",\n\t\t\t\"GET\",\n\t\t\t{\n\t\t\t\tpathParams: {\n\t\t\t\t\tid\n\t\t\t\t},\n\t\t\t\tquery: {\n\t\t\t\t\tsecondaryIndex: secondaryIndex as string,\n\t\t\t\t\tconditions: HttpParameterHelper.objectToString(conditions)\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\treturn response.body as T;\n\t}\n\n\t/**\n\t * Remove the entity.\n\t * @param id The id of the entity to remove.\n\t * @param conditions The optional conditions to match for the entities.\n\t * @returns Nothing.\n\t */\n\tpublic async remove(\n\t\tid: string,\n\t\tconditions?: { property: keyof T; value: unknown }[]\n\t): Promise<void> {\n\t\tGuards.stringValue(EntityStorageRestClient.CLASS_NAME, nameof(id), id);\n\n\t\tawait this.fetch<IEntityStorageRemoveRequest, INoContentResponse>(\"/:id\", \"DELETE\", {\n\t\t\tpathParams: {\n\t\t\t\tid\n\t\t\t},\n\t\t\tquery: {\n\t\t\t\tconditions: HttpParameterHelper.objectToString(conditions)\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Remove multiple entities by id.\n\t * @param ids The ids of the entities to remove.\n\t * @returns Nothing.\n\t */\n\tpublic async removeBatch(ids: string[]): Promise<void> {\n\t\tGuards.arrayValue(EntityStorageRestClient.CLASS_NAME, nameof(ids), ids);\n\n\t\tawait this.fetch<IEntityStorageRemoveBatchRequest, INoContentResponse>(\"/batch\", \"DELETE\", {\n\t\t\tbody: ids\n\t\t});\n\t}\n\n\t/**\n\t * Remove all entities from the storage.\n\t * @returns Nothing.\n\t */\n\tpublic async empty(): Promise<void> {\n\t\tawait this.fetch<IEntityStorageEmptyRequest, INoContentResponse>(\"/\", \"DELETE\", {});\n\t}\n\n\t/**\n\t * Count all the entities which match the conditions.\n\t * @param conditions The optional conditions to match for the entities.\n\t * @returns The total count of entities in the storage.\n\t */\n\tpublic async count(conditions?: EntityCondition<T>): Promise<number> {\n\t\tconst result = await this.fetch<IEntityStorageCountRequest, IEntityStorageCountResponse>(\n\t\t\t\"/count\",\n\t\t\t\"GET\",\n\t\t\t{\n\t\t\t\tquery: {\n\t\t\t\t\tconditions: HttpParameterHelper.objectToString(conditions)\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t\treturn result.body.count;\n\t}\n\n\t/**\n\t * Query all the entities which match the conditions.\n\t * @param conditions The conditions to match for the entities.\n\t * @param orderBy The order for the results.\n\t * @param orderByDirection The direction for the order, defaults to ascending.\n\t * @param properties The optional properties to return, defaults to all.\n\t * @param cursor The cursor to request the next chunk of entities.\n\t * @param limit The suggested number of entities to return in each chunk, in some scenarios can return a different amount.\n\t * @returns All the entities for the storage matching the conditions,\n\t * and a cursor which can be used to request more entities.\n\t */\n\tpublic async query(\n\t\tconditions?: EntityCondition<T>,\n\t\torderBy?: keyof T,\n\t\torderByDirection?: SortDirection,\n\t\tproperties?: (keyof T)[],\n\t\tcursor?: string,\n\t\tlimit?: number\n\t): Promise<{\n\t\t/**\n\t\t * The entities, which can be partial if a limited keys list was provided.\n\t\t */\n\t\tentities: Partial<T>[];\n\t\t/**\n\t\t * An optional cursor, when defined can be used to call find to get more entities.\n\t\t */\n\t\tcursor?: string;\n\t}> {\n\t\tconst result = await this.fetch<IEntityStorageListRequest, IEntityStorageListResponse>(\n\t\t\t\"/\",\n\t\t\t\"GET\",\n\t\t\t{\n\t\t\t\tquery: {\n\t\t\t\t\tconditions: HttpParameterHelper.objectToString(conditions),\n\t\t\t\t\torderBy: orderBy as string,\n\t\t\t\t\torderByDirection,\n\t\t\t\t\tproperties: HttpParameterHelper.arrayToString(properties),\n\t\t\t\t\tlimit: Coerce.string(limit),\n\t\t\t\t\tcursor\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\treturn {\n\t\t\tentities: result.body.entities as Partial<T>[],\n\t\t\tcursor: result.body.cursor\n\t\t};\n\t}\n}\n"]}
@@ -23,22 +23,57 @@ export declare class EntityStorageRestClient<T> extends BaseRestClient implement
23
23
  /**
24
24
  * Set an entity.
25
25
  * @param entity The entity to set.
26
+ * @param conditions The optional conditions to match for the entities.
26
27
  * @returns The id of the entity.
27
28
  */
28
- set(entity: T): Promise<void>;
29
+ set(entity: T, conditions?: {
30
+ property: keyof T;
31
+ value: unknown;
32
+ }[]): Promise<void>;
33
+ /**
34
+ * Set multiple entities in a batch.
35
+ * @param entities The entities to set.
36
+ * @returns Nothing.
37
+ */
38
+ setBatch(entities: T[]): Promise<void>;
29
39
  /**
30
40
  * Get an entity.
31
41
  * @param id The id of the entity to get, or the index value if secondaryIndex is set.
32
42
  * @param secondaryIndex Get the item using a secondary index.
43
+ * @param conditions The optional conditions to match for the entities.
33
44
  * @returns The object if it can be found or undefined.
34
45
  */
35
- get(id: string, secondaryIndex?: keyof T): Promise<T | undefined>;
46
+ get(id: string, secondaryIndex?: keyof T, conditions?: {
47
+ property: keyof T;
48
+ value: unknown;
49
+ }[]): Promise<T | undefined>;
36
50
  /**
37
51
  * Remove the entity.
38
52
  * @param id The id of the entity to remove.
53
+ * @param conditions The optional conditions to match for the entities.
54
+ * @returns Nothing.
55
+ */
56
+ remove(id: string, conditions?: {
57
+ property: keyof T;
58
+ value: unknown;
59
+ }[]): Promise<void>;
60
+ /**
61
+ * Remove multiple entities by id.
62
+ * @param ids The ids of the entities to remove.
39
63
  * @returns Nothing.
40
64
  */
41
- remove(id: string): Promise<void>;
65
+ removeBatch(ids: string[]): Promise<void>;
66
+ /**
67
+ * Remove all entities from the storage.
68
+ * @returns Nothing.
69
+ */
70
+ empty(): Promise<void>;
71
+ /**
72
+ * Count all the entities which match the conditions.
73
+ * @param conditions The optional conditions to match for the entities.
74
+ * @returns The total count of entities in the storage.
75
+ */
76
+ count(conditions?: EntityCondition<T>): Promise<number>;
42
77
  /**
43
78
  * Query all the entities which match the conditions.
44
79
  * @param conditions The conditions to match for the entities.
package/docs/changelog.md CHANGED
@@ -1,6 +1,440 @@
1
1
  # Changelog
2
2
 
3
- ## [0.0.3-next.8](https://github.com/twinfoundation/entity-storage/compare/entity-storage-rest-client-v0.0.3-next.7...entity-storage-rest-client-v0.0.3-next.8) (2026-03-20)
3
+ ## [0.9.0-next.1](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.9.0-next.0...entity-storage-rest-client-v0.9.0-next.1) (2026-06-23)
4
+
5
+
6
+ ### Features
7
+
8
+ * add context id features ([#55](https://github.com/iotaledger/twin-entity-storage/issues/55)) ([99c15a2](https://github.com/iotaledger/twin-entity-storage/commit/99c15a257539b61d9da63649ce573ebf47699fc9))
9
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
10
+ * add validate-locales ([e66ef0d](https://github.com/iotaledger/twin-entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
11
+ * adding schema migration functionality to all the connectors ([#85](https://github.com/iotaledger/twin-entity-storage/issues/85)) ([fd1555a](https://github.com/iotaledger/twin-entity-storage/commit/fd1555a34380158214a577586dafae821e72a578))
12
+ * entity storage enhancements ([#86](https://github.com/iotaledger/twin-entity-storage/issues/86)) ([1279af4](https://github.com/iotaledger/twin-entity-storage/commit/1279af42615c6497bb06539842cee44842dd1f75))
13
+ * eslint migration to flat config ([f033b64](https://github.com/iotaledger/twin-entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
14
+ * typescript 6 update ([995a0c6](https://github.com/iotaledger/twin-entity-storage/commit/995a0c6fa9a6813bfdc7200779ce3664236e59e9))
15
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
16
+ * update framework core ([b59a380](https://github.com/iotaledger/twin-entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
17
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
23
+
24
+
25
+ ### Dependencies
26
+
27
+ * The following workspace dependencies were updated
28
+ * dependencies
29
+ * @twin.org/entity-storage-models bumped from 0.9.0-next.0 to 0.9.0-next.1
30
+
31
+ ## [0.0.3-next.33](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.32...entity-storage-rest-client-v0.0.3-next.33) (2026-06-19)
32
+
33
+
34
+ ### Miscellaneous Chores
35
+
36
+ * **entity-storage-rest-client:** Synchronize repo versions
37
+
38
+
39
+ ### Dependencies
40
+
41
+ * The following workspace dependencies were updated
42
+ * dependencies
43
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.32 to 0.0.3-next.33
44
+
45
+ ## [0.0.3-next.32](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.31...entity-storage-rest-client-v0.0.3-next.32) (2026-06-16)
46
+
47
+
48
+ ### Miscellaneous Chores
49
+
50
+ * **entity-storage-rest-client:** Synchronize repo versions
51
+
52
+
53
+ ### Dependencies
54
+
55
+ * The following workspace dependencies were updated
56
+ * dependencies
57
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.31 to 0.0.3-next.32
58
+
59
+ ## [0.0.3-next.31](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.30...entity-storage-rest-client-v0.0.3-next.31) (2026-06-15)
60
+
61
+
62
+ ### Miscellaneous Chores
63
+
64
+ * **entity-storage-rest-client:** Synchronize repo versions
65
+
66
+
67
+ ### Dependencies
68
+
69
+ * The following workspace dependencies were updated
70
+ * dependencies
71
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.30 to 0.0.3-next.31
72
+
73
+ ## [0.0.3-next.30](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.29...entity-storage-rest-client-v0.0.3-next.30) (2026-06-15)
74
+
75
+
76
+ ### Features
77
+
78
+ * add context id features ([#55](https://github.com/iotaledger/twin-entity-storage/issues/55)) ([99c15a2](https://github.com/iotaledger/twin-entity-storage/commit/99c15a257539b61d9da63649ce573ebf47699fc9))
79
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
80
+ * add validate-locales ([e66ef0d](https://github.com/iotaledger/twin-entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
81
+ * adding schema migration functionality to all the connectors ([#85](https://github.com/iotaledger/twin-entity-storage/issues/85)) ([fd1555a](https://github.com/iotaledger/twin-entity-storage/commit/fd1555a34380158214a577586dafae821e72a578))
82
+ * entity storage enhancements ([#86](https://github.com/iotaledger/twin-entity-storage/issues/86)) ([1279af4](https://github.com/iotaledger/twin-entity-storage/commit/1279af42615c6497bb06539842cee44842dd1f75))
83
+ * eslint migration to flat config ([f033b64](https://github.com/iotaledger/twin-entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
84
+ * typescript 6 update ([995a0c6](https://github.com/iotaledger/twin-entity-storage/commit/995a0c6fa9a6813bfdc7200779ce3664236e59e9))
85
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
86
+ * update framework core ([b59a380](https://github.com/iotaledger/twin-entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
87
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
88
+
89
+
90
+ ### Bug Fixes
91
+
92
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
93
+
94
+
95
+ ### Dependencies
96
+
97
+ * The following workspace dependencies were updated
98
+ * dependencies
99
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.29 to 0.0.3-next.30
100
+
101
+ ## [0.0.3-next.29](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.28...entity-storage-rest-client-v0.0.3-next.29) (2026-06-15)
102
+
103
+
104
+ ### Miscellaneous Chores
105
+
106
+ * **entity-storage-rest-client:** Synchronize repo versions
107
+
108
+
109
+ ### Dependencies
110
+
111
+ * The following workspace dependencies were updated
112
+ * dependencies
113
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.28 to 0.0.3-next.29
114
+
115
+ ## [0.0.3-next.28](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.27...entity-storage-rest-client-v0.0.3-next.28) (2026-06-12)
116
+
117
+
118
+ ### Miscellaneous Chores
119
+
120
+ * **entity-storage-rest-client:** Synchronize repo versions
121
+
122
+
123
+ ### Dependencies
124
+
125
+ * The following workspace dependencies were updated
126
+ * dependencies
127
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.27 to 0.0.3-next.28
128
+
129
+ ## [0.0.3-next.27](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.26...entity-storage-rest-client-v0.0.3-next.27) (2026-06-11)
130
+
131
+
132
+ ### Miscellaneous Chores
133
+
134
+ * **entity-storage-rest-client:** Synchronize repo versions
135
+
136
+
137
+ ### Dependencies
138
+
139
+ * The following workspace dependencies were updated
140
+ * dependencies
141
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.26 to 0.0.3-next.27
142
+
143
+ ## [0.0.3-next.26](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.25...entity-storage-rest-client-v0.0.3-next.26) (2026-06-11)
144
+
145
+
146
+ ### Miscellaneous Chores
147
+
148
+ * **entity-storage-rest-client:** Synchronize repo versions
149
+
150
+
151
+ ### Dependencies
152
+
153
+ * The following workspace dependencies were updated
154
+ * dependencies
155
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.25 to 0.0.3-next.26
156
+
157
+ ## [0.0.3-next.25](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.24...entity-storage-rest-client-v0.0.3-next.25) (2026-06-09)
158
+
159
+
160
+ ### Miscellaneous Chores
161
+
162
+ * **entity-storage-rest-client:** Synchronize repo versions
163
+
164
+
165
+ ### Dependencies
166
+
167
+ * The following workspace dependencies were updated
168
+ * dependencies
169
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.24 to 0.0.3-next.25
170
+
171
+ ## [0.0.3-next.24](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.23...entity-storage-rest-client-v0.0.3-next.24) (2026-06-08)
172
+
173
+
174
+ ### Miscellaneous Chores
175
+
176
+ * **entity-storage-rest-client:** Synchronize repo versions
177
+
178
+
179
+ ### Dependencies
180
+
181
+ * The following workspace dependencies were updated
182
+ * dependencies
183
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.23 to 0.0.3-next.24
184
+
185
+ ## [0.0.3-next.23](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.22...entity-storage-rest-client-v0.0.3-next.23) (2026-06-08)
186
+
187
+
188
+ ### Miscellaneous Chores
189
+
190
+ * **entity-storage-rest-client:** Synchronize repo versions
191
+
192
+
193
+ ### Dependencies
194
+
195
+ * The following workspace dependencies were updated
196
+ * dependencies
197
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.22 to 0.0.3-next.23
198
+
199
+ ## [0.0.3-next.22](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.21...entity-storage-rest-client-v0.0.3-next.22) (2026-06-08)
200
+
201
+
202
+ ### Miscellaneous Chores
203
+
204
+ * **entity-storage-rest-client:** Synchronize repo versions
205
+
206
+
207
+ ### Dependencies
208
+
209
+ * The following workspace dependencies were updated
210
+ * dependencies
211
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.21 to 0.0.3-next.22
212
+
213
+ ## [0.0.3-next.21](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.20...entity-storage-rest-client-v0.0.3-next.21) (2026-06-01)
214
+
215
+
216
+ ### Miscellaneous Chores
217
+
218
+ * **entity-storage-rest-client:** Synchronize repo versions
219
+
220
+
221
+ ### Dependencies
222
+
223
+ * The following workspace dependencies were updated
224
+ * dependencies
225
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.20 to 0.0.3-next.21
226
+
227
+ ## [0.0.3-next.20](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.19...entity-storage-rest-client-v0.0.3-next.20) (2026-06-01)
228
+
229
+
230
+ ### Features
231
+
232
+ * add context id features ([#55](https://github.com/iotaledger/twin-entity-storage/issues/55)) ([99c15a2](https://github.com/iotaledger/twin-entity-storage/commit/99c15a257539b61d9da63649ce573ebf47699fc9))
233
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
234
+ * add validate-locales ([e66ef0d](https://github.com/iotaledger/twin-entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
235
+ * adding schema migration functionality to all the connectors ([#85](https://github.com/iotaledger/twin-entity-storage/issues/85)) ([fd1555a](https://github.com/iotaledger/twin-entity-storage/commit/fd1555a34380158214a577586dafae821e72a578))
236
+ * entity storage enhancements ([#86](https://github.com/iotaledger/twin-entity-storage/issues/86)) ([1279af4](https://github.com/iotaledger/twin-entity-storage/commit/1279af42615c6497bb06539842cee44842dd1f75))
237
+ * eslint migration to flat config ([f033b64](https://github.com/iotaledger/twin-entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
238
+ * typescript 6 update ([995a0c6](https://github.com/iotaledger/twin-entity-storage/commit/995a0c6fa9a6813bfdc7200779ce3664236e59e9))
239
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
240
+ * update framework core ([b59a380](https://github.com/iotaledger/twin-entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
241
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
242
+
243
+
244
+ ### Bug Fixes
245
+
246
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
247
+
248
+
249
+ ### Dependencies
250
+
251
+ * The following workspace dependencies were updated
252
+ * dependencies
253
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.19 to 0.0.3-next.20
254
+
255
+ ## [0.0.3-next.19](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.18...entity-storage-rest-client-v0.0.3-next.19) (2026-06-01)
256
+
257
+
258
+ ### Features
259
+
260
+ * add context id features ([#55](https://github.com/iotaledger/twin-entity-storage/issues/55)) ([99c15a2](https://github.com/iotaledger/twin-entity-storage/commit/99c15a257539b61d9da63649ce573ebf47699fc9))
261
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
262
+ * add validate-locales ([e66ef0d](https://github.com/iotaledger/twin-entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
263
+ * adding schema migration functionality to all the connectors ([#85](https://github.com/iotaledger/twin-entity-storage/issues/85)) ([fd1555a](https://github.com/iotaledger/twin-entity-storage/commit/fd1555a34380158214a577586dafae821e72a578))
264
+ * entity storage enhancements ([#86](https://github.com/iotaledger/twin-entity-storage/issues/86)) ([1279af4](https://github.com/iotaledger/twin-entity-storage/commit/1279af42615c6497bb06539842cee44842dd1f75))
265
+ * eslint migration to flat config ([f033b64](https://github.com/iotaledger/twin-entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
266
+ * typescript 6 update ([995a0c6](https://github.com/iotaledger/twin-entity-storage/commit/995a0c6fa9a6813bfdc7200779ce3664236e59e9))
267
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
268
+ * update framework core ([b59a380](https://github.com/iotaledger/twin-entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
269
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
270
+
271
+
272
+ ### Bug Fixes
273
+
274
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
275
+
276
+
277
+ ### Dependencies
278
+
279
+ * The following workspace dependencies were updated
280
+ * dependencies
281
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.18 to 0.0.3-next.19
282
+
283
+ ## [0.0.3-next.18](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.17...entity-storage-rest-client-v0.0.3-next.18) (2026-06-01)
284
+
285
+
286
+ ### Features
287
+
288
+ * add context id features ([#55](https://github.com/iotaledger/twin-entity-storage/issues/55)) ([99c15a2](https://github.com/iotaledger/twin-entity-storage/commit/99c15a257539b61d9da63649ce573ebf47699fc9))
289
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
290
+ * add validate-locales ([e66ef0d](https://github.com/iotaledger/twin-entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
291
+ * adding schema migration functionality to all the connectors ([#85](https://github.com/iotaledger/twin-entity-storage/issues/85)) ([fd1555a](https://github.com/iotaledger/twin-entity-storage/commit/fd1555a34380158214a577586dafae821e72a578))
292
+ * entity storage enhancements ([#86](https://github.com/iotaledger/twin-entity-storage/issues/86)) ([1279af4](https://github.com/iotaledger/twin-entity-storage/commit/1279af42615c6497bb06539842cee44842dd1f75))
293
+ * eslint migration to flat config ([f033b64](https://github.com/iotaledger/twin-entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
294
+ * typescript 6 update ([995a0c6](https://github.com/iotaledger/twin-entity-storage/commit/995a0c6fa9a6813bfdc7200779ce3664236e59e9))
295
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
296
+ * update framework core ([b59a380](https://github.com/iotaledger/twin-entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
297
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
298
+
299
+
300
+ ### Bug Fixes
301
+
302
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
303
+
304
+
305
+ ### Dependencies
306
+
307
+ * The following workspace dependencies were updated
308
+ * dependencies
309
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.17 to 0.0.3-next.18
310
+
311
+ ## [0.0.3-next.17](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.16...entity-storage-rest-client-v0.0.3-next.17) (2026-06-01)
312
+
313
+
314
+ ### Miscellaneous Chores
315
+
316
+ * **entity-storage-rest-client:** Synchronize repo versions
317
+
318
+
319
+ ### Dependencies
320
+
321
+ * The following workspace dependencies were updated
322
+ * dependencies
323
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.16 to 0.0.3-next.17
324
+
325
+ ## [0.0.3-next.16](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.15...entity-storage-rest-client-v0.0.3-next.16) (2026-05-20)
326
+
327
+
328
+ ### Miscellaneous Chores
329
+
330
+ * **entity-storage-rest-client:** Synchronize repo versions
331
+
332
+
333
+ ### Dependencies
334
+
335
+ * The following workspace dependencies were updated
336
+ * dependencies
337
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.15 to 0.0.3-next.16
338
+
339
+ ## [0.0.3-next.15](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.14...entity-storage-rest-client-v0.0.3-next.15) (2026-05-19)
340
+
341
+
342
+ ### Miscellaneous Chores
343
+
344
+ * **entity-storage-rest-client:** Synchronize repo versions
345
+
346
+
347
+ ### Dependencies
348
+
349
+ * The following workspace dependencies were updated
350
+ * dependencies
351
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.14 to 0.0.3-next.15
352
+
353
+ ## [0.0.3-next.14](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.13...entity-storage-rest-client-v0.0.3-next.14) (2026-05-19)
354
+
355
+
356
+ ### Features
357
+
358
+ * adding schema migration functionality to all the connectors ([#85](https://github.com/iotaledger/twin-entity-storage/issues/85)) ([fd1555a](https://github.com/iotaledger/twin-entity-storage/commit/fd1555a34380158214a577586dafae821e72a578))
359
+
360
+
361
+ ### Dependencies
362
+
363
+ * The following workspace dependencies were updated
364
+ * dependencies
365
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.13 to 0.0.3-next.14
366
+
367
+ ## [0.0.3-next.13](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.12...entity-storage-rest-client-v0.0.3-next.13) (2026-05-13)
368
+
369
+
370
+ ### Miscellaneous Chores
371
+
372
+ * **entity-storage-rest-client:** Synchronize repo versions
373
+
374
+
375
+ ### Dependencies
376
+
377
+ * The following workspace dependencies were updated
378
+ * dependencies
379
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.12 to 0.0.3-next.13
380
+
381
+ ## [0.0.3-next.12](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.11...entity-storage-rest-client-v0.0.3-next.12) (2026-05-11)
382
+
383
+
384
+ ### Features
385
+
386
+ * typescript 6 update ([995a0c6](https://github.com/iotaledger/twin-entity-storage/commit/995a0c6fa9a6813bfdc7200779ce3664236e59e9))
387
+
388
+
389
+ ### Dependencies
390
+
391
+ * The following workspace dependencies were updated
392
+ * dependencies
393
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.11 to 0.0.3-next.12
394
+
395
+ ## [0.0.3-next.11](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.10...entity-storage-rest-client-v0.0.3-next.11) (2026-05-07)
396
+
397
+
398
+ ### Miscellaneous Chores
399
+
400
+ * **entity-storage-rest-client:** Synchronize repo versions
401
+
402
+
403
+ ### Dependencies
404
+
405
+ * The following workspace dependencies were updated
406
+ * dependencies
407
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.10 to 0.0.3-next.11
408
+
409
+ ## [0.0.3-next.10](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.9...entity-storage-rest-client-v0.0.3-next.10) (2026-05-07)
410
+
411
+
412
+ ### Features
413
+
414
+ * entity storage enhancements ([#86](https://github.com/iotaledger/twin-entity-storage/issues/86)) ([1279af4](https://github.com/iotaledger/twin-entity-storage/commit/1279af42615c6497bb06539842cee44842dd1f75))
415
+
416
+
417
+ ### Dependencies
418
+
419
+ * The following workspace dependencies were updated
420
+ * dependencies
421
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.9 to 0.0.3-next.10
422
+
423
+ ## [0.0.3-next.9](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.8...entity-storage-rest-client-v0.0.3-next.9) (2026-04-22)
424
+
425
+
426
+ ### Miscellaneous Chores
427
+
428
+ * **entity-storage-rest-client:** Synchronize repo versions
429
+
430
+
431
+ ### Dependencies
432
+
433
+ * The following workspace dependencies were updated
434
+ * dependencies
435
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.8 to 0.0.3-next.9
436
+
437
+ ## [0.0.3-next.8](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.7...entity-storage-rest-client-v0.0.3-next.8) (2026-03-20)
4
438
 
5
439
 
6
440
  ### Miscellaneous Chores
@@ -14,7 +448,7 @@
14
448
  * dependencies
15
449
  * @twin.org/entity-storage-models bumped from 0.0.3-next.7 to 0.0.3-next.8
16
450
 
17
- ## [0.0.3-next.7](https://github.com/twinfoundation/entity-storage/compare/entity-storage-rest-client-v0.0.3-next.6...entity-storage-rest-client-v0.0.3-next.7) (2026-03-13)
451
+ ## [0.0.3-next.7](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.6...entity-storage-rest-client-v0.0.3-next.7) (2026-03-13)
18
452
 
19
453
 
20
454
  ### Miscellaneous Chores
@@ -28,7 +462,7 @@
28
462
  * dependencies
29
463
  * @twin.org/entity-storage-models bumped from 0.0.3-next.6 to 0.0.3-next.7
30
464
 
31
- ## [0.0.3-next.6](https://github.com/twinfoundation/entity-storage/compare/entity-storage-rest-client-v0.0.3-next.5...entity-storage-rest-client-v0.0.3-next.6) (2026-01-21)
465
+ ## [0.0.3-next.6](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.5...entity-storage-rest-client-v0.0.3-next.6) (2026-01-21)
32
466
 
33
467
 
34
468
  ### Miscellaneous Chores
@@ -42,7 +476,7 @@
42
476
  * dependencies
43
477
  * @twin.org/entity-storage-models bumped from 0.0.3-next.5 to 0.0.3-next.6
44
478
 
45
- ## [0.0.3-next.5](https://github.com/twinfoundation/entity-storage/compare/entity-storage-rest-client-v0.0.3-next.4...entity-storage-rest-client-v0.0.3-next.5) (2026-01-06)
479
+ ## [0.0.3-next.5](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.4...entity-storage-rest-client-v0.0.3-next.5) (2026-01-06)
46
480
 
47
481
 
48
482
  ### Miscellaneous Chores
@@ -56,7 +490,7 @@
56
490
  * dependencies
57
491
  * @twin.org/entity-storage-models bumped from 0.0.3-next.4 to 0.0.3-next.5
58
492
 
59
- ## [0.0.3-next.4](https://github.com/twinfoundation/entity-storage/compare/entity-storage-rest-client-v0.0.3-next.3...entity-storage-rest-client-v0.0.3-next.4) (2025-12-03)
493
+ ## [0.0.3-next.4](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.3...entity-storage-rest-client-v0.0.3-next.4) (2025-12-03)
60
494
 
61
495
 
62
496
  ### Miscellaneous Chores
@@ -70,7 +504,7 @@
70
504
  * dependencies
71
505
  * @twin.org/entity-storage-models bumped from 0.0.3-next.3 to 0.0.3-next.4
72
506
 
73
- ## [0.0.3-next.3](https://github.com/twinfoundation/entity-storage/compare/entity-storage-rest-client-v0.0.3-next.2...entity-storage-rest-client-v0.0.3-next.3) (2025-11-26)
507
+ ## [0.0.3-next.3](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.2...entity-storage-rest-client-v0.0.3-next.3) (2025-11-26)
74
508
 
75
509
 
76
510
  ### Miscellaneous Chores
@@ -84,7 +518,7 @@
84
518
  * dependencies
85
519
  * @twin.org/entity-storage-models bumped from 0.0.3-next.2 to 0.0.3-next.3
86
520
 
87
- ## [0.0.3-next.2](https://github.com/twinfoundation/entity-storage/compare/entity-storage-rest-client-v0.0.3-next.1...entity-storage-rest-client-v0.0.3-next.2) (2025-11-13)
521
+ ## [0.0.3-next.2](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.1...entity-storage-rest-client-v0.0.3-next.2) (2025-11-13)
88
522
 
89
523
 
90
524
  ### Miscellaneous Chores
@@ -98,23 +532,23 @@
98
532
  * dependencies
99
533
  * @twin.org/entity-storage-models bumped from 0.0.3-next.1 to 0.0.3-next.2
100
534
 
101
- ## [0.0.3-next.1](https://github.com/twinfoundation/entity-storage/compare/entity-storage-rest-client-v0.0.3-next.0...entity-storage-rest-client-v0.0.3-next.1) (2025-11-10)
535
+ ## [0.0.3-next.1](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.3-next.0...entity-storage-rest-client-v0.0.3-next.1) (2025-11-10)
102
536
 
103
537
 
104
538
  ### Features
105
539
 
106
- * add context id features ([#55](https://github.com/twinfoundation/entity-storage/issues/55)) ([99c15a2](https://github.com/twinfoundation/entity-storage/commit/99c15a257539b61d9da63649ce573ebf47699fc9))
107
- * add production release automation ([1eb4c8e](https://github.com/twinfoundation/entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
108
- * add validate-locales ([e66ef0d](https://github.com/twinfoundation/entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
109
- * eslint migration to flat config ([f033b64](https://github.com/twinfoundation/entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
110
- * update dependencies ([7ccc0c4](https://github.com/twinfoundation/entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
111
- * update framework core ([b59a380](https://github.com/twinfoundation/entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
112
- * use shared store mechanism ([#34](https://github.com/twinfoundation/entity-storage/issues/34)) ([68b6b71](https://github.com/twinfoundation/entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
540
+ * add context id features ([#55](https://github.com/iotaledger/twin-entity-storage/issues/55)) ([99c15a2](https://github.com/iotaledger/twin-entity-storage/commit/99c15a257539b61d9da63649ce573ebf47699fc9))
541
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
542
+ * add validate-locales ([e66ef0d](https://github.com/iotaledger/twin-entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
543
+ * eslint migration to flat config ([f033b64](https://github.com/iotaledger/twin-entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
544
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
545
+ * update framework core ([b59a380](https://github.com/iotaledger/twin-entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
546
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
113
547
 
114
548
 
115
549
  ### Bug Fixes
116
550
 
117
- * query params force coercion ([dd6aa87](https://github.com/twinfoundation/entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
551
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
118
552
 
119
553
 
120
554
  ### Dependencies
@@ -123,12 +557,12 @@
123
557
  * dependencies
124
558
  * @twin.org/entity-storage-models bumped from 0.0.3-next.0 to 0.0.3-next.1
125
559
 
126
- ## [0.0.2-next.10](https://github.com/twinfoundation/entity-storage/compare/entity-storage-rest-client-v0.0.2-next.9...entity-storage-rest-client-v0.0.2-next.10) (2025-10-09)
560
+ ## [0.0.2-next.10](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.2-next.9...entity-storage-rest-client-v0.0.2-next.10) (2025-10-09)
127
561
 
128
562
 
129
563
  ### Features
130
564
 
131
- * add validate-locales ([e66ef0d](https://github.com/twinfoundation/entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
565
+ * add validate-locales ([e66ef0d](https://github.com/iotaledger/twin-entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
132
566
 
133
567
 
134
568
  ### Dependencies
@@ -137,7 +571,7 @@
137
571
  * dependencies
138
572
  * @twin.org/entity-storage-models bumped from 0.0.2-next.9 to 0.0.2-next.10
139
573
 
140
- ## [0.0.2-next.9](https://github.com/twinfoundation/entity-storage/compare/entity-storage-rest-client-v0.0.2-next.8...entity-storage-rest-client-v0.0.2-next.9) (2025-10-02)
574
+ ## [0.0.2-next.9](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.2-next.8...entity-storage-rest-client-v0.0.2-next.9) (2025-10-02)
141
575
 
142
576
 
143
577
  ### Miscellaneous Chores
@@ -151,12 +585,12 @@
151
585
  * dependencies
152
586
  * @twin.org/entity-storage-models bumped from 0.0.2-next.8 to 0.0.2-next.9
153
587
 
154
- ## [0.0.2-next.8](https://github.com/twinfoundation/entity-storage/compare/entity-storage-rest-client-v0.0.2-next.7...entity-storage-rest-client-v0.0.2-next.8) (2025-08-29)
588
+ ## [0.0.2-next.8](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.2-next.7...entity-storage-rest-client-v0.0.2-next.8) (2025-08-29)
155
589
 
156
590
 
157
591
  ### Features
158
592
 
159
- * eslint migration to flat config ([f033b64](https://github.com/twinfoundation/entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
593
+ * eslint migration to flat config ([f033b64](https://github.com/iotaledger/twin-entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
160
594
 
161
595
 
162
596
  ### Dependencies
@@ -165,7 +599,7 @@
165
599
  * dependencies
166
600
  * @twin.org/entity-storage-models bumped from 0.0.2-next.7 to 0.0.2-next.8
167
601
 
168
- ## [0.0.2-next.7](https://github.com/twinfoundation/entity-storage/compare/entity-storage-rest-client-v0.0.2-next.6...entity-storage-rest-client-v0.0.2-next.7) (2025-08-20)
602
+ ## [0.0.2-next.7](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.2-next.6...entity-storage-rest-client-v0.0.2-next.7) (2025-08-20)
169
603
 
170
604
 
171
605
  ### Miscellaneous Chores
@@ -179,12 +613,12 @@
179
613
  * dependencies
180
614
  * @twin.org/entity-storage-models bumped from 0.0.2-next.6 to 0.0.2-next.7
181
615
 
182
- ## [0.0.2-next.6](https://github.com/twinfoundation/entity-storage/compare/entity-storage-rest-client-v0.0.2-next.5...entity-storage-rest-client-v0.0.2-next.6) (2025-08-19)
616
+ ## [0.0.2-next.6](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.2-next.5...entity-storage-rest-client-v0.0.2-next.6) (2025-08-19)
183
617
 
184
618
 
185
619
  ### Features
186
620
 
187
- * update framework core ([b59a380](https://github.com/twinfoundation/entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
621
+ * update framework core ([b59a380](https://github.com/iotaledger/twin-entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
188
622
 
189
623
 
190
624
  ### Dependencies
@@ -193,7 +627,7 @@
193
627
  * dependencies
194
628
  * @twin.org/entity-storage-models bumped from 0.0.2-next.5 to 0.0.2-next.6
195
629
 
196
- ## [0.0.2-next.5](https://github.com/twinfoundation/entity-storage/compare/entity-storage-rest-client-v0.0.2-next.4...entity-storage-rest-client-v0.0.2-next.5) (2025-08-11)
630
+ ## [0.0.2-next.5](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.2-next.4...entity-storage-rest-client-v0.0.2-next.5) (2025-08-11)
197
631
 
198
632
 
199
633
  ### Miscellaneous Chores
@@ -207,7 +641,7 @@
207
641
  * dependencies
208
642
  * @twin.org/entity-storage-models bumped from 0.0.2-next.4 to 0.0.2-next.5
209
643
 
210
- ## [0.0.2-next.4](https://github.com/twinfoundation/entity-storage/compare/entity-storage-rest-client-v0.0.2-next.3...entity-storage-rest-client-v0.0.2-next.4) (2025-08-08)
644
+ ## [0.0.2-next.4](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.2-next.3...entity-storage-rest-client-v0.0.2-next.4) (2025-08-08)
211
645
 
212
646
 
213
647
  ### Miscellaneous Chores
@@ -221,7 +655,7 @@
221
655
  * dependencies
222
656
  * @twin.org/entity-storage-models bumped from 0.0.2-next.3 to 0.0.2-next.4
223
657
 
224
- ## [0.0.2-next.3](https://github.com/twinfoundation/entity-storage/compare/entity-storage-rest-client-v0.0.2-next.2...entity-storage-rest-client-v0.0.2-next.3) (2025-07-25)
658
+ ## [0.0.2-next.3](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.2-next.2...entity-storage-rest-client-v0.0.2-next.3) (2025-07-25)
225
659
 
226
660
 
227
661
  ### Miscellaneous Chores
@@ -235,7 +669,7 @@
235
669
  * dependencies
236
670
  * @twin.org/entity-storage-models bumped from 0.0.2-next.2 to 0.0.2-next.3
237
671
 
238
- ## [0.0.2-next.2](https://github.com/twinfoundation/entity-storage/compare/entity-storage-rest-client-v0.0.2-next.1...entity-storage-rest-client-v0.0.2-next.2) (2025-07-24)
672
+ ## [0.0.2-next.2](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.2-next.1...entity-storage-rest-client-v0.0.2-next.2) (2025-07-24)
239
673
 
240
674
 
241
675
  ### Miscellaneous Chores
@@ -249,19 +683,19 @@
249
683
  * dependencies
250
684
  * @twin.org/entity-storage-models bumped from 0.0.2-next.1 to 0.0.2-next.2
251
685
 
252
- ## [0.0.2-next.1](https://github.com/twinfoundation/entity-storage/compare/entity-storage-rest-client-v0.0.2-next.0...entity-storage-rest-client-v0.0.2-next.1) (2025-07-17)
686
+ ## [0.0.2-next.1](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.2-next.0...entity-storage-rest-client-v0.0.2-next.1) (2025-07-17)
253
687
 
254
688
 
255
689
  ### Features
256
690
 
257
- * add production release automation ([1eb4c8e](https://github.com/twinfoundation/entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
258
- * update dependencies ([7ccc0c4](https://github.com/twinfoundation/entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
259
- * use shared store mechanism ([#34](https://github.com/twinfoundation/entity-storage/issues/34)) ([68b6b71](https://github.com/twinfoundation/entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
691
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
692
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
693
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
260
694
 
261
695
 
262
696
  ### Bug Fixes
263
697
 
264
- * query params force coercion ([dd6aa87](https://github.com/twinfoundation/entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
698
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
265
699
 
266
700
 
267
701
  ### Dependencies
@@ -275,15 +709,15 @@
275
709
 
276
710
  ### Features
277
711
 
278
- * add production release automation ([1eb4c8e](https://github.com/twinfoundation/entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
279
- * release to production ([a309051](https://github.com/twinfoundation/entity-storage/commit/a3090519adebf7943232b4df12e4c6bd5afe7eed))
280
- * update dependencies ([7ccc0c4](https://github.com/twinfoundation/entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
281
- * use shared store mechanism ([#34](https://github.com/twinfoundation/entity-storage/issues/34)) ([68b6b71](https://github.com/twinfoundation/entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
712
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
713
+ * release to production ([a309051](https://github.com/iotaledger/twin-entity-storage/commit/a3090519adebf7943232b4df12e4c6bd5afe7eed))
714
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
715
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
282
716
 
283
717
 
284
718
  ### Bug Fixes
285
719
 
286
- * query params force coercion ([dd6aa87](https://github.com/twinfoundation/entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
720
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
287
721
 
288
722
 
289
723
  ### Dependencies
@@ -292,12 +726,12 @@
292
726
  * dependencies
293
727
  * @twin.org/entity-storage-models bumped from ^0.0.0 to ^0.0.1
294
728
 
295
- ## [0.0.1-next.31](https://github.com/twinfoundation/entity-storage/compare/entity-storage-rest-client-v0.0.1-next.30...entity-storage-rest-client-v0.0.1-next.31) (2025-06-20)
729
+ ## [0.0.1-next.31](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.1-next.30...entity-storage-rest-client-v0.0.1-next.31) (2025-06-20)
296
730
 
297
731
 
298
732
  ### Bug Fixes
299
733
 
300
- * query params force coercion ([dd6aa87](https://github.com/twinfoundation/entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
734
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
301
735
 
302
736
 
303
737
  ### Dependencies
@@ -306,12 +740,12 @@
306
740
  * dependencies
307
741
  * @twin.org/entity-storage-models bumped from 0.0.1-next.30 to 0.0.1-next.31
308
742
 
309
- ## [0.0.1-next.30](https://github.com/twinfoundation/entity-storage/compare/entity-storage-rest-client-v0.0.1-next.29...entity-storage-rest-client-v0.0.1-next.30) (2025-06-12)
743
+ ## [0.0.1-next.30](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.1-next.29...entity-storage-rest-client-v0.0.1-next.30) (2025-06-12)
310
744
 
311
745
 
312
746
  ### Features
313
747
 
314
- * update dependencies ([7ccc0c4](https://github.com/twinfoundation/entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
748
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
315
749
 
316
750
 
317
751
  ### Dependencies
@@ -320,12 +754,12 @@
320
754
  * dependencies
321
755
  * @twin.org/entity-storage-models bumped from 0.0.1-next.29 to 0.0.1-next.30
322
756
 
323
- ## [0.0.1-next.29](https://github.com/twinfoundation/entity-storage/compare/entity-storage-rest-client-v0.0.1-next.28...entity-storage-rest-client-v0.0.1-next.29) (2025-04-17)
757
+ ## [0.0.1-next.29](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.1-next.28...entity-storage-rest-client-v0.0.1-next.29) (2025-04-17)
324
758
 
325
759
 
326
760
  ### Features
327
761
 
328
- * use shared store mechanism ([#34](https://github.com/twinfoundation/entity-storage/issues/34)) ([68b6b71](https://github.com/twinfoundation/entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
762
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
329
763
 
330
764
 
331
765
  ### Dependencies
@@ -334,7 +768,7 @@
334
768
  * dependencies
335
769
  * @twin.org/entity-storage-models bumped from 0.0.1-next.28 to 0.0.1-next.29
336
770
 
337
- ## [0.0.1-next.28](https://github.com/twinfoundation/entity-storage/compare/entity-storage-rest-client-v0.0.1-next.27...entity-storage-rest-client-v0.0.1-next.28) (2025-04-09)
771
+ ## [0.0.1-next.28](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.1-next.27...entity-storage-rest-client-v0.0.1-next.28) (2025-04-09)
338
772
 
339
773
 
340
774
  ### Miscellaneous Chores
@@ -348,7 +782,7 @@
348
782
  * dependencies
349
783
  * @twin.org/entity-storage-models bumped from 0.0.1-next.27 to 0.0.1-next.28
350
784
 
351
- ## [0.0.1-next.27](https://github.com/twinfoundation/entity-storage/compare/entity-storage-rest-client-v0.0.1-next.26...entity-storage-rest-client-v0.0.1-next.27) (2025-03-28)
785
+ ## [0.0.1-next.27](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.0.1-next.26...entity-storage-rest-client-v0.0.1-next.27) (2025-03-28)
352
786
 
353
787
 
354
788
  ### Miscellaneous Chores
@@ -70,7 +70,7 @@ The class name of the component.
70
70
 
71
71
  ### set() {#set}
72
72
 
73
- > **set**(`entity`): `Promise`\<`void`\>
73
+ > **set**(`entity`, `conditions?`): `Promise`\<`void`\>
74
74
 
75
75
  Set an entity.
76
76
 
@@ -82,6 +82,12 @@ Set an entity.
82
82
 
83
83
  The entity to set.
84
84
 
85
+ ##### conditions?
86
+
87
+ `object`[]
88
+
89
+ The optional conditions to match for the entities.
90
+
85
91
  #### Returns
86
92
 
87
93
  `Promise`\<`void`\>
@@ -94,9 +100,35 @@ The id of the entity.
94
100
 
95
101
  ***
96
102
 
103
+ ### setBatch() {#setbatch}
104
+
105
+ > **setBatch**(`entities`): `Promise`\<`void`\>
106
+
107
+ Set multiple entities in a batch.
108
+
109
+ #### Parameters
110
+
111
+ ##### entities
112
+
113
+ `T`[]
114
+
115
+ The entities to set.
116
+
117
+ #### Returns
118
+
119
+ `Promise`\<`void`\>
120
+
121
+ Nothing.
122
+
123
+ #### Implementation of
124
+
125
+ `IEntityStorageComponent.setBatch`
126
+
127
+ ***
128
+
97
129
  ### get() {#get}
98
130
 
99
- > **get**(`id`, `secondaryIndex?`): `Promise`\<`T` \| `undefined`\>
131
+ > **get**(`id`, `secondaryIndex?`, `conditions?`): `Promise`\<`T` \| `undefined`\>
100
132
 
101
133
  Get an entity.
102
134
 
@@ -114,6 +146,12 @@ keyof `T`
114
146
 
115
147
  Get the item using a secondary index.
116
148
 
149
+ ##### conditions?
150
+
151
+ `object`[]
152
+
153
+ The optional conditions to match for the entities.
154
+
117
155
  #### Returns
118
156
 
119
157
  `Promise`\<`T` \| `undefined`\>
@@ -128,7 +166,7 @@ The object if it can be found or undefined.
128
166
 
129
167
  ### remove() {#remove}
130
168
 
131
- > **remove**(`id`): `Promise`\<`void`\>
169
+ > **remove**(`id`, `conditions?`): `Promise`\<`void`\>
132
170
 
133
171
  Remove the entity.
134
172
 
@@ -140,6 +178,12 @@ Remove the entity.
140
178
 
141
179
  The id of the entity to remove.
142
180
 
181
+ ##### conditions?
182
+
183
+ `object`[]
184
+
185
+ The optional conditions to match for the entities.
186
+
143
187
  #### Returns
144
188
 
145
189
  `Promise`\<`void`\>
@@ -152,6 +196,76 @@ Nothing.
152
196
 
153
197
  ***
154
198
 
199
+ ### removeBatch() {#removebatch}
200
+
201
+ > **removeBatch**(`ids`): `Promise`\<`void`\>
202
+
203
+ Remove multiple entities by id.
204
+
205
+ #### Parameters
206
+
207
+ ##### ids
208
+
209
+ `string`[]
210
+
211
+ The ids of the entities to remove.
212
+
213
+ #### Returns
214
+
215
+ `Promise`\<`void`\>
216
+
217
+ Nothing.
218
+
219
+ #### Implementation of
220
+
221
+ `IEntityStorageComponent.removeBatch`
222
+
223
+ ***
224
+
225
+ ### empty() {#empty}
226
+
227
+ > **empty**(): `Promise`\<`void`\>
228
+
229
+ Remove all entities from the storage.
230
+
231
+ #### Returns
232
+
233
+ `Promise`\<`void`\>
234
+
235
+ Nothing.
236
+
237
+ #### Implementation of
238
+
239
+ `IEntityStorageComponent.empty`
240
+
241
+ ***
242
+
243
+ ### count() {#count}
244
+
245
+ > **count**(`conditions?`): `Promise`\<`number`\>
246
+
247
+ Count all the entities which match the conditions.
248
+
249
+ #### Parameters
250
+
251
+ ##### conditions?
252
+
253
+ `EntityCondition`\<`T`\>
254
+
255
+ The optional conditions to match for the entities.
256
+
257
+ #### Returns
258
+
259
+ `Promise`\<`number`\>
260
+
261
+ The total count of entities in the storage.
262
+
263
+ #### Implementation of
264
+
265
+ `IEntityStorageComponent.count`
266
+
267
+ ***
268
+
155
269
  ### query() {#query}
156
270
 
157
271
  > **query**(`conditions?`, `orderBy?`, `orderByDirection?`, `properties?`, `cursor?`, `limit?`): `Promise`\<\{ `entities`: `Partial`\<`T`\>[]; `cursor?`: `string`; \}\>
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@twin.org/entity-storage-rest-client",
3
- "version": "0.0.3-next.8",
3
+ "version": "0.9.0-next.1",
4
4
  "description": "REST client for calling storage services from applications and tools.",
5
5
  "repository": {
6
6
  "type": "git",
7
- "url": "git+https://github.com/twinfoundation/entity-storage.git",
7
+ "url": "git+https://github.com/iotaledger/twin-entity-storage.git",
8
8
  "directory": "packages/entity-storage-rest-client"
9
9
  },
10
10
  "author": "martyn.janes@iota.org",
@@ -14,13 +14,13 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/api-core": "next",
18
- "@twin.org/api-models": "next",
19
- "@twin.org/core": "next",
20
- "@twin.org/entity": "next",
21
- "@twin.org/entity-storage-models": "0.0.3-next.8",
22
- "@twin.org/nameof": "next",
23
- "@twin.org/web": "next"
17
+ "@twin.org/api-core": "0.9.0-next.1",
18
+ "@twin.org/api-models": "0.9.0-next.1",
19
+ "@twin.org/core": "0.9.0-next.1",
20
+ "@twin.org/entity": "0.9.0-next.1",
21
+ "@twin.org/entity-storage-models": "0.9.0-next.1",
22
+ "@twin.org/nameof": "0.9.0-next.1",
23
+ "@twin.org/web": "0.9.0-next.1"
24
24
  },
25
25
  "main": "./dist/es/index.js",
26
26
  "types": "./dist/types/index.d.ts",
@@ -51,7 +51,7 @@
51
51
  "database"
52
52
  ],
53
53
  "bugs": {
54
- "url": "git+https://github.com/twinfoundation/entity-storage/issues"
54
+ "url": "git+https://github.com/iotaledger/twin-entity-storage/issues"
55
55
  },
56
56
  "homepage": "https://twindev.org"
57
57
  }