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

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,442 @@
1
1
  # Changelog
2
2
 
3
- ## [0.0.3-next.9](https://github.com/twinfoundation/entity-storage/compare/entity-storage-rest-client-v0.0.3-next.8...entity-storage-rest-client-v0.0.3-next.9) (2026-04-22)
3
+ ## [0.9.0](https://github.com/iotaledger/twin-entity-storage/compare/entity-storage-rest-client-v0.9.0...entity-storage-rest-client-v0.9.0) (2026-06-24)
4
+
5
+
6
+ ### Features
7
+
8
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
9
+ * release to production ([a309051](https://github.com/iotaledger/twin-entity-storage/commit/a3090519adebf7943232b4df12e4c6bd5afe7eed))
10
+ * release to production ([#150](https://github.com/iotaledger/twin-entity-storage/issues/150)) ([4275601](https://github.com/iotaledger/twin-entity-storage/commit/42756015e853a837240f8aafdb0a8ebce2d836c1))
11
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
12
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
18
+
19
+ ## [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)
20
+
21
+
22
+ ### Features
23
+
24
+ * add context id features ([#55](https://github.com/iotaledger/twin-entity-storage/issues/55)) ([99c15a2](https://github.com/iotaledger/twin-entity-storage/commit/99c15a257539b61d9da63649ce573ebf47699fc9))
25
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
26
+ * add validate-locales ([e66ef0d](https://github.com/iotaledger/twin-entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
27
+ * 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))
28
+ * entity storage enhancements ([#86](https://github.com/iotaledger/twin-entity-storage/issues/86)) ([1279af4](https://github.com/iotaledger/twin-entity-storage/commit/1279af42615c6497bb06539842cee44842dd1f75))
29
+ * eslint migration to flat config ([f033b64](https://github.com/iotaledger/twin-entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
30
+ * typescript 6 update ([995a0c6](https://github.com/iotaledger/twin-entity-storage/commit/995a0c6fa9a6813bfdc7200779ce3664236e59e9))
31
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
32
+ * update framework core ([b59a380](https://github.com/iotaledger/twin-entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
33
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
34
+
35
+
36
+ ### Bug Fixes
37
+
38
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
39
+
40
+
41
+ ### Dependencies
42
+
43
+ * The following workspace dependencies were updated
44
+ * dependencies
45
+ * @twin.org/entity-storage-models bumped from 0.9.0-next.0 to 0.9.0-next.1
46
+
47
+ ## [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)
48
+
49
+
50
+ ### Miscellaneous Chores
51
+
52
+ * **entity-storage-rest-client:** Synchronize repo versions
53
+
54
+
55
+ ### Dependencies
56
+
57
+ * The following workspace dependencies were updated
58
+ * dependencies
59
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.32 to 0.0.3-next.33
60
+
61
+ ## [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)
62
+
63
+
64
+ ### Miscellaneous Chores
65
+
66
+ * **entity-storage-rest-client:** Synchronize repo versions
67
+
68
+
69
+ ### Dependencies
70
+
71
+ * The following workspace dependencies were updated
72
+ * dependencies
73
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.31 to 0.0.3-next.32
74
+
75
+ ## [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)
76
+
77
+
78
+ ### Miscellaneous Chores
79
+
80
+ * **entity-storage-rest-client:** Synchronize repo versions
81
+
82
+
83
+ ### Dependencies
84
+
85
+ * The following workspace dependencies were updated
86
+ * dependencies
87
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.30 to 0.0.3-next.31
88
+
89
+ ## [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)
90
+
91
+
92
+ ### Features
93
+
94
+ * add context id features ([#55](https://github.com/iotaledger/twin-entity-storage/issues/55)) ([99c15a2](https://github.com/iotaledger/twin-entity-storage/commit/99c15a257539b61d9da63649ce573ebf47699fc9))
95
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
96
+ * add validate-locales ([e66ef0d](https://github.com/iotaledger/twin-entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
97
+ * 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))
98
+ * entity storage enhancements ([#86](https://github.com/iotaledger/twin-entity-storage/issues/86)) ([1279af4](https://github.com/iotaledger/twin-entity-storage/commit/1279af42615c6497bb06539842cee44842dd1f75))
99
+ * eslint migration to flat config ([f033b64](https://github.com/iotaledger/twin-entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
100
+ * typescript 6 update ([995a0c6](https://github.com/iotaledger/twin-entity-storage/commit/995a0c6fa9a6813bfdc7200779ce3664236e59e9))
101
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
102
+ * update framework core ([b59a380](https://github.com/iotaledger/twin-entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
103
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
104
+
105
+
106
+ ### Bug Fixes
107
+
108
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
109
+
110
+
111
+ ### Dependencies
112
+
113
+ * The following workspace dependencies were updated
114
+ * dependencies
115
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.29 to 0.0.3-next.30
116
+
117
+ ## [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)
118
+
119
+
120
+ ### Miscellaneous Chores
121
+
122
+ * **entity-storage-rest-client:** Synchronize repo versions
123
+
124
+
125
+ ### Dependencies
126
+
127
+ * The following workspace dependencies were updated
128
+ * dependencies
129
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.28 to 0.0.3-next.29
130
+
131
+ ## [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)
132
+
133
+
134
+ ### Miscellaneous Chores
135
+
136
+ * **entity-storage-rest-client:** Synchronize repo versions
137
+
138
+
139
+ ### Dependencies
140
+
141
+ * The following workspace dependencies were updated
142
+ * dependencies
143
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.27 to 0.0.3-next.28
144
+
145
+ ## [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)
146
+
147
+
148
+ ### Miscellaneous Chores
149
+
150
+ * **entity-storage-rest-client:** Synchronize repo versions
151
+
152
+
153
+ ### Dependencies
154
+
155
+ * The following workspace dependencies were updated
156
+ * dependencies
157
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.26 to 0.0.3-next.27
158
+
159
+ ## [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)
160
+
161
+
162
+ ### Miscellaneous Chores
163
+
164
+ * **entity-storage-rest-client:** Synchronize repo versions
165
+
166
+
167
+ ### Dependencies
168
+
169
+ * The following workspace dependencies were updated
170
+ * dependencies
171
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.25 to 0.0.3-next.26
172
+
173
+ ## [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)
174
+
175
+
176
+ ### Miscellaneous Chores
177
+
178
+ * **entity-storage-rest-client:** Synchronize repo versions
179
+
180
+
181
+ ### Dependencies
182
+
183
+ * The following workspace dependencies were updated
184
+ * dependencies
185
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.24 to 0.0.3-next.25
186
+
187
+ ## [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)
188
+
189
+
190
+ ### Miscellaneous Chores
191
+
192
+ * **entity-storage-rest-client:** Synchronize repo versions
193
+
194
+
195
+ ### Dependencies
196
+
197
+ * The following workspace dependencies were updated
198
+ * dependencies
199
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.23 to 0.0.3-next.24
200
+
201
+ ## [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)
202
+
203
+
204
+ ### Miscellaneous Chores
205
+
206
+ * **entity-storage-rest-client:** Synchronize repo versions
207
+
208
+
209
+ ### Dependencies
210
+
211
+ * The following workspace dependencies were updated
212
+ * dependencies
213
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.22 to 0.0.3-next.23
214
+
215
+ ## [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)
216
+
217
+
218
+ ### Miscellaneous Chores
219
+
220
+ * **entity-storage-rest-client:** Synchronize repo versions
221
+
222
+
223
+ ### Dependencies
224
+
225
+ * The following workspace dependencies were updated
226
+ * dependencies
227
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.21 to 0.0.3-next.22
228
+
229
+ ## [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)
230
+
231
+
232
+ ### Miscellaneous Chores
233
+
234
+ * **entity-storage-rest-client:** Synchronize repo versions
235
+
236
+
237
+ ### Dependencies
238
+
239
+ * The following workspace dependencies were updated
240
+ * dependencies
241
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.20 to 0.0.3-next.21
242
+
243
+ ## [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)
244
+
245
+
246
+ ### Features
247
+
248
+ * add context id features ([#55](https://github.com/iotaledger/twin-entity-storage/issues/55)) ([99c15a2](https://github.com/iotaledger/twin-entity-storage/commit/99c15a257539b61d9da63649ce573ebf47699fc9))
249
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
250
+ * add validate-locales ([e66ef0d](https://github.com/iotaledger/twin-entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
251
+ * 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))
252
+ * entity storage enhancements ([#86](https://github.com/iotaledger/twin-entity-storage/issues/86)) ([1279af4](https://github.com/iotaledger/twin-entity-storage/commit/1279af42615c6497bb06539842cee44842dd1f75))
253
+ * eslint migration to flat config ([f033b64](https://github.com/iotaledger/twin-entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
254
+ * typescript 6 update ([995a0c6](https://github.com/iotaledger/twin-entity-storage/commit/995a0c6fa9a6813bfdc7200779ce3664236e59e9))
255
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
256
+ * update framework core ([b59a380](https://github.com/iotaledger/twin-entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
257
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
258
+
259
+
260
+ ### Bug Fixes
261
+
262
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
263
+
264
+
265
+ ### Dependencies
266
+
267
+ * The following workspace dependencies were updated
268
+ * dependencies
269
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.19 to 0.0.3-next.20
270
+
271
+ ## [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)
272
+
273
+
274
+ ### Features
275
+
276
+ * add context id features ([#55](https://github.com/iotaledger/twin-entity-storage/issues/55)) ([99c15a2](https://github.com/iotaledger/twin-entity-storage/commit/99c15a257539b61d9da63649ce573ebf47699fc9))
277
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
278
+ * add validate-locales ([e66ef0d](https://github.com/iotaledger/twin-entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
279
+ * 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))
280
+ * entity storage enhancements ([#86](https://github.com/iotaledger/twin-entity-storage/issues/86)) ([1279af4](https://github.com/iotaledger/twin-entity-storage/commit/1279af42615c6497bb06539842cee44842dd1f75))
281
+ * eslint migration to flat config ([f033b64](https://github.com/iotaledger/twin-entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
282
+ * typescript 6 update ([995a0c6](https://github.com/iotaledger/twin-entity-storage/commit/995a0c6fa9a6813bfdc7200779ce3664236e59e9))
283
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
284
+ * update framework core ([b59a380](https://github.com/iotaledger/twin-entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
285
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
286
+
287
+
288
+ ### Bug Fixes
289
+
290
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
291
+
292
+
293
+ ### Dependencies
294
+
295
+ * The following workspace dependencies were updated
296
+ * dependencies
297
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.18 to 0.0.3-next.19
298
+
299
+ ## [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)
300
+
301
+
302
+ ### Features
303
+
304
+ * add context id features ([#55](https://github.com/iotaledger/twin-entity-storage/issues/55)) ([99c15a2](https://github.com/iotaledger/twin-entity-storage/commit/99c15a257539b61d9da63649ce573ebf47699fc9))
305
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
306
+ * add validate-locales ([e66ef0d](https://github.com/iotaledger/twin-entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
307
+ * 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))
308
+ * entity storage enhancements ([#86](https://github.com/iotaledger/twin-entity-storage/issues/86)) ([1279af4](https://github.com/iotaledger/twin-entity-storage/commit/1279af42615c6497bb06539842cee44842dd1f75))
309
+ * eslint migration to flat config ([f033b64](https://github.com/iotaledger/twin-entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
310
+ * typescript 6 update ([995a0c6](https://github.com/iotaledger/twin-entity-storage/commit/995a0c6fa9a6813bfdc7200779ce3664236e59e9))
311
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
312
+ * update framework core ([b59a380](https://github.com/iotaledger/twin-entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
313
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
314
+
315
+
316
+ ### Bug Fixes
317
+
318
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
319
+
320
+
321
+ ### Dependencies
322
+
323
+ * The following workspace dependencies were updated
324
+ * dependencies
325
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.17 to 0.0.3-next.18
326
+
327
+ ## [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)
328
+
329
+
330
+ ### Miscellaneous Chores
331
+
332
+ * **entity-storage-rest-client:** Synchronize repo versions
333
+
334
+
335
+ ### Dependencies
336
+
337
+ * The following workspace dependencies were updated
338
+ * dependencies
339
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.16 to 0.0.3-next.17
340
+
341
+ ## [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)
342
+
343
+
344
+ ### Miscellaneous Chores
345
+
346
+ * **entity-storage-rest-client:** Synchronize repo versions
347
+
348
+
349
+ ### Dependencies
350
+
351
+ * The following workspace dependencies were updated
352
+ * dependencies
353
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.15 to 0.0.3-next.16
354
+
355
+ ## [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)
356
+
357
+
358
+ ### Miscellaneous Chores
359
+
360
+ * **entity-storage-rest-client:** Synchronize repo versions
361
+
362
+
363
+ ### Dependencies
364
+
365
+ * The following workspace dependencies were updated
366
+ * dependencies
367
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.14 to 0.0.3-next.15
368
+
369
+ ## [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)
370
+
371
+
372
+ ### Features
373
+
374
+ * 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))
375
+
376
+
377
+ ### Dependencies
378
+
379
+ * The following workspace dependencies were updated
380
+ * dependencies
381
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.13 to 0.0.3-next.14
382
+
383
+ ## [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)
384
+
385
+
386
+ ### Miscellaneous Chores
387
+
388
+ * **entity-storage-rest-client:** Synchronize repo versions
389
+
390
+
391
+ ### Dependencies
392
+
393
+ * The following workspace dependencies were updated
394
+ * dependencies
395
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.12 to 0.0.3-next.13
396
+
397
+ ## [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)
398
+
399
+
400
+ ### Features
401
+
402
+ * typescript 6 update ([995a0c6](https://github.com/iotaledger/twin-entity-storage/commit/995a0c6fa9a6813bfdc7200779ce3664236e59e9))
403
+
404
+
405
+ ### Dependencies
406
+
407
+ * The following workspace dependencies were updated
408
+ * dependencies
409
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.11 to 0.0.3-next.12
410
+
411
+ ## [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)
412
+
413
+
414
+ ### Miscellaneous Chores
415
+
416
+ * **entity-storage-rest-client:** Synchronize repo versions
417
+
418
+
419
+ ### Dependencies
420
+
421
+ * The following workspace dependencies were updated
422
+ * dependencies
423
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.10 to 0.0.3-next.11
424
+
425
+ ## [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)
426
+
427
+
428
+ ### Features
429
+
430
+ * entity storage enhancements ([#86](https://github.com/iotaledger/twin-entity-storage/issues/86)) ([1279af4](https://github.com/iotaledger/twin-entity-storage/commit/1279af42615c6497bb06539842cee44842dd1f75))
431
+
432
+
433
+ ### Dependencies
434
+
435
+ * The following workspace dependencies were updated
436
+ * dependencies
437
+ * @twin.org/entity-storage-models bumped from 0.0.3-next.9 to 0.0.3-next.10
438
+
439
+ ## [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)
4
440
 
5
441
 
6
442
  ### Miscellaneous Chores
@@ -14,7 +450,7 @@
14
450
  * dependencies
15
451
  * @twin.org/entity-storage-models bumped from 0.0.3-next.8 to 0.0.3-next.9
16
452
 
17
- ## [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)
453
+ ## [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)
18
454
 
19
455
 
20
456
  ### Miscellaneous Chores
@@ -28,7 +464,7 @@
28
464
  * dependencies
29
465
  * @twin.org/entity-storage-models bumped from 0.0.3-next.7 to 0.0.3-next.8
30
466
 
31
- ## [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)
467
+ ## [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)
32
468
 
33
469
 
34
470
  ### Miscellaneous Chores
@@ -42,7 +478,7 @@
42
478
  * dependencies
43
479
  * @twin.org/entity-storage-models bumped from 0.0.3-next.6 to 0.0.3-next.7
44
480
 
45
- ## [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)
481
+ ## [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)
46
482
 
47
483
 
48
484
  ### Miscellaneous Chores
@@ -56,7 +492,7 @@
56
492
  * dependencies
57
493
  * @twin.org/entity-storage-models bumped from 0.0.3-next.5 to 0.0.3-next.6
58
494
 
59
- ## [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)
495
+ ## [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)
60
496
 
61
497
 
62
498
  ### Miscellaneous Chores
@@ -70,7 +506,7 @@
70
506
  * dependencies
71
507
  * @twin.org/entity-storage-models bumped from 0.0.3-next.4 to 0.0.3-next.5
72
508
 
73
- ## [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)
509
+ ## [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)
74
510
 
75
511
 
76
512
  ### Miscellaneous Chores
@@ -84,7 +520,7 @@
84
520
  * dependencies
85
521
  * @twin.org/entity-storage-models bumped from 0.0.3-next.3 to 0.0.3-next.4
86
522
 
87
- ## [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)
523
+ ## [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)
88
524
 
89
525
 
90
526
  ### Miscellaneous Chores
@@ -98,7 +534,7 @@
98
534
  * dependencies
99
535
  * @twin.org/entity-storage-models bumped from 0.0.3-next.2 to 0.0.3-next.3
100
536
 
101
- ## [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)
537
+ ## [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)
102
538
 
103
539
 
104
540
  ### Miscellaneous Chores
@@ -112,23 +548,23 @@
112
548
  * dependencies
113
549
  * @twin.org/entity-storage-models bumped from 0.0.3-next.1 to 0.0.3-next.2
114
550
 
115
- ## [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)
551
+ ## [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)
116
552
 
117
553
 
118
554
  ### Features
119
555
 
120
- * add context id features ([#55](https://github.com/twinfoundation/entity-storage/issues/55)) ([99c15a2](https://github.com/twinfoundation/entity-storage/commit/99c15a257539b61d9da63649ce573ebf47699fc9))
121
- * add production release automation ([1eb4c8e](https://github.com/twinfoundation/entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
122
- * add validate-locales ([e66ef0d](https://github.com/twinfoundation/entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
123
- * eslint migration to flat config ([f033b64](https://github.com/twinfoundation/entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
124
- * update dependencies ([7ccc0c4](https://github.com/twinfoundation/entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
125
- * update framework core ([b59a380](https://github.com/twinfoundation/entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
126
- * use shared store mechanism ([#34](https://github.com/twinfoundation/entity-storage/issues/34)) ([68b6b71](https://github.com/twinfoundation/entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
556
+ * add context id features ([#55](https://github.com/iotaledger/twin-entity-storage/issues/55)) ([99c15a2](https://github.com/iotaledger/twin-entity-storage/commit/99c15a257539b61d9da63649ce573ebf47699fc9))
557
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
558
+ * add validate-locales ([e66ef0d](https://github.com/iotaledger/twin-entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
559
+ * eslint migration to flat config ([f033b64](https://github.com/iotaledger/twin-entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
560
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
561
+ * update framework core ([b59a380](https://github.com/iotaledger/twin-entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
562
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
127
563
 
128
564
 
129
565
  ### Bug Fixes
130
566
 
131
- * query params force coercion ([dd6aa87](https://github.com/twinfoundation/entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
567
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
132
568
 
133
569
 
134
570
  ### Dependencies
@@ -137,12 +573,12 @@
137
573
  * dependencies
138
574
  * @twin.org/entity-storage-models bumped from 0.0.3-next.0 to 0.0.3-next.1
139
575
 
140
- ## [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)
576
+ ## [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)
141
577
 
142
578
 
143
579
  ### Features
144
580
 
145
- * add validate-locales ([e66ef0d](https://github.com/twinfoundation/entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
581
+ * add validate-locales ([e66ef0d](https://github.com/iotaledger/twin-entity-storage/commit/e66ef0de26ca2f82b3fe89bb5c7a15a0978a9644))
146
582
 
147
583
 
148
584
  ### Dependencies
@@ -151,7 +587,7 @@
151
587
  * dependencies
152
588
  * @twin.org/entity-storage-models bumped from 0.0.2-next.9 to 0.0.2-next.10
153
589
 
154
- ## [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)
590
+ ## [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)
155
591
 
156
592
 
157
593
  ### Miscellaneous Chores
@@ -165,12 +601,12 @@
165
601
  * dependencies
166
602
  * @twin.org/entity-storage-models bumped from 0.0.2-next.8 to 0.0.2-next.9
167
603
 
168
- ## [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)
604
+ ## [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)
169
605
 
170
606
 
171
607
  ### Features
172
608
 
173
- * eslint migration to flat config ([f033b64](https://github.com/twinfoundation/entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
609
+ * eslint migration to flat config ([f033b64](https://github.com/iotaledger/twin-entity-storage/commit/f033b64984c0e6a8129d929c9dd816dcc1b8dab0))
174
610
 
175
611
 
176
612
  ### Dependencies
@@ -179,7 +615,7 @@
179
615
  * dependencies
180
616
  * @twin.org/entity-storage-models bumped from 0.0.2-next.7 to 0.0.2-next.8
181
617
 
182
- ## [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)
618
+ ## [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)
183
619
 
184
620
 
185
621
  ### Miscellaneous Chores
@@ -193,12 +629,12 @@
193
629
  * dependencies
194
630
  * @twin.org/entity-storage-models bumped from 0.0.2-next.6 to 0.0.2-next.7
195
631
 
196
- ## [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)
632
+ ## [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)
197
633
 
198
634
 
199
635
  ### Features
200
636
 
201
- * update framework core ([b59a380](https://github.com/twinfoundation/entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
637
+ * update framework core ([b59a380](https://github.com/iotaledger/twin-entity-storage/commit/b59a380bb7fba2b43610f69074dcdee24a4737da))
202
638
 
203
639
 
204
640
  ### Dependencies
@@ -207,7 +643,7 @@
207
643
  * dependencies
208
644
  * @twin.org/entity-storage-models bumped from 0.0.2-next.5 to 0.0.2-next.6
209
645
 
210
- ## [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)
646
+ ## [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)
211
647
 
212
648
 
213
649
  ### Miscellaneous Chores
@@ -221,7 +657,7 @@
221
657
  * dependencies
222
658
  * @twin.org/entity-storage-models bumped from 0.0.2-next.4 to 0.0.2-next.5
223
659
 
224
- ## [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)
660
+ ## [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)
225
661
 
226
662
 
227
663
  ### Miscellaneous Chores
@@ -235,7 +671,7 @@
235
671
  * dependencies
236
672
  * @twin.org/entity-storage-models bumped from 0.0.2-next.3 to 0.0.2-next.4
237
673
 
238
- ## [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)
674
+ ## [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)
239
675
 
240
676
 
241
677
  ### Miscellaneous Chores
@@ -249,7 +685,7 @@
249
685
  * dependencies
250
686
  * @twin.org/entity-storage-models bumped from 0.0.2-next.2 to 0.0.2-next.3
251
687
 
252
- ## [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)
688
+ ## [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)
253
689
 
254
690
 
255
691
  ### Miscellaneous Chores
@@ -263,19 +699,19 @@
263
699
  * dependencies
264
700
  * @twin.org/entity-storage-models bumped from 0.0.2-next.1 to 0.0.2-next.2
265
701
 
266
- ## [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)
702
+ ## [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)
267
703
 
268
704
 
269
705
  ### Features
270
706
 
271
- * add production release automation ([1eb4c8e](https://github.com/twinfoundation/entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
272
- * update dependencies ([7ccc0c4](https://github.com/twinfoundation/entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
273
- * use shared store mechanism ([#34](https://github.com/twinfoundation/entity-storage/issues/34)) ([68b6b71](https://github.com/twinfoundation/entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
707
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
708
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
709
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
274
710
 
275
711
 
276
712
  ### Bug Fixes
277
713
 
278
- * query params force coercion ([dd6aa87](https://github.com/twinfoundation/entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
714
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
279
715
 
280
716
 
281
717
  ### Dependencies
@@ -289,15 +725,15 @@
289
725
 
290
726
  ### Features
291
727
 
292
- * add production release automation ([1eb4c8e](https://github.com/twinfoundation/entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
293
- * release to production ([a309051](https://github.com/twinfoundation/entity-storage/commit/a3090519adebf7943232b4df12e4c6bd5afe7eed))
294
- * update dependencies ([7ccc0c4](https://github.com/twinfoundation/entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
295
- * use shared store mechanism ([#34](https://github.com/twinfoundation/entity-storage/issues/34)) ([68b6b71](https://github.com/twinfoundation/entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
728
+ * add production release automation ([1eb4c8e](https://github.com/iotaledger/twin-entity-storage/commit/1eb4c8ee3eb099defdfc2d063ae44935276dcae8))
729
+ * release to production ([a309051](https://github.com/iotaledger/twin-entity-storage/commit/a3090519adebf7943232b4df12e4c6bd5afe7eed))
730
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
731
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
296
732
 
297
733
 
298
734
  ### Bug Fixes
299
735
 
300
- * query params force coercion ([dd6aa87](https://github.com/twinfoundation/entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
736
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
301
737
 
302
738
 
303
739
  ### Dependencies
@@ -306,12 +742,12 @@
306
742
  * dependencies
307
743
  * @twin.org/entity-storage-models bumped from ^0.0.0 to ^0.0.1
308
744
 
309
- ## [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)
745
+ ## [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)
310
746
 
311
747
 
312
748
  ### Bug Fixes
313
749
 
314
- * query params force coercion ([dd6aa87](https://github.com/twinfoundation/entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
750
+ * query params force coercion ([dd6aa87](https://github.com/iotaledger/twin-entity-storage/commit/dd6aa87efdfb60bab7d6756a86888863c45c51a7))
315
751
 
316
752
 
317
753
  ### Dependencies
@@ -320,12 +756,12 @@
320
756
  * dependencies
321
757
  * @twin.org/entity-storage-models bumped from 0.0.1-next.30 to 0.0.1-next.31
322
758
 
323
- ## [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)
759
+ ## [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)
324
760
 
325
761
 
326
762
  ### Features
327
763
 
328
- * update dependencies ([7ccc0c4](https://github.com/twinfoundation/entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
764
+ * update dependencies ([7ccc0c4](https://github.com/iotaledger/twin-entity-storage/commit/7ccc0c429125d073dc60b3de6cf101abc8cc6cba))
329
765
 
330
766
 
331
767
  ### Dependencies
@@ -334,12 +770,12 @@
334
770
  * dependencies
335
771
  * @twin.org/entity-storage-models bumped from 0.0.1-next.29 to 0.0.1-next.30
336
772
 
337
- ## [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)
773
+ ## [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)
338
774
 
339
775
 
340
776
  ### Features
341
777
 
342
- * use shared store mechanism ([#34](https://github.com/twinfoundation/entity-storage/issues/34)) ([68b6b71](https://github.com/twinfoundation/entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
778
+ * use shared store mechanism ([#34](https://github.com/iotaledger/twin-entity-storage/issues/34)) ([68b6b71](https://github.com/iotaledger/twin-entity-storage/commit/68b6b71e7a96d7d016cd57bfff36775b56bf3f93))
343
779
 
344
780
 
345
781
  ### Dependencies
@@ -348,7 +784,7 @@
348
784
  * dependencies
349
785
  * @twin.org/entity-storage-models bumped from 0.0.1-next.28 to 0.0.1-next.29
350
786
 
351
- ## [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)
787
+ ## [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)
352
788
 
353
789
 
354
790
  ### Miscellaneous Chores
@@ -362,7 +798,7 @@
362
798
  * dependencies
363
799
  * @twin.org/entity-storage-models bumped from 0.0.1-next.27 to 0.0.1-next.28
364
800
 
365
- ## [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)
801
+ ## [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)
366
802
 
367
803
 
368
804
  ### 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.9",
3
+ "version": "0.9.0",
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.9",
22
- "@twin.org/nameof": "next",
23
- "@twin.org/web": "next"
17
+ "@twin.org/api-core": "^0.9.0",
18
+ "@twin.org/api-models": "^0.9.0",
19
+ "@twin.org/core": "^0.9.0",
20
+ "@twin.org/entity": "^0.9.0",
21
+ "@twin.org/entity-storage-models": "^0.9.0",
22
+ "@twin.org/nameof": "^0.9.0",
23
+ "@twin.org/web": "^0.9.0"
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
  }