@twin.org/entity-storage-rest-client 0.0.3-next.3 → 0.0.3-next.31

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # TWIN Entity Storage REST Client
1
+ # Entity Storage REST Client
2
2
 
3
- Entity Storage contract implementation which can connect to REST endpoints.
3
+ This package provides a client layer for calling storage service endpoints through a consistent REST interface. It is designed to work with the wider storage ecosystem so applications can keep behaviour consistent across connectors and environments.
4
4
 
5
5
  ## Installation
6
6
 
@@ -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,454 @@
1
- # @twin.org/entity-storage-rest-client - Changelog
1
+ # Changelog
2
2
 
3
- ## [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)
3
+ ## [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)
4
+
5
+
6
+ ### Miscellaneous Chores
7
+
8
+ * **entity-storage-rest-client:** Synchronize repo versions
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.30 to 0.0.3-next.31
16
+
17
+ ## [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)
18
+
19
+
20
+ ### Features
21
+
22
+ * add context id features ([#55](https://github.com/iotaledger/twin-entity-storage/issues/55)) ([99c15a2](https://github.com/iotaledger/twin-entity-storage/commit/99c15a257539b61d9da63649ce573ebf47699fc9))
23
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
24
+ * add validate-locales ([e66ef0d](https://github.com/iotaledger/twin-entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
25
+ * 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))
26
+ * entity storage enhancements ([#86](https://github.com/iotaledger/twin-entity-storage/issues/86)) ([1279af4](https://github.com/iotaledger/twin-entity-storage/commit/1279af42615c6497bb06539842cee44842dd1f75))
27
+ * eslint migration to flat config ([f033b64](https://github.com/iotaledger/twin-entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
28
+ * typescript 6 update ([995a0c6](https://github.com/iotaledger/twin-entity-storage/commit/995a0c6fa9a6813bfdc7200779ce3664236e59e9))
29
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
30
+ * update framework core ([b59a380](https://github.com/iotaledger/twin-entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
31
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
32
+
33
+
34
+ ### Bug Fixes
35
+
36
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
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.29 to 0.0.3-next.30
44
+
45
+ ## [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)
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.28 to 0.0.3-next.29
58
+
59
+ ## [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)
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.27 to 0.0.3-next.28
72
+
73
+ ## [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)
74
+
75
+
76
+ ### Miscellaneous Chores
77
+
78
+ * **entity-storage-rest-client:** Synchronize repo versions
79
+
80
+
81
+ ### Dependencies
82
+
83
+ * The following workspace dependencies were updated
84
+ * dependencies
85
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.26 to 0.0.3-next.27
86
+
87
+ ## [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)
88
+
89
+
90
+ ### Miscellaneous Chores
91
+
92
+ * **entity-storage-rest-client:** Synchronize repo versions
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.25 to 0.0.3-next.26
100
+
101
+ ## [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)
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.24 to 0.0.3-next.25
114
+
115
+ ## [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)
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.23 to 0.0.3-next.24
128
+
129
+ ## [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)
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.22 to 0.0.3-next.23
142
+
143
+ ## [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)
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.21 to 0.0.3-next.22
156
+
157
+ ## [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)
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.20 to 0.0.3-next.21
170
+
171
+ ## [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)
172
+
173
+
174
+ ### Features
175
+
176
+ * add context id features ([#55](https://github.com/iotaledger/twin-entity-storage/issues/55)) ([99c15a2](https://github.com/iotaledger/twin-entity-storage/commit/99c15a257539b61d9da63649ce573ebf47699fc9))
177
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
178
+ * add validate-locales ([e66ef0d](https://github.com/iotaledger/twin-entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
179
+ * 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))
180
+ * entity storage enhancements ([#86](https://github.com/iotaledger/twin-entity-storage/issues/86)) ([1279af4](https://github.com/iotaledger/twin-entity-storage/commit/1279af42615c6497bb06539842cee44842dd1f75))
181
+ * eslint migration to flat config ([f033b64](https://github.com/iotaledger/twin-entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
182
+ * typescript 6 update ([995a0c6](https://github.com/iotaledger/twin-entity-storage/commit/995a0c6fa9a6813bfdc7200779ce3664236e59e9))
183
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
184
+ * update framework core ([b59a380](https://github.com/iotaledger/twin-entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
185
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
186
+
187
+
188
+ ### Bug Fixes
189
+
190
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
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.19 to 0.0.3-next.20
198
+
199
+ ## [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)
200
+
201
+
202
+ ### Features
203
+
204
+ * add context id features ([#55](https://github.com/iotaledger/twin-entity-storage/issues/55)) ([99c15a2](https://github.com/iotaledger/twin-entity-storage/commit/99c15a257539b61d9da63649ce573ebf47699fc9))
205
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
206
+ * add validate-locales ([e66ef0d](https://github.com/iotaledger/twin-entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
207
+ * 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))
208
+ * entity storage enhancements ([#86](https://github.com/iotaledger/twin-entity-storage/issues/86)) ([1279af4](https://github.com/iotaledger/twin-entity-storage/commit/1279af42615c6497bb06539842cee44842dd1f75))
209
+ * eslint migration to flat config ([f033b64](https://github.com/iotaledger/twin-entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
210
+ * typescript 6 update ([995a0c6](https://github.com/iotaledger/twin-entity-storage/commit/995a0c6fa9a6813bfdc7200779ce3664236e59e9))
211
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
212
+ * update framework core ([b59a380](https://github.com/iotaledger/twin-entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
213
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
214
+
215
+
216
+ ### Bug Fixes
217
+
218
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
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.18 to 0.0.3-next.19
226
+
227
+ ## [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)
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.17 to 0.0.3-next.18
254
+
255
+ ## [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)
256
+
257
+
258
+ ### Miscellaneous Chores
259
+
260
+ * **entity-storage-rest-client:** Synchronize repo versions
261
+
262
+
263
+ ### Dependencies
264
+
265
+ * The following workspace dependencies were updated
266
+ * dependencies
267
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.16 to 0.0.3-next.17
268
+
269
+ ## [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)
270
+
271
+
272
+ ### Miscellaneous Chores
273
+
274
+ * **entity-storage-rest-client:** Synchronize repo versions
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.15 to 0.0.3-next.16
282
+
283
+ ## [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)
284
+
285
+
286
+ ### Miscellaneous Chores
287
+
288
+ * **entity-storage-rest-client:** Synchronize repo versions
289
+
290
+
291
+ ### Dependencies
292
+
293
+ * The following workspace dependencies were updated
294
+ * dependencies
295
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.14 to 0.0.3-next.15
296
+
297
+ ## [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)
298
+
299
+
300
+ ### Features
301
+
302
+ * 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))
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.13 to 0.0.3-next.14
310
+
311
+ ## [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)
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.12 to 0.0.3-next.13
324
+
325
+ ## [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)
326
+
327
+
328
+ ### Features
329
+
330
+ * typescript 6 update ([995a0c6](https://github.com/iotaledger/twin-entity-storage/commit/995a0c6fa9a6813bfdc7200779ce3664236e59e9))
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.11 to 0.0.3-next.12
338
+
339
+ ## [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)
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.10 to 0.0.3-next.11
352
+
353
+ ## [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)
354
+
355
+
356
+ ### Features
357
+
358
+ * entity storage enhancements ([#86](https://github.com/iotaledger/twin-entity-storage/issues/86)) ([1279af4](https://github.com/iotaledger/twin-entity-storage/commit/1279af42615c6497bb06539842cee44842dd1f75))
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.9 to 0.0.3-next.10
366
+
367
+ ## [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)
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.8 to 0.0.3-next.9
380
+
381
+ ## [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)
382
+
383
+
384
+ ### Miscellaneous Chores
385
+
386
+ * **entity-storage-rest-client:** Synchronize repo versions
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.7 to 0.0.3-next.8
394
+
395
+ ## [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)
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.6 to 0.0.3-next.7
408
+
409
+ ## [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)
410
+
411
+
412
+ ### Miscellaneous Chores
413
+
414
+ * **entity-storage-rest-client:** Synchronize repo versions
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.5 to 0.0.3-next.6
422
+
423
+ ## [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)
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.4 to 0.0.3-next.5
436
+
437
+ ## [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)
438
+
439
+
440
+ ### Miscellaneous Chores
441
+
442
+ * **entity-storage-rest-client:** Synchronize repo versions
443
+
444
+
445
+ ### Dependencies
446
+
447
+ * The following workspace dependencies were updated
448
+ * dependencies
449
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.3 to 0.0.3-next.4
450
+
451
+ ## [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)
4
452
 
5
453
 
6
454
  ### Miscellaneous Chores
@@ -14,7 +462,7 @@
14
462
  * dependencies
15
463
  * @twin.org/entity-storage-models bumped from 0.0.3-next.2 to 0.0.3-next.3
16
464
 
17
- ## [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)
465
+ ## [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)
18
466
 
19
467
 
20
468
  ### Miscellaneous Chores
@@ -28,23 +476,23 @@
28
476
  * dependencies
29
477
  * @twin.org/entity-storage-models bumped from 0.0.3-next.1 to 0.0.3-next.2
30
478
 
31
- ## [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)
479
+ ## [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)
32
480
 
33
481
 
34
482
  ### Features
35
483
 
36
- * add context id features ([#55](https://github.com/twinfoundation/entity-storage/issues/55)) ([99c15a2](https://github.com/twinfoundation/entity-storage/commit/99c15a257539b61d9da63649ce573ebf47699fc9))
37
- * add production release automation ([1eb4c8e](https://github.com/twinfoundation/entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
38
- * add validate-locales ([e66ef0d](https://github.com/twinfoundation/entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
39
- * eslint migration to flat config ([f033b64](https://github.com/twinfoundation/entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
40
- * update dependencies ([7ccc0c4](https://github.com/twinfoundation/entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
41
- * update framework core ([b59a380](https://github.com/twinfoundation/entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
42
- * use shared store mechanism ([#34](https://github.com/twinfoundation/entity-storage/issues/34)) ([68b6b71](https://github.com/twinfoundation/entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
484
+ * add context id features ([#55](https://github.com/iotaledger/twin-entity-storage/issues/55)) ([99c15a2](https://github.com/iotaledger/twin-entity-storage/commit/99c15a257539b61d9da63649ce573ebf47699fc9))
485
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
486
+ * add validate-locales ([e66ef0d](https://github.com/iotaledger/twin-entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
487
+ * eslint migration to flat config ([f033b64](https://github.com/iotaledger/twin-entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
488
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
489
+ * update framework core ([b59a380](https://github.com/iotaledger/twin-entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
490
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
43
491
 
44
492
 
45
493
  ### Bug Fixes
46
494
 
47
- * query params force coercion ([dd6aa87](https://github.com/twinfoundation/entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
495
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
48
496
 
49
497
 
50
498
  ### Dependencies
@@ -53,12 +501,12 @@
53
501
  * dependencies
54
502
  * @twin.org/entity-storage-models bumped from 0.0.3-next.0 to 0.0.3-next.1
55
503
 
56
- ## [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)
504
+ ## [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)
57
505
 
58
506
 
59
507
  ### Features
60
508
 
61
- * add validate-locales ([e66ef0d](https://github.com/twinfoundation/entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
509
+ * add validate-locales ([e66ef0d](https://github.com/iotaledger/twin-entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
62
510
 
63
511
 
64
512
  ### Dependencies
@@ -67,7 +515,7 @@
67
515
  * dependencies
68
516
  * @twin.org/entity-storage-models bumped from 0.0.2-next.9 to 0.0.2-next.10
69
517
 
70
- ## [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)
518
+ ## [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)
71
519
 
72
520
 
73
521
  ### Miscellaneous Chores
@@ -81,12 +529,12 @@
81
529
  * dependencies
82
530
  * @twin.org/entity-storage-models bumped from 0.0.2-next.8 to 0.0.2-next.9
83
531
 
84
- ## [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)
532
+ ## [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)
85
533
 
86
534
 
87
535
  ### Features
88
536
 
89
- * eslint migration to flat config ([f033b64](https://github.com/twinfoundation/entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
537
+ * eslint migration to flat config ([f033b64](https://github.com/iotaledger/twin-entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
90
538
 
91
539
 
92
540
  ### Dependencies
@@ -95,7 +543,7 @@
95
543
  * dependencies
96
544
  * @twin.org/entity-storage-models bumped from 0.0.2-next.7 to 0.0.2-next.8
97
545
 
98
- ## [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)
546
+ ## [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)
99
547
 
100
548
 
101
549
  ### Miscellaneous Chores
@@ -109,12 +557,12 @@
109
557
  * dependencies
110
558
  * @twin.org/entity-storage-models bumped from 0.0.2-next.6 to 0.0.2-next.7
111
559
 
112
- ## [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)
560
+ ## [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)
113
561
 
114
562
 
115
563
  ### Features
116
564
 
117
- * update framework core ([b59a380](https://github.com/twinfoundation/entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
565
+ * update framework core ([b59a380](https://github.com/iotaledger/twin-entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
118
566
 
119
567
 
120
568
  ### Dependencies
@@ -123,7 +571,7 @@
123
571
  * dependencies
124
572
  * @twin.org/entity-storage-models bumped from 0.0.2-next.5 to 0.0.2-next.6
125
573
 
126
- ## [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)
574
+ ## [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)
127
575
 
128
576
 
129
577
  ### Miscellaneous Chores
@@ -137,7 +585,7 @@
137
585
  * dependencies
138
586
  * @twin.org/entity-storage-models bumped from 0.0.2-next.4 to 0.0.2-next.5
139
587
 
140
- ## [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)
588
+ ## [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)
141
589
 
142
590
 
143
591
  ### Miscellaneous Chores
@@ -151,7 +599,7 @@
151
599
  * dependencies
152
600
  * @twin.org/entity-storage-models bumped from 0.0.2-next.3 to 0.0.2-next.4
153
601
 
154
- ## [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)
602
+ ## [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)
155
603
 
156
604
 
157
605
  ### Miscellaneous Chores
@@ -165,7 +613,7 @@
165
613
  * dependencies
166
614
  * @twin.org/entity-storage-models bumped from 0.0.2-next.2 to 0.0.2-next.3
167
615
 
168
- ## [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)
616
+ ## [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)
169
617
 
170
618
 
171
619
  ### Miscellaneous Chores
@@ -179,19 +627,19 @@
179
627
  * dependencies
180
628
  * @twin.org/entity-storage-models bumped from 0.0.2-next.1 to 0.0.2-next.2
181
629
 
182
- ## [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)
630
+ ## [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)
183
631
 
184
632
 
185
633
  ### Features
186
634
 
187
- * add production release automation ([1eb4c8e](https://github.com/twinfoundation/entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
188
- * update dependencies ([7ccc0c4](https://github.com/twinfoundation/entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
189
- * use shared store mechanism ([#34](https://github.com/twinfoundation/entity-storage/issues/34)) ([68b6b71](https://github.com/twinfoundation/entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
635
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
636
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
637
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
190
638
 
191
639
 
192
640
  ### Bug Fixes
193
641
 
194
- * query params force coercion ([dd6aa87](https://github.com/twinfoundation/entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
642
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
195
643
 
196
644
 
197
645
  ### Dependencies
@@ -205,15 +653,15 @@
205
653
 
206
654
  ### Features
207
655
 
208
- * add production release automation ([1eb4c8e](https://github.com/twinfoundation/entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
209
- * release to production ([a309051](https://github.com/twinfoundation/entity-storage/commit/a3090519adebf7943232b4df12e4c6bd5afe7eed))
210
- * update dependencies ([7ccc0c4](https://github.com/twinfoundation/entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
211
- * use shared store mechanism ([#34](https://github.com/twinfoundation/entity-storage/issues/34)) ([68b6b71](https://github.com/twinfoundation/entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
656
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
657
+ * release to production ([a309051](https://github.com/iotaledger/twin-entity-storage/commit/a3090519adebf7943232b4df12e4c6bd5afe7eed))
658
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
659
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
212
660
 
213
661
 
214
662
  ### Bug Fixes
215
663
 
216
- * query params force coercion ([dd6aa87](https://github.com/twinfoundation/entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
664
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
217
665
 
218
666
 
219
667
  ### Dependencies
@@ -222,12 +670,12 @@
222
670
  * dependencies
223
671
  * @twin.org/entity-storage-models bumped from ^0.0.0 to ^0.0.1
224
672
 
225
- ## [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)
673
+ ## [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)
226
674
 
227
675
 
228
676
  ### Bug Fixes
229
677
 
230
- * query params force coercion ([dd6aa87](https://github.com/twinfoundation/entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
678
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
231
679
 
232
680
 
233
681
  ### Dependencies
@@ -236,12 +684,12 @@
236
684
  * dependencies
237
685
  * @twin.org/entity-storage-models bumped from 0.0.1-next.30 to 0.0.1-next.31
238
686
 
239
- ## [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)
687
+ ## [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)
240
688
 
241
689
 
242
690
  ### Features
243
691
 
244
- * update dependencies ([7ccc0c4](https://github.com/twinfoundation/entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
692
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
245
693
 
246
694
 
247
695
  ### Dependencies
@@ -250,12 +698,12 @@
250
698
  * dependencies
251
699
  * @twin.org/entity-storage-models bumped from 0.0.1-next.29 to 0.0.1-next.30
252
700
 
253
- ## [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)
701
+ ## [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)
254
702
 
255
703
 
256
704
  ### Features
257
705
 
258
- * use shared store mechanism ([#34](https://github.com/twinfoundation/entity-storage/issues/34)) ([68b6b71](https://github.com/twinfoundation/entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
706
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
259
707
 
260
708
 
261
709
  ### Dependencies
@@ -264,7 +712,7 @@
264
712
  * dependencies
265
713
  * @twin.org/entity-storage-models bumped from 0.0.1-next.28 to 0.0.1-next.29
266
714
 
267
- ## [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)
715
+ ## [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)
268
716
 
269
717
 
270
718
  ### Miscellaneous Chores
@@ -278,7 +726,7 @@
278
726
  * dependencies
279
727
  * @twin.org/entity-storage-models bumped from 0.0.1-next.27 to 0.0.1-next.28
280
728
 
281
- ## [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)
729
+ ## [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)
282
730
 
283
731
 
284
732
  ### Miscellaneous Chores
package/docs/examples.md CHANGED
@@ -1 +1,60 @@
1
- # @twin.org/entity-storage-rest-client - Examples
1
+ # Entity Storage REST Client Examples
2
+
3
+ These snippets show how to call the REST endpoints with typed payloads and how to shape filtered list requests.
4
+
5
+ ## EntityStorageRestClient
6
+
7
+ ```typescript
8
+ import { EntityStorageRestClient } from '@twin.org/entity-storage-rest-client';
9
+ import {
10
+ ComparisonOperator,
11
+ LogicalOperator,
12
+ SortDirection,
13
+ type EntityCondition
14
+ } from '@twin.org/entity';
15
+
16
+ interface Profile {
17
+ id: string;
18
+ email: string;
19
+ status: 'active' | 'inactive';
20
+ createdAt: string;
21
+ }
22
+
23
+ const client = new EntityStorageRestClient<Profile>({
24
+ endpoint: 'http://localhost:8080'
25
+ });
26
+
27
+ const className = client.className();
28
+
29
+ await client.set({
30
+ id: 'profile-1',
31
+ email: 'ada@example.com',
32
+ status: 'active',
33
+ createdAt: '2026-03-09T10:30:00.000Z'
34
+ });
35
+
36
+ const byPrimaryKey = await client.get('profile-1');
37
+ const bySecondaryIndex = await client.get('ada@example.com', 'email');
38
+
39
+ const activeCondition: EntityCondition<Profile> = {
40
+ logicalOperator: LogicalOperator.And,
41
+ conditions: [
42
+ {
43
+ property: 'status',
44
+ comparison: ComparisonOperator.Equals,
45
+ value: 'active'
46
+ }
47
+ ]
48
+ };
49
+
50
+ const result = await client.query(
51
+ activeCondition,
52
+ 'createdAt',
53
+ SortDirection.Descending,
54
+ ['id', 'email', 'status'],
55
+ undefined,
56
+ 25
57
+ );
58
+
59
+ await client.remove('profile-1');
60
+ ```
@@ -42,7 +42,7 @@ The configuration for the client.
42
42
 
43
43
  ## Properties
44
44
 
45
- ### CLASS\_NAME
45
+ ### CLASS\_NAME {#class_name}
46
46
 
47
47
  > `readonly` `static` **CLASS\_NAME**: `string`
48
48
 
@@ -50,7 +50,7 @@ Runtime name for the class.
50
50
 
51
51
  ## Methods
52
52
 
53
- ### className()
53
+ ### className() {#classname}
54
54
 
55
55
  > **className**(): `string`
56
56
 
@@ -68,9 +68,9 @@ The class name of the component.
68
68
 
69
69
  ***
70
70
 
71
- ### set()
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
 
97
- ### get()
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
+
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`\>
@@ -126,9 +164,9 @@ The object if it can be found or undefined.
126
164
 
127
165
  ***
128
166
 
129
- ### remove()
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,7 +196,77 @@ Nothing.
152
196
 
153
197
  ***
154
198
 
155
- ### query()
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
+
269
+ ### query() {#query}
156
270
 
157
271
  > **query**(`conditions?`, `orderBy?`, `orderByDirection?`, `properties?`, `cursor?`, `limit?`): `Promise`\<\{ `entities`: `Partial`\<`T`\>[]; `cursor?`: `string`; \}\>
158
272
 
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.3",
4
- "description": "Entity Storage contract implementation which can connect to REST endpoints",
3
+ "version": "0.0.3-next.31",
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",
@@ -18,7 +18,7 @@
18
18
  "@twin.org/api-models": "next",
19
19
  "@twin.org/core": "next",
20
20
  "@twin.org/entity": "next",
21
- "@twin.org/entity-storage-models": "0.0.3-next.3",
21
+ "@twin.org/entity-storage-models": "0.0.3-next.31",
22
22
  "@twin.org/nameof": "next",
23
23
  "@twin.org/web": "next"
24
24
  },
@@ -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
  }