@twin.org/api-auth-entity-storage-rest-client 0.0.3-next.34 → 0.0.3-next.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"entityStorageAuthenticationAdminRestClient.js","sourceRoot":"","sources":["../../src/entityStorageAuthenticationAdminRestClient.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAGxC;;GAEG;AACH,MAAM,OAAO,0CACZ,SAAQ,cAAc;IAGtB;;OAEG;IACI,MAAM,CAAU,UAAU,gDAAgE;IAEjG;;;OAGG;IACH,YAAY,MAA6B;QACxC,KAAK,+CAAuD,MAAM,EAAE,sBAAsB,CAAC,CAAC;IAC7F,CAAC;IAED;;;OAGG;IACI,SAAS;QACf,OAAO,0CAA0C,CAAC,UAAU,CAAC;IAC9D,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,MAAM,CAAC,IAAuC;QAC1D,MAAM,CAAC,MAAM,CAAC,0CAA0C,CAAC,UAAU,UAAgB,IAAI,CAAC,CAAC;QACzF,MAAM,CAAC,WAAW,CACjB,0CAA0C,CAAC,UAAU,gBAErD,IAAI,CAAC,KAAK,CACV,CAAC;QAEF,MAAM,IAAI,CAAC,KAAK,CAA8C,QAAQ,EAAE,MAAM,EAAE;YAC/E,IAAI,EAAE,IAAI;SACV,CAAC,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,MAAM,CAClB,IAA6D;QAE7D,MAAM,CAAC,MAAM,CAAC,0CAA0C,CAAC,UAAU,UAAgB,IAAI,CAAC,CAAC;QACzF,MAAM,CAAC,WAAW,CACjB,0CAA0C,CAAC,UAAU,gBAErD,IAAI,CAAC,KAAK,CACV,CAAC;QAEF,MAAM,IAAI,CAAC,KAAK,CAA8C,eAAe,EAAE,KAAK,EAAE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AK,CACf,wBAAwB,EACxB,KAAK,EACL;YACC,UAAU,EAAE;gBACX,KAAK;aACL;YACD,IAAI,EAAE;gBACL,WAAW;gBACX,eAAe;aACf;SACD,CACD,CAAC;IACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type {\n\tIAdminUserCreateRequest,\n\tIAdminUserGetByIdentityRequest,\n\tIAdminUserGetRequest,\n\tIAdminUserGetResponse,\n\tIAdminUserRemoveRequest,\n\tIAdminUserUpdatePasswordRequest,\n\tIAdminUserUpdateRequest,\n\tIAuthenticationAdminComponent,\n\tIAuthenticationUser\n} from \"@twin.org/api-auth-entity-storage-models\";\nimport { BaseRestClient } from \"@twin.org/api-core\";\nimport type { IBaseRestClientConfig, INoContentResponse } from \"@twin.org/api-models\";\nimport { Guards } from \"@twin.org/core\";\nimport { nameof } from \"@twin.org/nameof\";\n\n/**\n * The client to connect to the authentication admin service.\n */\nexport class EntityStorageAuthenticationAdminRestClient\n\textends BaseRestClient\n\timplements IAuthenticationAdminComponent\n{\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = nameof<EntityStorageAuthenticationAdminRestClient>();\n\n\t/**\n\t * Create a new instance of EntityStorageAuthenticationAdminRestClient.\n\t * @param config The configuration for the client.\n\t */\n\tconstructor(config: IBaseRestClientConfig) {\n\t\tsuper(nameof<EntityStorageAuthenticationAdminRestClient>(), config, \"authentication/admin\");\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 EntityStorageAuthenticationAdminRestClient.CLASS_NAME;\n\t}\n\n\t/**\n\t * Create a login for the user.\n\t * @param user The user to create.\n\t * @returns Nothing.\n\t */\n\tpublic async create(user: Omit<IAuthenticationUser, \"salt\">): Promise<void> {\n\t\tGuards.object(EntityStorageAuthenticationAdminRestClient.CLASS_NAME, nameof(user), user);\n\t\tGuards.stringValue(\n\t\t\tEntityStorageAuthenticationAdminRestClient.CLASS_NAME,\n\t\t\tnameof(user.email),\n\t\t\tuser.email\n\t\t);\n\n\t\tawait this.fetch<IAdminUserCreateRequest, INoContentResponse>(\"/users\", \"POST\", {\n\t\t\tbody: user\n\t\t});\n\t}\n\n\t/**\n\t * Update a login for the user.\n\t * @param user The user to update.\n\t * @returns Nothing.\n\t */\n\tpublic async update(\n\t\tuser: Partial<Omit<IAuthenticationUser, \"password\" | \"salt\">>\n\t): Promise<void> {\n\t\tGuards.object(EntityStorageAuthenticationAdminRestClient.CLASS_NAME, nameof(user), user);\n\t\tGuards.stringValue(\n\t\t\tEntityStorageAuthenticationAdminRestClient.CLASS_NAME,\n\t\t\tnameof(user.email),\n\t\t\tuser.email\n\t\t);\n\n\t\tawait this.fetch<IAdminUserUpdateRequest, INoContentResponse>(\"/users/:email\", \"PUT\", {\n\t\t\tpathParams: {\n\t\t\t\temail: user.email\n\t\t\t},\n\t\t\tbody: user\n\t\t});\n\t}\n\n\t/**\n\t * Get a user by email.\n\t * @param email The email address of the user to get.\n\t * @returns The user details.\n\t */\n\tpublic async get(email: string): Promise<Omit<IAuthenticationUser, \"password\" | \"salt\">> {\n\t\tGuards.stringValue(EntityStorageAuthenticationAdminRestClient.CLASS_NAME, nameof(email), email);\n\n\t\tconst response = await this.fetch<IAdminUserGetRequest, IAdminUserGetResponse>(\n\t\t\t\"/users/:email\",\n\t\t\t\"GET\",\n\t\t\t{\n\t\t\t\tpathParams: {\n\t\t\t\t\temail\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\treturn response.body;\n\t}\n\n\t/**\n\t * Get a user by identity.\n\t * @param identity The identity of the user to get.\n\t * @returns The user details.\n\t */\n\tpublic async getByIdentity(\n\t\tidentity: string\n\t): Promise<Omit<IAuthenticationUser, \"password\" | \"salt\">> {\n\t\tGuards.stringValue(\n\t\t\tEntityStorageAuthenticationAdminRestClient.CLASS_NAME,\n\t\t\tnameof(identity),\n\t\t\tidentity\n\t\t);\n\n\t\tconst response = await this.fetch<IAdminUserGetByIdentityRequest, IAdminUserGetResponse>(\n\t\t\t\"/users/identity/:identity\",\n\t\t\t\"GET\",\n\t\t\t{\n\t\t\t\tpathParams: {\n\t\t\t\t\tidentity\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\treturn response.body;\n\t}\n\n\t/**\n\t * Remove a user.\n\t * @param email The email address of the user to remove.\n\t * @returns Nothing.\n\t */\n\tpublic async remove(email: string): Promise<void> {\n\t\tGuards.stringValue(EntityStorageAuthenticationAdminRestClient.CLASS_NAME, nameof(email), email);\n\n\t\tawait this.fetch<IAdminUserRemoveRequest, INoContentResponse>(\"/users/:email\", \"DELETE\", {\n\t\t\tpathParams: {\n\t\t\t\temail\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Update the user's password.\n\t * @param email The email address of the user to update.\n\t * @param newPassword The new password for the user.\n\t * @param currentPassword The current password, optional, if supplied will check against existing.\n\t * @returns Nothing.\n\t */\n\tpublic async updatePassword(\n\t\temail: string,\n\t\tnewPassword: string,\n\t\tcurrentPassword?: string\n\t): Promise<void> {\n\t\tGuards.stringValue(EntityStorageAuthenticationAdminRestClient.CLASS_NAME, nameof(email), email);\n\t\tGuards.stringValue(\n\t\t\tEntityStorageAuthenticationAdminRestClient.CLASS_NAME,\n\t\t\tnameof(newPassword),\n\t\t\tnewPassword\n\t\t);\n\n\t\tawait this.fetch<IAdminUserUpdatePasswordRequest, INoContentResponse>(\n\t\t\t\"/users/:email/password\",\n\t\t\t\"PUT\",\n\t\t\t{\n\t\t\t\tpathParams: {\n\t\t\t\t\temail\n\t\t\t\t},\n\t\t\t\tbody: {\n\t\t\t\t\tnewPassword,\n\t\t\t\t\tcurrentPassword\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n}\n"]}
1
+ {"version":3,"file":"entityStorageAuthenticationAdminRestClient.js","sourceRoot":"","sources":["../../src/entityStorageAuthenticationAdminRestClient.ts"],"names":[],"mappings":"AAaA,OAAO,EA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M,IAAI,CAAC,KAAK,CAChC,eAAe,EACf,KAAK,EACL;YACC,UAAU,EAAE;gBACX,KAAK;aACL;SACD,CACD,CAAC;QAEF,OAAO,QAAQ,CAAC,IAAI,CAAC;IACtB,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,aAAa,CAAC,QAAgB;QAC1C,MAAM,CAAC,WAAW,CACjB,0CAA0C,CAAC,UAAU,cAErD,QAAQ,CACR,CAAC;QAEF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAChC,2BAA2B,EAC3B,KAAK,EACL;YACC,UAAU,EAAE;gBACX,QAAQ;aACR;SACD,CACD,CAAC;QAEF,OAAO,QAAQ,CAAC,IAAI,CAAC;IACtB,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,MAAM,CAAC,KAAa;QAChC,MAAM,CAAC,WAAW,CAAC,0CAA0C,CAAC,UAAU,WAAiB,KAAK,CAAC,CAAC;QAEhG,MAAM,IAAI,CAAC,KAAK,CAA8C,eAAe,EAAE,QAAQ,EAAE;YACxF,UAAU,EAAE;gBACX,KAAK;aACL;SACD,CAAC,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,cAAc,CAC1B,KAAa,EACb,WAAmB,EACnB,eAAwB;QAExB,MAAM,CAAC,WAAW,CAAC,0CAA0C,CAAC,UAAU,WAAiB,KAAK,CAAC,CAAC;QAChG,MAAM,CAAC,WAAW,CACjB,0CAA0C,CAAC,UAAU,iBAErD,WAAW,CACX,CAAC;QAEF,MAAM,IAAI,CAAC,KAAK,CACf,wBAAwB,EACxB,KAAK,EACL;YACC,UAAU,EAAE;gBACX,KAAK;aACL;YACD,IAAI,EAAE;gBACL,WAAW;gBACX,eAAe;aACf;SACD,CACD,CAAC;IACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type {\n\tIAdminUserCreateRequest,\n\tIAdminUserGetByIdentityRequest,\n\tIAdminUserGetRequest,\n\tIAdminUserGetResponse,\n\tIAdminUserRemoveRequest,\n\tIAdminUserUpdatePasswordRequest,\n\tIAdminUserUpdateRequest,\n\tIAuthenticationAdminComponent,\n\tIAuthenticationUser\n} from \"@twin.org/api-auth-entity-storage-models\";\nimport { BaseRestClient } from \"@twin.org/api-core\";\nimport type { IBaseRestClientConfig, INoContentResponse } from \"@twin.org/api-models\";\nimport { Guards } from \"@twin.org/core\";\nimport { nameof } from \"@twin.org/nameof\";\n\n/**\n * The client to connect to the authentication admin service.\n */\nexport class EntityStorageAuthenticationAdminRestClient\n\textends BaseRestClient\n\timplements IAuthenticationAdminComponent\n{\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = nameof<EntityStorageAuthenticationAdminRestClient>();\n\n\t/**\n\t * Create a new instance of EntityStorageAuthenticationAdminRestClient.\n\t * @param config The configuration for the client.\n\t */\n\tconstructor(config: IBaseRestClientConfig) {\n\t\tsuper(nameof<EntityStorageAuthenticationAdminRestClient>(), config, \"authentication/admin\");\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 EntityStorageAuthenticationAdminRestClient.CLASS_NAME;\n\t}\n\n\t/**\n\t * Create a login for the user.\n\t * @param user The user to create.\n\t * @returns Nothing.\n\t */\n\tpublic async create(user: IAuthenticationUser & { password: string }): Promise<void> {\n\t\tGuards.object(EntityStorageAuthenticationAdminRestClient.CLASS_NAME, nameof(user), user);\n\t\tGuards.stringValue(\n\t\t\tEntityStorageAuthenticationAdminRestClient.CLASS_NAME,\n\t\t\tnameof(user.email),\n\t\t\tuser.email\n\t\t);\n\n\t\tawait this.fetch<IAdminUserCreateRequest, INoContentResponse>(\"/users\", \"POST\", {\n\t\t\tbody: user\n\t\t});\n\t}\n\n\t/**\n\t * Update a login for the user.\n\t * @param user The user to update.\n\t * @returns Nothing.\n\t */\n\tpublic async update(user: Partial<IAuthenticationUser>): Promise<void> {\n\t\tGuards.object(EntityStorageAuthenticationAdminRestClient.CLASS_NAME, nameof(user), user);\n\t\tGuards.stringValue(\n\t\t\tEntityStorageAuthenticationAdminRestClient.CLASS_NAME,\n\t\t\tnameof(user.email),\n\t\t\tuser.email\n\t\t);\n\n\t\tawait this.fetch<IAdminUserUpdateRequest, INoContentResponse>(\"/users/:email\", \"PUT\", {\n\t\t\tpathParams: {\n\t\t\t\temail: user.email\n\t\t\t},\n\t\t\tbody: user\n\t\t});\n\t}\n\n\t/**\n\t * Get a user by email.\n\t * @param email The email address of the user to get.\n\t * @returns The user details.\n\t */\n\tpublic async get(email: string): Promise<IAuthenticationUser> {\n\t\tGuards.stringValue(EntityStorageAuthenticationAdminRestClient.CLASS_NAME, nameof(email), email);\n\n\t\tconst response = await this.fetch<IAdminUserGetRequest, IAdminUserGetResponse>(\n\t\t\t\"/users/:email\",\n\t\t\t\"GET\",\n\t\t\t{\n\t\t\t\tpathParams: {\n\t\t\t\t\temail\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\treturn response.body;\n\t}\n\n\t/**\n\t * Get a user by identity.\n\t * @param identity The identity of the user to get.\n\t * @returns The user details.\n\t */\n\tpublic async getByIdentity(identity: string): Promise<IAuthenticationUser> {\n\t\tGuards.stringValue(\n\t\t\tEntityStorageAuthenticationAdminRestClient.CLASS_NAME,\n\t\t\tnameof(identity),\n\t\t\tidentity\n\t\t);\n\n\t\tconst response = await this.fetch<IAdminUserGetByIdentityRequest, IAdminUserGetResponse>(\n\t\t\t\"/users/identity/:identity\",\n\t\t\t\"GET\",\n\t\t\t{\n\t\t\t\tpathParams: {\n\t\t\t\t\tidentity\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\treturn response.body;\n\t}\n\n\t/**\n\t * Remove a user.\n\t * @param email The email address of the user to remove.\n\t * @returns Nothing.\n\t */\n\tpublic async remove(email: string): Promise<void> {\n\t\tGuards.stringValue(EntityStorageAuthenticationAdminRestClient.CLASS_NAME, nameof(email), email);\n\n\t\tawait this.fetch<IAdminUserRemoveRequest, INoContentResponse>(\"/users/:email\", \"DELETE\", {\n\t\t\tpathParams: {\n\t\t\t\temail\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Update the user's password.\n\t * @param email The email address of the user to update.\n\t * @param newPassword The new password for the user.\n\t * @param currentPassword The current password, optional, if supplied will check against existing.\n\t * @returns Nothing.\n\t */\n\tpublic async updatePassword(\n\t\temail: string,\n\t\tnewPassword: string,\n\t\tcurrentPassword?: string\n\t): Promise<void> {\n\t\tGuards.stringValue(EntityStorageAuthenticationAdminRestClient.CLASS_NAME, nameof(email), email);\n\t\tGuards.stringValue(\n\t\t\tEntityStorageAuthenticationAdminRestClient.CLASS_NAME,\n\t\t\tnameof(newPassword),\n\t\t\tnewPassword\n\t\t);\n\n\t\tawait this.fetch<IAdminUserUpdatePasswordRequest, INoContentResponse>(\n\t\t\t\"/users/:email/password\",\n\t\t\t\"PUT\",\n\t\t\t{\n\t\t\t\tpathParams: {\n\t\t\t\t\temail\n\t\t\t\t},\n\t\t\t\tbody: {\n\t\t\t\t\tnewPassword,\n\t\t\t\t\tcurrentPassword\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n}\n"]}
@@ -24,25 +24,27 @@ export declare class EntityStorageAuthenticationAdminRestClient extends BaseRest
24
24
  * @param user The user to create.
25
25
  * @returns Nothing.
26
26
  */
27
- create(user: Omit<IAuthenticationUser, "salt">): Promise<void>;
27
+ create(user: IAuthenticationUser & {
28
+ password: string;
29
+ }): Promise<void>;
28
30
  /**
29
31
  * Update a login for the user.
30
32
  * @param user The user to update.
31
33
  * @returns Nothing.
32
34
  */
33
- update(user: Partial<Omit<IAuthenticationUser, "password" | "salt">>): Promise<void>;
35
+ update(user: Partial<IAuthenticationUser>): Promise<void>;
34
36
  /**
35
37
  * Get a user by email.
36
38
  * @param email The email address of the user to get.
37
39
  * @returns The user details.
38
40
  */
39
- get(email: string): Promise<Omit<IAuthenticationUser, "password" | "salt">>;
41
+ get(email: string): Promise<IAuthenticationUser>;
40
42
  /**
41
43
  * Get a user by identity.
42
44
  * @param identity The identity of the user to get.
43
45
  * @returns The user details.
44
46
  */
45
- getByIdentity(identity: string): Promise<Omit<IAuthenticationUser, "password" | "salt">>;
47
+ getByIdentity(identity: string): Promise<IAuthenticationUser>;
46
48
  /**
47
49
  * Remove a user.
48
50
  * @param email The email address of the user to remove.
package/docs/changelog.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.3-next.35](https://github.com/iotaledger/twin-api/compare/api-auth-entity-storage-rest-client-v0.0.3-next.34...api-auth-entity-storage-rest-client-v0.0.3-next.35) (2026-05-21)
4
+
5
+
6
+ ### Features
7
+
8
+ * user partitioning ([#126](https://github.com/iotaledger/twin-api/issues/126)) ([6bf0da3](https://github.com/iotaledger/twin-api/commit/6bf0da3c42406c9838e80e0ddd6b21f5c64aac90))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/api-auth-entity-storage-models bumped from 0.0.3-next.34 to 0.0.3-next.35
16
+ * @twin.org/api-core bumped from 0.0.3-next.34 to 0.0.3-next.35
17
+ * @twin.org/api-models bumped from 0.0.3-next.34 to 0.0.3-next.35
18
+
3
19
  ## [0.0.3-next.34](https://github.com/iotaledger/twin-api/compare/api-auth-entity-storage-rest-client-v0.0.3-next.33...api-auth-entity-storage-rest-client-v0.0.3-next.34) (2026-05-19)
4
20
 
5
21
 
@@ -72,7 +72,7 @@ Create a login for the user.
72
72
 
73
73
  ##### user
74
74
 
75
- `Omit`\<`IAuthenticationUser`, `"salt"`\>
75
+ `IAuthenticationUser` & `object`
76
76
 
77
77
  The user to create.
78
78
 
@@ -98,7 +98,7 @@ Update a login for the user.
98
98
 
99
99
  ##### user
100
100
 
101
- `Partial`\<`Omit`\<`IAuthenticationUser`, `"password"` \| `"salt"`\>\>
101
+ `Partial`\<`IAuthenticationUser`\>
102
102
 
103
103
  The user to update.
104
104
 
@@ -116,7 +116,7 @@ Nothing.
116
116
 
117
117
  ### get() {#get}
118
118
 
119
- > **get**(`email`): `Promise`\<`Omit`\<`IAuthenticationUser`, `"salt"` \| `"password"`\>\>
119
+ > **get**(`email`): `Promise`\<`IAuthenticationUser`\>
120
120
 
121
121
  Get a user by email.
122
122
 
@@ -130,7 +130,7 @@ The email address of the user to get.
130
130
 
131
131
  #### Returns
132
132
 
133
- `Promise`\<`Omit`\<`IAuthenticationUser`, `"salt"` \| `"password"`\>\>
133
+ `Promise`\<`IAuthenticationUser`\>
134
134
 
135
135
  The user details.
136
136
 
@@ -142,7 +142,7 @@ The user details.
142
142
 
143
143
  ### getByIdentity() {#getbyidentity}
144
144
 
145
- > **getByIdentity**(`identity`): `Promise`\<`Omit`\<`IAuthenticationUser`, `"salt"` \| `"password"`\>\>
145
+ > **getByIdentity**(`identity`): `Promise`\<`IAuthenticationUser`\>
146
146
 
147
147
  Get a user by identity.
148
148
 
@@ -156,7 +156,7 @@ The identity of the user to get.
156
156
 
157
157
  #### Returns
158
158
 
159
- `Promise`\<`Omit`\<`IAuthenticationUser`, `"salt"` \| `"password"`\>\>
159
+ `Promise`\<`IAuthenticationUser`\>
160
160
 
161
161
  The user details.
162
162
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/api-auth-entity-storage-rest-client",
3
- "version": "0.0.3-next.34",
3
+ "version": "0.0.3-next.35",
4
4
  "description": "REST clients for authentication and admin operations against entity storage endpoints.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,9 +14,9 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/api-auth-entity-storage-models": "0.0.3-next.34",
18
- "@twin.org/api-core": "0.0.3-next.34",
19
- "@twin.org/api-models": "0.0.3-next.34",
17
+ "@twin.org/api-auth-entity-storage-models": "0.0.3-next.35",
18
+ "@twin.org/api-core": "0.0.3-next.35",
19
+ "@twin.org/api-models": "0.0.3-next.35",
20
20
  "@twin.org/core": "next",
21
21
  "@twin.org/nameof": "next",
22
22
  "@twin.org/web": "next"