@twin.org/blob-storage-service 0.0.1-next.27 → 0.0.1-next.29

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.
@@ -113,9 +113,9 @@ function generateRestRoutesBlobStorage(baseRouteName, componentName, options) {
113
113
  response: {
114
114
  body: {
115
115
  "@context": [
116
- blobStorageModels.BlobStorageTypes.ContextRoot,
117
- blobStorageModels.BlobStorageTypes.ContextRootCommon,
118
- standardsSchemaOrg.SchemaOrgTypes.ContextRoot
116
+ blobStorageModels.BlobStorageContexts.ContextRoot,
117
+ blobStorageModels.BlobStorageContexts.ContextRootCommon,
118
+ standardsSchemaOrg.SchemaOrgContexts.ContextRoot
119
119
  ],
120
120
  type: blobStorageModels.BlobStorageTypes.Entry,
121
121
  id: "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
@@ -144,9 +144,9 @@ function generateRestRoutesBlobStorage(baseRouteName, componentName, options) {
144
144
  response: {
145
145
  body: {
146
146
  "@context": [
147
- blobStorageModels.BlobStorageTypes.ContextRoot,
148
- blobStorageModels.BlobStorageTypes.ContextRootCommon,
149
- standardsSchemaOrg.SchemaOrgTypes.ContextRoot
147
+ blobStorageModels.BlobStorageContexts.ContextRoot,
148
+ blobStorageModels.BlobStorageContexts.ContextRootCommon,
149
+ standardsSchemaOrg.SchemaOrgContexts.ContextRoot
150
150
  ],
151
151
  type: blobStorageModels.BlobStorageTypes.Entry,
152
152
  id: "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
@@ -300,14 +300,17 @@ function generateRestRoutesBlobStorage(baseRouteName, componentName, options) {
300
300
  id: `${camelTypeName}ListResponseExample`,
301
301
  response: {
302
302
  body: {
303
- "@context": [blobStorageModels.BlobStorageTypes.ContextRoot, blobStorageModels.BlobStorageTypes.ContextRootCommon],
303
+ "@context": [
304
+ blobStorageModels.BlobStorageContexts.ContextRoot,
305
+ blobStorageModels.BlobStorageContexts.ContextRootCommon
306
+ ],
304
307
  type: blobStorageModels.BlobStorageTypes.EntryList,
305
308
  entries: [
306
309
  {
307
310
  "@context": [
308
- blobStorageModels.BlobStorageTypes.ContextRoot,
309
- blobStorageModels.BlobStorageTypes.ContextRootCommon,
310
- standardsSchemaOrg.SchemaOrgTypes.ContextRoot
311
+ blobStorageModels.BlobStorageContexts.ContextRoot,
312
+ blobStorageModels.BlobStorageContexts.ContextRootCommon,
313
+ standardsSchemaOrg.SchemaOrgContexts.ContextRoot
311
314
  ],
312
315
  type: blobStorageModels.BlobStorageTypes.Entry,
313
316
  id: "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
@@ -337,14 +340,17 @@ function generateRestRoutesBlobStorage(baseRouteName, componentName, options) {
337
340
  id: `${camelTypeName}ListResponseJsonLdExample`,
338
341
  response: {
339
342
  body: {
340
- "@context": [blobStorageModels.BlobStorageTypes.ContextRoot, blobStorageModels.BlobStorageTypes.ContextRootCommon],
343
+ "@context": [
344
+ blobStorageModels.BlobStorageContexts.ContextRoot,
345
+ blobStorageModels.BlobStorageContexts.ContextRootCommon
346
+ ],
341
347
  type: blobStorageModels.BlobStorageTypes.EntryList,
342
348
  entries: [
343
349
  {
344
350
  "@context": [
345
- blobStorageModels.BlobStorageTypes.ContextRoot,
346
- blobStorageModels.BlobStorageTypes.ContextRootCommon,
347
- standardsSchemaOrg.SchemaOrgTypes.ContextRoot
351
+ blobStorageModels.BlobStorageContexts.ContextRoot,
352
+ blobStorageModels.BlobStorageContexts.ContextRootCommon,
353
+ standardsSchemaOrg.SchemaOrgContexts.ContextRoot
348
354
  ],
349
355
  type: blobStorageModels.BlobStorageTypes.Entry,
350
356
  id: "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
@@ -825,9 +831,9 @@ class BlobStorageService {
825
831
  core.ObjectHelper.propertyDelete(entity, "userIdentity");
826
832
  }
827
833
  let context = [
828
- blobStorageModels.BlobStorageTypes.ContextRoot,
829
- blobStorageModels.BlobStorageTypes.ContextRootCommon,
830
- standardsSchemaOrg.SchemaOrgTypes.ContextRoot
834
+ blobStorageModels.BlobStorageContexts.ContextRoot,
835
+ blobStorageModels.BlobStorageContexts.ContextRootCommon,
836
+ standardsSchemaOrg.SchemaOrgContexts.ContextRoot
831
837
  ];
832
838
  const entriesJsonLd = [];
833
839
  for (const entry of result.entities) {
@@ -921,9 +927,9 @@ class BlobStorageService {
921
927
  entryToJsonLd(entry, blob) {
922
928
  const jsonLd = {
923
929
  "@context": dataJsonLd.JsonLdProcessor.combineContexts([
924
- blobStorageModels.BlobStorageTypes.ContextRoot,
925
- blobStorageModels.BlobStorageTypes.ContextRootCommon,
926
- standardsSchemaOrg.SchemaOrgTypes.ContextRoot
930
+ blobStorageModels.BlobStorageContexts.ContextRoot,
931
+ blobStorageModels.BlobStorageContexts.ContextRootCommon,
932
+ standardsSchemaOrg.SchemaOrgContexts.ContextRoot
927
933
  ], entry?.metadata?.["@context"]),
928
934
  id: entry.id,
929
935
  type: blobStorageModels.BlobStorageTypes.Entry,
@@ -1,7 +1,7 @@
1
1
  import { HttpParameterHelper } from '@twin.org/api-models';
2
- import { BlobStorageTypes, BlobStorageConnectorFactory } from '@twin.org/blob-storage-models';
2
+ import { BlobStorageTypes, BlobStorageContexts, BlobStorageConnectorFactory } from '@twin.org/blob-storage-models';
3
3
  import { StringHelper, Guards, ComponentFactory, Is, Converter, Coerce, GeneralError, Validation, ObjectHelper, Urn, NotFoundError } from '@twin.org/core';
4
- import { SchemaOrgTypes, SchemaOrgDataTypes } from '@twin.org/standards-schema-org';
4
+ import { SchemaOrgContexts, SchemaOrgDataTypes } from '@twin.org/standards-schema-org';
5
5
  import { HttpStatusCode, HeaderTypes, MimeTypes, MimeTypeHelper } from '@twin.org/web';
6
6
  import { Sha256 } from '@twin.org/crypto';
7
7
  import { JsonLdHelper, JsonLdProcessor } from '@twin.org/data-json-ld';
@@ -111,9 +111,9 @@ function generateRestRoutesBlobStorage(baseRouteName, componentName, options) {
111
111
  response: {
112
112
  body: {
113
113
  "@context": [
114
- BlobStorageTypes.ContextRoot,
115
- BlobStorageTypes.ContextRootCommon,
116
- SchemaOrgTypes.ContextRoot
114
+ BlobStorageContexts.ContextRoot,
115
+ BlobStorageContexts.ContextRootCommon,
116
+ SchemaOrgContexts.ContextRoot
117
117
  ],
118
118
  type: BlobStorageTypes.Entry,
119
119
  id: "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
@@ -142,9 +142,9 @@ function generateRestRoutesBlobStorage(baseRouteName, componentName, options) {
142
142
  response: {
143
143
  body: {
144
144
  "@context": [
145
- BlobStorageTypes.ContextRoot,
146
- BlobStorageTypes.ContextRootCommon,
147
- SchemaOrgTypes.ContextRoot
145
+ BlobStorageContexts.ContextRoot,
146
+ BlobStorageContexts.ContextRootCommon,
147
+ SchemaOrgContexts.ContextRoot
148
148
  ],
149
149
  type: BlobStorageTypes.Entry,
150
150
  id: "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
@@ -298,14 +298,17 @@ function generateRestRoutesBlobStorage(baseRouteName, componentName, options) {
298
298
  id: `${camelTypeName}ListResponseExample`,
299
299
  response: {
300
300
  body: {
301
- "@context": [BlobStorageTypes.ContextRoot, BlobStorageTypes.ContextRootCommon],
301
+ "@context": [
302
+ BlobStorageContexts.ContextRoot,
303
+ BlobStorageContexts.ContextRootCommon
304
+ ],
302
305
  type: BlobStorageTypes.EntryList,
303
306
  entries: [
304
307
  {
305
308
  "@context": [
306
- BlobStorageTypes.ContextRoot,
307
- BlobStorageTypes.ContextRootCommon,
308
- SchemaOrgTypes.ContextRoot
309
+ BlobStorageContexts.ContextRoot,
310
+ BlobStorageContexts.ContextRootCommon,
311
+ SchemaOrgContexts.ContextRoot
309
312
  ],
310
313
  type: BlobStorageTypes.Entry,
311
314
  id: "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
@@ -335,14 +338,17 @@ function generateRestRoutesBlobStorage(baseRouteName, componentName, options) {
335
338
  id: `${camelTypeName}ListResponseJsonLdExample`,
336
339
  response: {
337
340
  body: {
338
- "@context": [BlobStorageTypes.ContextRoot, BlobStorageTypes.ContextRootCommon],
341
+ "@context": [
342
+ BlobStorageContexts.ContextRoot,
343
+ BlobStorageContexts.ContextRootCommon
344
+ ],
339
345
  type: BlobStorageTypes.EntryList,
340
346
  entries: [
341
347
  {
342
348
  "@context": [
343
- BlobStorageTypes.ContextRoot,
344
- BlobStorageTypes.ContextRootCommon,
345
- SchemaOrgTypes.ContextRoot
349
+ BlobStorageContexts.ContextRoot,
350
+ BlobStorageContexts.ContextRootCommon,
351
+ SchemaOrgContexts.ContextRoot
346
352
  ],
347
353
  type: BlobStorageTypes.Entry,
348
354
  id: "blob-memory:c57d94b088f4c6d2cb32ded014813d0c786aa00134c8ee22f84b1e2545602a70",
@@ -823,9 +829,9 @@ class BlobStorageService {
823
829
  ObjectHelper.propertyDelete(entity, "userIdentity");
824
830
  }
825
831
  let context = [
826
- BlobStorageTypes.ContextRoot,
827
- BlobStorageTypes.ContextRootCommon,
828
- SchemaOrgTypes.ContextRoot
832
+ BlobStorageContexts.ContextRoot,
833
+ BlobStorageContexts.ContextRootCommon,
834
+ SchemaOrgContexts.ContextRoot
829
835
  ];
830
836
  const entriesJsonLd = [];
831
837
  for (const entry of result.entities) {
@@ -919,9 +925,9 @@ class BlobStorageService {
919
925
  entryToJsonLd(entry, blob) {
920
926
  const jsonLd = {
921
927
  "@context": JsonLdProcessor.combineContexts([
922
- BlobStorageTypes.ContextRoot,
923
- BlobStorageTypes.ContextRootCommon,
924
- SchemaOrgTypes.ContextRoot
928
+ BlobStorageContexts.ContextRoot,
929
+ BlobStorageContexts.ContextRootCommon,
930
+ SchemaOrgContexts.ContextRoot
925
931
  ], entry?.metadata?.["@context"]),
926
932
  id: entry.id,
927
933
  type: BlobStorageTypes.Entry,
package/docs/changelog.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @twin.org/blob-storage-service - Changelog
2
2
 
3
- ## v0.0.1-next.27
3
+ ## [0.0.1-next.29](https://github.com/twinfoundation/blob-storage/compare/blob-storage-service-v0.0.1-next.28...blob-storage-service-v0.0.1-next.29) (2025-03-28)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * Adding the optional flag to the entity ([#10](https://github.com/twinfoundation/blob-storage/issues/10)) ([626677e](https://github.com/twinfoundation/blob-storage/commit/626677e5730d23535a0eb1f36f8394d941ff2447))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/blob-storage-models bumped from 0.0.1-next.28 to 0.0.1-next.29
16
+ * devDependencies
17
+ * @twin.org/blob-storage-connector-memory bumped from 0.0.1-next.28 to 0.0.1-next.29
18
+
19
+ ## v0.0.1-next.28
4
20
 
5
21
  - Initial Release
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/blob-storage-service",
3
- "version": "0.0.1-next.27",
3
+ "version": "0.0.1-next.29",
4
4
  "description": "Blob storage contract implementation and REST endpoint definitions",
5
5
  "repository": {
6
6
  "type": "git",
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@twin.org/api-models": "next",
18
- "@twin.org/blob-storage-models": "0.0.1-next.27",
18
+ "@twin.org/blob-storage-models": "0.0.1-next.29",
19
19
  "@twin.org/core": "next",
20
20
  "@twin.org/crypto": "next",
21
21
  "@twin.org/data-json-ld": "next",