@twin.org/auditable-item-stream-rest-client 0.0.3-next.13 → 0.0.3-next.15
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.
|
@@ -98,7 +98,7 @@ export class AuditableItemStreamRestClient extends BaseRestClient {
|
|
|
98
98
|
*/
|
|
99
99
|
async close(id) {
|
|
100
100
|
Guards.stringValue(AuditableItemStreamRestClient.CLASS_NAME, "id", id);
|
|
101
|
-
await this.fetch("/:id/close", "
|
|
101
|
+
await this.fetch("/:id/close", "PUT", {
|
|
102
102
|
pathParams: {
|
|
103
103
|
id
|
|
104
104
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auditableItemStreamRestClient.js","sourceRoot":"","sources":["../../src/auditableItemStreamRestClient.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EACN,mBAAmB,EAInB,MAAM,sBAAsB,CAAC;AA+B9B,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAIvE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAErE;;GAEG;AACH,MAAM,OAAO,6BACZ,SAAQ,cAAc;IAGtB;;OAEG;IACI,MAAM,CAAU,UAAU,mCAAmD;IAEpF;;;OAGG;IACH,YAAY,MAA6B;QACxC,KAAK,kCAA0C,MAAM,EAAE,uBAAuB,CAAC,CAAC;IACjF,CAAC;IAED;;;OAGG;IACI,SAAS;QACf,OAAO,6BAA6B,CAAC,UAAU,CAAC;IACjD,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,MAAM,CAAC,MAAgC;QACnD,MAAM,CAAC,MAAM,CAAC,6BAA6B,CAAC,UAAU,YAAkB,MAAM,CAAC,CAAC;QAChF,MAAM,QAAQ,GAAG,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OAAO;YACN,OAAO,EAAE,QAAQ,CAAC,IAAI;YACtB,MAAM,EAAE,YAAY,CAAC,yBAAyB,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;gBAC3F,EAAE,cAAc,EAAE,MAAM;SACzB,CAAC;IACH,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,gBAAgB,CAAC,EAAU;QACvC,MAAM,IAAI,iBAAiB,CAAC,6BAA6B,CAAC,UAAU,EAAE,sBAAsB,EAAE;YAC7F,UAAU,EAAE,kBAAkB;SAC9B,CAAC,CAAC;IACJ,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 ICreatedResponse,\n\ttype INoContentResponse\n} from \"@twin.org/api-models\";\nimport type {\n\tIAuditableItemStream,\n\tIAuditableItemStreamBase,\n\tIAuditableItemStreamCloseRequest,\n\tIAuditableItemStreamComponent,\n\tIAuditableItemStreamCreateEntryRequest,\n\tIAuditableItemStreamCreateRequest,\n\tIAuditableItemStreamDeleteEntryRequest,\n\tIAuditableItemStreamDeleteRequest,\n\tIAuditableItemStreamEntry,\n\tIAuditableItemStreamEntryList,\n\tIAuditableItemStreamEntryObjectList,\n\tIAuditableItemStreamGetEntryObjectRequest,\n\tIAuditableItemStreamGetEntryObjectResponse,\n\tIAuditableItemStreamGetEntryRequest,\n\tIAuditableItemStreamGetEntryResponse,\n\tIAuditableItemStreamGetRequest,\n\tIAuditableItemStreamGetResponse,\n\tIAuditableItemStreamList,\n\tIAuditableItemStreamListEntriesNoStreamRequest,\n\tIAuditableItemStreamListEntriesRequest,\n\tIAuditableItemStreamListEntriesResponse,\n\tIAuditableItemStreamListEntryObjectsNoStreamRequest,\n\tIAuditableItemStreamListEntryObjectsRequest,\n\tIAuditableItemStreamListEntryObjectsResponse,\n\tIAuditableItemStreamListRequest,\n\tIAuditableItemStreamListResponse,\n\tIAuditableItemStreamUpdateEntryRequest,\n\tIAuditableItemStreamUpdateRequest\n} from \"@twin.org/auditable-item-stream-models\";\nimport { Coerce, Guards, Is, NotSupportedError } from \"@twin.org/core\";\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { IComparator, SortDirection } from \"@twin.org/entity\";\nimport { nameof } from \"@twin.org/nameof\";\nimport { HeaderHelper, HeaderTypes, MimeTypes } from \"@twin.org/web\";\n\n/**\n * Client for performing auditable item stream through to REST endpoints.\n */\nexport class AuditableItemStreamRestClient\n\textends BaseRestClient\n\timplements IAuditableItemStreamComponent\n{\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = nameof<AuditableItemStreamRestClient>();\n\n\t/**\n\t * Create a new instance of AuditableItemStreamRestClient.\n\t * @param config The configuration for the client.\n\t */\n\tconstructor(config: IBaseRestClientConfig) {\n\t\tsuper(nameof<AuditableItemStreamRestClient>(), config, \"auditable-item-stream\");\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 AuditableItemStreamRestClient.CLASS_NAME;\n\t}\n\n\t/**\n\t * Create a new stream.\n\t * @param stream The stream to create.\n\t * @returns The id of the new stream item.\n\t */\n\tpublic async create(stream: IAuditableItemStreamBase): Promise<string> {\n\t\tGuards.object(AuditableItemStreamRestClient.CLASS_NAME, nameof(stream), stream);\n\t\tconst response = await this.fetch<IAuditableItemStreamCreateRequest, ICreatedResponse>(\n\t\t\t\"/\",\n\t\t\t\"POST\",\n\t\t\t{\n\t\t\t\tbody: stream\n\t\t\t}\n\t\t);\n\n\t\treturn response.headers[HeaderTypes.Location];\n\t}\n\n\t/**\n\t * Get a stream header without the entries.\n\t * @param id The id of the stream to get.\n\t * @param cursor Cursor to use for next chunk of entries.\n\t * @param limit Limit the number of entries to return, only applicable if includeEntries is true.\n\t * @param options Additional options for the get operation.\n\t * @param options.includeEntries Whether to include the entries, defaults to false.\n\t * @param options.includeDeleted Whether to include deleted entries, defaults to false.\n\t * @param options.verifyStream Should the stream be verified, defaults to false.\n\t * @param options.verifyEntries Should the entries be verified, defaults to false.\n\t * @returns The stream and entries if found.\n\t * @throws NotFoundError if the stream is not found\n\t */\n\tpublic async get(\n\t\tid: string,\n\t\tcursor?: string,\n\t\tlimit?: number,\n\t\toptions?: {\n\t\t\tincludeEntries?: boolean;\n\t\t\tincludeDeleted?: boolean;\n\t\t\tverifyStream?: boolean;\n\t\t\tverifyEntries?: boolean;\n\t\t}\n\t): Promise<{\n\t\tstream: IAuditableItemStream;\n\t\tcursor?: string;\n\t}> {\n\t\tGuards.stringValue(AuditableItemStreamRestClient.CLASS_NAME, nameof(id), id);\n\n\t\tconst response = await this.fetch<\n\t\t\tIAuditableItemStreamGetRequest,\n\t\t\tIAuditableItemStreamGetResponse\n\t\t>(\"/:id\", \"GET\", {\n\t\t\theaders: {\n\t\t\t\t[HeaderTypes.Accept]: MimeTypes.JsonLd\n\t\t\t},\n\t\t\tpathParams: {\n\t\t\t\tid\n\t\t\t},\n\t\t\tquery: {\n\t\t\t\tcursor,\n\t\t\t\tlimit: Coerce.string(limit),\n\t\t\t\tincludeEntries: Coerce.string(options?.includeEntries),\n\t\t\t\tincludeDeleted: Coerce.string(options?.includeDeleted),\n\t\t\t\tverifyStream: Coerce.string(options?.verifyStream),\n\t\t\t\tverifyEntries: Coerce.string(options?.verifyEntries)\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tstream: response.body,\n\t\t\tcursor: HeaderHelper.extractLinkHeaderRelation(response.headers?.[HeaderTypes.Link], \"next\")\n\t\t\t\t?.urlQueryParams?.cursor\n\t\t};\n\t}\n\n\t/**\n\t * Update a stream.\n\t * @param stream The stream to update, does not update entries.\n\t * @returns Nothing.\n\t */\n\tpublic async update(\n\t\tstream: Pick<IAuditableItemStream, \"@context\" | \"type\" | \"id\" | \"annotationObject\">\n\t): Promise<void> {\n\t\tGuards.object(AuditableItemStreamRestClient.CLASS_NAME, nameof(stream), stream);\n\t\tGuards.stringValue(AuditableItemStreamRestClient.CLASS_NAME, nameof(stream.id), stream.id);\n\n\t\tconst { id, ...rest } = stream;\n\t\tawait this.fetch<IAuditableItemStreamUpdateRequest, INoContentResponse>(\"/:id\", \"PUT\", {\n\t\t\tpathParams: {\n\t\t\t\tid\n\t\t\t},\n\t\t\tbody: rest\n\t\t});\n\t}\n\n\t/**\n\t * Close the stream.\n\t * @param id The id of the stream to close.\n\t * @returns Nothing.\n\t */\n\tpublic async close(id: string): Promise<void> {\n\t\tGuards.stringValue(AuditableItemStreamRestClient.CLASS_NAME, nameof(id), id);\n\n\t\tawait this.fetch<IAuditableItemStreamCloseRequest, INoContentResponse>(\"/:id/close\", \"POST\", {\n\t\t\tpathParams: {\n\t\t\t\tid\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Delete the stream.\n\t * @param id The id of the stream to remove.\n\t * @returns Nothing.\n\t */\n\tpublic async remove(id: string): Promise<void> {\n\t\tGuards.stringValue(AuditableItemStreamRestClient.CLASS_NAME, nameof(id), id);\n\n\t\tawait this.fetch<IAuditableItemStreamDeleteRequest, 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 streams, will not return entries.\n\t * @param conditions Conditions to use in the query.\n\t * @param orderBy The order for the results, defaults to created.\n\t * @param orderByDirection The direction for the order, defaults to descending.\n\t * @param properties The properties to return, if not provided defaults to id, created and object.\n\t * @param cursor The cursor to request the next chunk of entities.\n\t * @param limit Limit the number of entities to return.\n\t * @returns The entities, which can be partial if a limited keys list was provided.\n\t */\n\tpublic async query(\n\t\tconditions?: IComparator[],\n\t\torderBy?: keyof Pick<IAuditableItemStream, \"dateCreated\" | \"dateModified\">,\n\t\torderByDirection?: SortDirection,\n\t\tproperties?: (keyof IAuditableItemStream)[],\n\t\tcursor?: string,\n\t\tlimit?: number\n\t): Promise<{\n\t\tentries: IAuditableItemStreamList;\n\t\tcursor?: string;\n\t}> {\n\t\tconst response = await this.fetch<\n\t\t\tIAuditableItemStreamListRequest,\n\t\t\tIAuditableItemStreamListResponse\n\t\t>(\"/\", \"GET\", {\n\t\t\theaders: {\n\t\t\t\t[HeaderTypes.Accept]: MimeTypes.JsonLd\n\t\t\t},\n\t\t\tquery: {\n\t\t\t\tconditions: HttpParameterHelper.objectToString(conditions),\n\t\t\t\torderBy,\n\t\t\t\torderByDirection,\n\t\t\t\tproperties: HttpParameterHelper.arrayToString(properties),\n\t\t\t\tcursor,\n\t\t\t\tlimit: Coerce.string(limit)\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tentries: response.body,\n\t\t\tcursor: HeaderHelper.extractLinkHeaderRelation(response.headers?.[HeaderTypes.Link], \"next\")\n\t\t\t\t?.urlQueryParams?.cursor\n\t\t};\n\t}\n\n\t/**\n\t * Create an entry in the stream.\n\t * @param id The id of the stream to update.\n\t * @param entryObject The object for the stream as JSON-LD.\n\t * @returns The id of the created entry, if not provided.\n\t */\n\tpublic async createEntry(id: string, entryObject: IJsonLdNodeObject): Promise<string> {\n\t\tGuards.stringValue(AuditableItemStreamRestClient.CLASS_NAME, nameof(id), id);\n\n\t\tconst response = await this.fetch<IAuditableItemStreamCreateEntryRequest, ICreatedResponse>(\n\t\t\t\"/:id/entries\",\n\t\t\t\"POST\",\n\t\t\t{\n\t\t\t\tpathParams: {\n\t\t\t\t\tid\n\t\t\t\t},\n\t\t\t\tbody: {\n\t\t\t\t\tentryObject\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\treturn response.headers[HeaderTypes.Location];\n\t}\n\n\t/**\n\t * Get the entry from the stream.\n\t * @param id The id of the stream to get.\n\t * @param entryId The id of the stream entry to get.\n\t * @param options Additional options for the get operation.\n\t * @param options.verifyEntry Should the entry be verified, defaults to false.\n\t * @returns The stream and entries if found.\n\t * @throws NotFoundError if the stream is not found.\n\t */\n\tpublic async getEntry(\n\t\tid: string,\n\t\tentryId: string,\n\t\toptions?: {\n\t\t\tverifyEntry?: boolean;\n\t\t}\n\t): Promise<IAuditableItemStreamEntry> {\n\t\tGuards.stringValue(AuditableItemStreamRestClient.CLASS_NAME, nameof(id), id);\n\t\tGuards.stringValue(AuditableItemStreamRestClient.CLASS_NAME, nameof(entryId), entryId);\n\n\t\tconst response = await this.fetch<\n\t\t\tIAuditableItemStreamGetEntryRequest,\n\t\t\tIAuditableItemStreamGetEntryResponse\n\t\t>(\"/:id/entries/:entryId\", \"GET\", {\n\t\t\theaders: {\n\t\t\t\t[HeaderTypes.Accept]: MimeTypes.JsonLd\n\t\t\t},\n\t\t\tquery: {\n\t\t\t\tverifyEntry: Coerce.string(options?.verifyEntry)\n\t\t\t},\n\t\t\tpathParams: {\n\t\t\t\tid,\n\t\t\t\tentryId\n\t\t\t}\n\t\t});\n\n\t\treturn response.body;\n\t}\n\n\t/**\n\t * Get the entry object from the stream.\n\t * @param id The id of the stream to get.\n\t * @param entryId The id of the stream entry to get.\n\t * @returns The stream and entries if found.\n\t * @throws NotFoundError if the stream is not found.\n\t */\n\tpublic async getEntryObject(id: string, entryId: string): Promise<IJsonLdNodeObject> {\n\t\tGuards.stringValue(AuditableItemStreamRestClient.CLASS_NAME, nameof(id), id);\n\t\tGuards.stringValue(AuditableItemStreamRestClient.CLASS_NAME, nameof(entryId), entryId);\n\n\t\tconst response = await this.fetch<\n\t\t\tIAuditableItemStreamGetEntryObjectRequest,\n\t\t\tIAuditableItemStreamGetEntryObjectResponse\n\t\t>(\"/:id/entries/:entryId/object\", \"GET\", {\n\t\t\theaders: {\n\t\t\t\t[HeaderTypes.Accept]: MimeTypes.JsonLd\n\t\t\t},\n\t\t\tpathParams: {\n\t\t\t\tid,\n\t\t\t\tentryId\n\t\t\t}\n\t\t});\n\n\t\treturn response.body;\n\t}\n\n\t/**\n\t * Update an entry in the stream.\n\t * @param id The id of the stream to update.\n\t * @param entryId The id of the entry to update.\n\t * @param entryObject The object for the entry as JSON-LD.\n\t * @returns Nothing.\n\t */\n\tpublic async updateEntry(\n\t\tid: string,\n\t\tentryId: string,\n\t\tentryObject: IJsonLdNodeObject\n\t): Promise<void> {\n\t\tGuards.stringValue(AuditableItemStreamRestClient.CLASS_NAME, nameof(id), id);\n\t\tGuards.stringValue(AuditableItemStreamRestClient.CLASS_NAME, nameof(entryId), entryId);\n\n\t\tawait this.fetch<IAuditableItemStreamUpdateEntryRequest, INoContentResponse>(\n\t\t\t\"/:id/entries/:entryId\",\n\t\t\t\"PUT\",\n\t\t\t{\n\t\t\t\tpathParams: {\n\t\t\t\t\tid,\n\t\t\t\t\tentryId\n\t\t\t\t},\n\t\t\t\tbody: {\n\t\t\t\t\tentryObject\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t * Remove from the stream.\n\t * @param id The id of the stream to remove from.\n\t * @param entryId The id of the entry to remove.\n\t * @returns Nothing.\n\t */\n\tpublic async removeEntry(id: string, entryId: string): Promise<void> {\n\t\tGuards.stringValue(AuditableItemStreamRestClient.CLASS_NAME, nameof(id), id);\n\t\tGuards.stringValue(AuditableItemStreamRestClient.CLASS_NAME, nameof(entryId), entryId);\n\n\t\tawait this.fetch<IAuditableItemStreamDeleteEntryRequest, INoContentResponse>(\n\t\t\t\"/:id/entries/:entryId\",\n\t\t\t\"DELETE\",\n\t\t\t{\n\t\t\t\tpathParams: {\n\t\t\t\t\tid,\n\t\t\t\t\tentryId\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t * Get the entries for the stream.\n\t * @param id The id of the stream to get, if undefined returns all matching entries.\n\t * @param options Additional options for the get operation.\n\t * @param options.conditions The conditions to filter the stream.\n\t * @param options.includeDeleted Whether to include deleted entries, defaults to false.\n\t * @param options.verifyEntries Should the entries be verified, defaults to false.\n\t * @param options.limit How many entries to return.\n\t * @param options.cursor Cursor to use for next chunk of data.\n\t * @param options.order Retrieve the entries in ascending/descending time order, defaults to Ascending.\n\t * @returns The stream and entries if found.\n\t * @throws NotFoundError if the stream is not found.\n\t */\n\tpublic async getEntries(\n\t\tid?: string,\n\t\toptions?: {\n\t\t\tconditions?: IComparator[];\n\t\t\tincludeDeleted?: boolean;\n\t\t\tverifyEntries?: boolean;\n\t\t\tlimit?: number;\n\t\t\tcursor?: string;\n\t\t\torder?: SortDirection;\n\t\t}\n\t): Promise<{\n\t\tentries: IAuditableItemStreamEntryList;\n\t\tcursor?: string;\n\t}> {\n\t\tconst queryParams = {\n\t\t\tconditions: HttpParameterHelper.objectToString(options?.conditions),\n\t\t\tincludeDeleted: Coerce.string(options?.includeDeleted),\n\t\t\tverifyEntries: Coerce.string(options?.verifyEntries),\n\t\t\tlimit: Coerce.string(options?.limit),\n\t\t\tcursor: options?.cursor,\n\t\t\torder: options?.order\n\t\t};\n\n\t\tlet response;\n\t\tif (!Is.empty(id)) {\n\t\t\tGuards.stringValue(AuditableItemStreamRestClient.CLASS_NAME, nameof(id), id);\n\n\t\t\tresponse = await this.fetch<\n\t\t\t\tIAuditableItemStreamListEntriesRequest,\n\t\t\t\tIAuditableItemStreamListEntriesResponse\n\t\t\t>(\"/:id/entries\", \"GET\", {\n\t\t\t\theaders: {\n\t\t\t\t\t[HeaderTypes.Accept]: MimeTypes.JsonLd\n\t\t\t\t},\n\t\t\t\tpathParams: {\n\t\t\t\t\tid\n\t\t\t\t},\n\t\t\t\tquery: queryParams\n\t\t\t});\n\t\t} else {\n\t\t\tresponse = await this.fetch<\n\t\t\t\tIAuditableItemStreamListEntriesNoStreamRequest,\n\t\t\t\tIAuditableItemStreamListEntriesResponse\n\t\t\t>(\"/entries\", \"GET\", {\n\t\t\t\theaders: {\n\t\t\t\t\t[HeaderTypes.Accept]: MimeTypes.JsonLd\n\t\t\t\t},\n\t\t\t\tquery: queryParams\n\t\t\t});\n\t\t}\n\n\t\treturn {\n\t\t\tentries: response.body,\n\t\t\tcursor: HeaderHelper.extractLinkHeaderRelation(response.headers?.[HeaderTypes.Link], \"next\")\n\t\t\t\t?.urlQueryParams?.cursor\n\t\t};\n\t}\n\n\t/**\n\t * Get the entry objects for the stream.\n\t * @param id The id of the stream to get, if undefined returns all matching entries.\n\t * @param options Additional options for the get operation.\n\t * @param options.conditions The conditions to filter the stream.\n\t * @param options.includeDeleted Whether to include deleted entries, defaults to false.\n\t * @param options.limit How many entries to return.\n\t * @param options.cursor Cursor to use for next chunk of data.\n\t * @param options.order Retrieve the entries in ascending/descending time order, defaults to Ascending.\n\t * @returns The stream and entries if found.\n\t * @throws NotFoundError if the stream is not found.\n\t */\n\tpublic async getEntryObjects(\n\t\tid?: string,\n\t\toptions?: {\n\t\t\tconditions?: IComparator[];\n\t\t\tincludeDeleted?: boolean;\n\t\t\tlimit?: number;\n\t\t\tcursor?: string;\n\t\t\torder?: SortDirection;\n\t\t}\n\t): Promise<{\n\t\tentries: IAuditableItemStreamEntryObjectList;\n\t\tcursor?: string;\n\t}> {\n\t\tconst queryParams = {\n\t\t\tconditions: HttpParameterHelper.objectToString(options?.conditions),\n\t\t\tincludeDeleted: Coerce.string(options?.includeDeleted),\n\t\t\tlimit: Coerce.string(options?.limit),\n\t\t\tcursor: options?.cursor,\n\t\t\torder: options?.order\n\t\t};\n\n\t\tlet response;\n\t\tif (!Is.empty(id)) {\n\t\t\tGuards.stringValue(AuditableItemStreamRestClient.CLASS_NAME, nameof(id), id);\n\t\t\tresponse = await this.fetch<\n\t\t\t\tIAuditableItemStreamListEntryObjectsRequest,\n\t\t\t\tIAuditableItemStreamListEntryObjectsResponse\n\t\t\t>(\"/:id/entries/objects\", \"GET\", {\n\t\t\t\theaders: {\n\t\t\t\t\t[HeaderTypes.Accept]: MimeTypes.JsonLd\n\t\t\t\t},\n\t\t\t\tpathParams: {\n\t\t\t\t\tid\n\t\t\t\t},\n\t\t\t\tquery: queryParams\n\t\t\t});\n\t\t} else {\n\t\t\tresponse = await this.fetch<\n\t\t\t\tIAuditableItemStreamListEntryObjectsNoStreamRequest,\n\t\t\t\tIAuditableItemStreamListEntryObjectsResponse\n\t\t\t>(\"/entries/objects\", \"GET\", {\n\t\t\t\theaders: {\n\t\t\t\t\t[HeaderTypes.Accept]: MimeTypes.JsonLd\n\t\t\t\t},\n\t\t\t\tquery: queryParams\n\t\t\t});\n\t\t}\n\n\t\treturn {\n\t\t\tentries: response.body,\n\t\t\tcursor: HeaderHelper.extractLinkHeaderRelation(response.headers?.[HeaderTypes.Link], \"next\")\n\t\t\t\t?.urlQueryParams?.cursor\n\t\t};\n\t}\n\n\t/**\n\t * Remove the verifiable storage for the stream and entries, not supported on client.\n\t * @param id The id of the stream to remove the storage from.\n\t * @returns Nothing.\n\t * @throws NotFoundError if the vertex is not found.\n\t */\n\tpublic async removeVerifiable(id: string): Promise<void> {\n\t\tthrow new NotSupportedError(AuditableItemStreamRestClient.CLASS_NAME, \"notSupportedOnClient\", {\n\t\t\tmethodName: \"removeVerifiable\"\n\t\t});\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"auditableItemStreamRestClient.js","sourceRoot":"","sources":["../../src/auditableItemStreamRestClient.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EACN,mBAAmB,EAInB,MAAM,sBAAsB,CAAC;AA+B9B,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAIvE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAErE;;GAEG;AACH,MAAM,OAAO,6BACZ,SAAQ,cAAc;IAGtB;;OAEG;IACI,MAAM,CAAU,UAAU,mCAAmD;IAEpF;;;OAGG;IACH,YAAY,MAA6B;QACxC,KAAK,kCAA0C,MAAM,EAAE,uBAAuB,CAAC,CAAC;IACjF,CAAC;IAED;;;O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AAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAGzB,kBAAkB,EAAE,KAAK,EAAE;gBAC5B,OAAO,EAAE;oBACR,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,MAAM;iBACtC;gBACD,KAAK,EAAE,WAAW;aAClB,CAAC,CAAC;QACJ,CAAC;QAED,OAAO;YACN,OAAO,EAAE,QAAQ,CAAC,IAAI;YACtB,MAAM,EAAE,YAAY,CAAC,yBAAyB,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;gBAC3F,EAAE,cAAc,EAAE,MAAM;SACzB,CAAC;IACH,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,gBAAgB,CAAC,EAAU;QACvC,MAAM,IAAI,iBAAiB,CAAC,6BAA6B,CAAC,UAAU,EAAE,sBAAsB,EAAE;YAC7F,UAAU,EAAE,kBAAkB;SAC9B,CAAC,CAAC;IACJ,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 ICreatedResponse,\n\ttype INoContentResponse\n} from \"@twin.org/api-models\";\nimport type {\n\tIAuditableItemStream,\n\tIAuditableItemStreamBase,\n\tIAuditableItemStreamCloseRequest,\n\tIAuditableItemStreamComponent,\n\tIAuditableItemStreamCreateEntryRequest,\n\tIAuditableItemStreamCreateRequest,\n\tIAuditableItemStreamDeleteEntryRequest,\n\tIAuditableItemStreamDeleteRequest,\n\tIAuditableItemStreamEntry,\n\tIAuditableItemStreamEntryList,\n\tIAuditableItemStreamEntryObjectList,\n\tIAuditableItemStreamGetEntryObjectRequest,\n\tIAuditableItemStreamGetEntryObjectResponse,\n\tIAuditableItemStreamGetEntryRequest,\n\tIAuditableItemStreamGetEntryResponse,\n\tIAuditableItemStreamGetRequest,\n\tIAuditableItemStreamGetResponse,\n\tIAuditableItemStreamList,\n\tIAuditableItemStreamListEntriesNoStreamRequest,\n\tIAuditableItemStreamListEntriesRequest,\n\tIAuditableItemStreamListEntriesResponse,\n\tIAuditableItemStreamListEntryObjectsNoStreamRequest,\n\tIAuditableItemStreamListEntryObjectsRequest,\n\tIAuditableItemStreamListEntryObjectsResponse,\n\tIAuditableItemStreamListRequest,\n\tIAuditableItemStreamListResponse,\n\tIAuditableItemStreamUpdateEntryRequest,\n\tIAuditableItemStreamUpdateRequest\n} from \"@twin.org/auditable-item-stream-models\";\nimport { Coerce, Guards, Is, NotSupportedError } from \"@twin.org/core\";\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { IComparator, SortDirection } from \"@twin.org/entity\";\nimport { nameof } from \"@twin.org/nameof\";\nimport { HeaderHelper, HeaderTypes, MimeTypes } from \"@twin.org/web\";\n\n/**\n * Client for performing auditable item stream through to REST endpoints.\n */\nexport class AuditableItemStreamRestClient\n\textends BaseRestClient\n\timplements IAuditableItemStreamComponent\n{\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = nameof<AuditableItemStreamRestClient>();\n\n\t/**\n\t * Create a new instance of AuditableItemStreamRestClient.\n\t * @param config The configuration for the client.\n\t */\n\tconstructor(config: IBaseRestClientConfig) {\n\t\tsuper(nameof<AuditableItemStreamRestClient>(), config, \"auditable-item-stream\");\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 AuditableItemStreamRestClient.CLASS_NAME;\n\t}\n\n\t/**\n\t * Create a new stream.\n\t * @param stream The stream to create.\n\t * @returns The id of the new stream item.\n\t */\n\tpublic async create(stream: IAuditableItemStreamBase): Promise<string> {\n\t\tGuards.object(AuditableItemStreamRestClient.CLASS_NAME, nameof(stream), stream);\n\t\tconst response = await this.fetch<IAuditableItemStreamCreateRequest, ICreatedResponse>(\n\t\t\t\"/\",\n\t\t\t\"POST\",\n\t\t\t{\n\t\t\t\tbody: stream\n\t\t\t}\n\t\t);\n\n\t\treturn response.headers[HeaderTypes.Location];\n\t}\n\n\t/**\n\t * Get a stream header without the entries.\n\t * @param id The id of the stream to get.\n\t * @param cursor Cursor to use for next chunk of entries.\n\t * @param limit Limit the number of entries to return, only applicable if includeEntries is true.\n\t * @param options Additional options for the get operation.\n\t * @param options.includeEntries Whether to include the entries, defaults to false.\n\t * @param options.includeDeleted Whether to include deleted entries, defaults to false.\n\t * @param options.verifyStream Should the stream be verified, defaults to false.\n\t * @param options.verifyEntries Should the entries be verified, defaults to false.\n\t * @returns The stream and entries if found.\n\t * @throws NotFoundError if the stream is not found\n\t */\n\tpublic async get(\n\t\tid: string,\n\t\tcursor?: string,\n\t\tlimit?: number,\n\t\toptions?: {\n\t\t\tincludeEntries?: boolean;\n\t\t\tincludeDeleted?: boolean;\n\t\t\tverifyStream?: boolean;\n\t\t\tverifyEntries?: boolean;\n\t\t}\n\t): Promise<{\n\t\tstream: IAuditableItemStream;\n\t\tcursor?: string;\n\t}> {\n\t\tGuards.stringValue(AuditableItemStreamRestClient.CLASS_NAME, nameof(id), id);\n\n\t\tconst response = await this.fetch<\n\t\t\tIAuditableItemStreamGetRequest,\n\t\t\tIAuditableItemStreamGetResponse\n\t\t>(\"/:id\", \"GET\", {\n\t\t\theaders: {\n\t\t\t\t[HeaderTypes.Accept]: MimeTypes.JsonLd\n\t\t\t},\n\t\t\tpathParams: {\n\t\t\t\tid\n\t\t\t},\n\t\t\tquery: {\n\t\t\t\tcursor,\n\t\t\t\tlimit: Coerce.string(limit),\n\t\t\t\tincludeEntries: Coerce.string(options?.includeEntries),\n\t\t\t\tincludeDeleted: Coerce.string(options?.includeDeleted),\n\t\t\t\tverifyStream: Coerce.string(options?.verifyStream),\n\t\t\t\tverifyEntries: Coerce.string(options?.verifyEntries)\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tstream: response.body,\n\t\t\tcursor: HeaderHelper.extractLinkHeaderRelation(response.headers?.[HeaderTypes.Link], \"next\")\n\t\t\t\t?.urlQueryParams?.cursor\n\t\t};\n\t}\n\n\t/**\n\t * Update a stream.\n\t * @param stream The stream to update, does not update entries.\n\t * @returns Nothing.\n\t */\n\tpublic async update(\n\t\tstream: Pick<IAuditableItemStream, \"@context\" | \"type\" | \"id\" | \"annotationObject\">\n\t): Promise<void> {\n\t\tGuards.object(AuditableItemStreamRestClient.CLASS_NAME, nameof(stream), stream);\n\t\tGuards.stringValue(AuditableItemStreamRestClient.CLASS_NAME, nameof(stream.id), stream.id);\n\n\t\tconst { id, ...rest } = stream;\n\t\tawait this.fetch<IAuditableItemStreamUpdateRequest, INoContentResponse>(\"/:id\", \"PUT\", {\n\t\t\tpathParams: {\n\t\t\t\tid\n\t\t\t},\n\t\t\tbody: rest\n\t\t});\n\t}\n\n\t/**\n\t * Close the stream.\n\t * @param id The id of the stream to close.\n\t * @returns Nothing.\n\t */\n\tpublic async close(id: string): Promise<void> {\n\t\tGuards.stringValue(AuditableItemStreamRestClient.CLASS_NAME, nameof(id), id);\n\n\t\tawait this.fetch<IAuditableItemStreamCloseRequest, INoContentResponse>(\"/:id/close\", \"PUT\", {\n\t\t\tpathParams: {\n\t\t\t\tid\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Delete the stream.\n\t * @param id The id of the stream to remove.\n\t * @returns Nothing.\n\t */\n\tpublic async remove(id: string): Promise<void> {\n\t\tGuards.stringValue(AuditableItemStreamRestClient.CLASS_NAME, nameof(id), id);\n\n\t\tawait this.fetch<IAuditableItemStreamDeleteRequest, 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 streams, will not return entries.\n\t * @param conditions Conditions to use in the query.\n\t * @param orderBy The order for the results, defaults to created.\n\t * @param orderByDirection The direction for the order, defaults to descending.\n\t * @param properties The properties to return, if not provided defaults to id, created and object.\n\t * @param cursor The cursor to request the next chunk of entities.\n\t * @param limit Limit the number of entities to return.\n\t * @returns The entities, which can be partial if a limited keys list was provided.\n\t */\n\tpublic async query(\n\t\tconditions?: IComparator[],\n\t\torderBy?: keyof Pick<IAuditableItemStream, \"dateCreated\" | \"dateModified\">,\n\t\torderByDirection?: SortDirection,\n\t\tproperties?: (keyof IAuditableItemStream)[],\n\t\tcursor?: string,\n\t\tlimit?: number\n\t): Promise<{\n\t\tentries: IAuditableItemStreamList;\n\t\tcursor?: string;\n\t}> {\n\t\tconst response = await this.fetch<\n\t\t\tIAuditableItemStreamListRequest,\n\t\t\tIAuditableItemStreamListResponse\n\t\t>(\"/\", \"GET\", {\n\t\t\theaders: {\n\t\t\t\t[HeaderTypes.Accept]: MimeTypes.JsonLd\n\t\t\t},\n\t\t\tquery: {\n\t\t\t\tconditions: HttpParameterHelper.objectToString(conditions),\n\t\t\t\torderBy,\n\t\t\t\torderByDirection,\n\t\t\t\tproperties: HttpParameterHelper.arrayToString(properties),\n\t\t\t\tcursor,\n\t\t\t\tlimit: Coerce.string(limit)\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tentries: response.body,\n\t\t\tcursor: HeaderHelper.extractLinkHeaderRelation(response.headers?.[HeaderTypes.Link], \"next\")\n\t\t\t\t?.urlQueryParams?.cursor\n\t\t};\n\t}\n\n\t/**\n\t * Create an entry in the stream.\n\t * @param id The id of the stream to update.\n\t * @param entryObject The object for the stream as JSON-LD.\n\t * @returns The id of the created entry, if not provided.\n\t */\n\tpublic async createEntry(id: string, entryObject: IJsonLdNodeObject): Promise<string> {\n\t\tGuards.stringValue(AuditableItemStreamRestClient.CLASS_NAME, nameof(id), id);\n\n\t\tconst response = await this.fetch<IAuditableItemStreamCreateEntryRequest, ICreatedResponse>(\n\t\t\t\"/:id/entries\",\n\t\t\t\"POST\",\n\t\t\t{\n\t\t\t\tpathParams: {\n\t\t\t\t\tid\n\t\t\t\t},\n\t\t\t\tbody: {\n\t\t\t\t\tentryObject\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\treturn response.headers[HeaderTypes.Location];\n\t}\n\n\t/**\n\t * Get the entry from the stream.\n\t * @param id The id of the stream to get.\n\t * @param entryId The id of the stream entry to get.\n\t * @param options Additional options for the get operation.\n\t * @param options.verifyEntry Should the entry be verified, defaults to false.\n\t * @returns The stream and entries if found.\n\t * @throws NotFoundError if the stream is not found.\n\t */\n\tpublic async getEntry(\n\t\tid: string,\n\t\tentryId: string,\n\t\toptions?: {\n\t\t\tverifyEntry?: boolean;\n\t\t}\n\t): Promise<IAuditableItemStreamEntry> {\n\t\tGuards.stringValue(AuditableItemStreamRestClient.CLASS_NAME, nameof(id), id);\n\t\tGuards.stringValue(AuditableItemStreamRestClient.CLASS_NAME, nameof(entryId), entryId);\n\n\t\tconst response = await this.fetch<\n\t\t\tIAuditableItemStreamGetEntryRequest,\n\t\t\tIAuditableItemStreamGetEntryResponse\n\t\t>(\"/:id/entries/:entryId\", \"GET\", {\n\t\t\theaders: {\n\t\t\t\t[HeaderTypes.Accept]: MimeTypes.JsonLd\n\t\t\t},\n\t\t\tquery: {\n\t\t\t\tverifyEntry: Coerce.string(options?.verifyEntry)\n\t\t\t},\n\t\t\tpathParams: {\n\t\t\t\tid,\n\t\t\t\tentryId\n\t\t\t}\n\t\t});\n\n\t\treturn response.body;\n\t}\n\n\t/**\n\t * Get the entry object from the stream.\n\t * @param id The id of the stream to get.\n\t * @param entryId The id of the stream entry to get.\n\t * @returns The stream and entries if found.\n\t * @throws NotFoundError if the stream is not found.\n\t */\n\tpublic async getEntryObject(id: string, entryId: string): Promise<IJsonLdNodeObject> {\n\t\tGuards.stringValue(AuditableItemStreamRestClient.CLASS_NAME, nameof(id), id);\n\t\tGuards.stringValue(AuditableItemStreamRestClient.CLASS_NAME, nameof(entryId), entryId);\n\n\t\tconst response = await this.fetch<\n\t\t\tIAuditableItemStreamGetEntryObjectRequest,\n\t\t\tIAuditableItemStreamGetEntryObjectResponse\n\t\t>(\"/:id/entries/:entryId/object\", \"GET\", {\n\t\t\theaders: {\n\t\t\t\t[HeaderTypes.Accept]: MimeTypes.JsonLd\n\t\t\t},\n\t\t\tpathParams: {\n\t\t\t\tid,\n\t\t\t\tentryId\n\t\t\t}\n\t\t});\n\n\t\treturn response.body;\n\t}\n\n\t/**\n\t * Update an entry in the stream.\n\t * @param id The id of the stream to update.\n\t * @param entryId The id of the entry to update.\n\t * @param entryObject The object for the entry as JSON-LD.\n\t * @returns Nothing.\n\t */\n\tpublic async updateEntry(\n\t\tid: string,\n\t\tentryId: string,\n\t\tentryObject: IJsonLdNodeObject\n\t): Promise<void> {\n\t\tGuards.stringValue(AuditableItemStreamRestClient.CLASS_NAME, nameof(id), id);\n\t\tGuards.stringValue(AuditableItemStreamRestClient.CLASS_NAME, nameof(entryId), entryId);\n\n\t\tawait this.fetch<IAuditableItemStreamUpdateEntryRequest, INoContentResponse>(\n\t\t\t\"/:id/entries/:entryId\",\n\t\t\t\"PUT\",\n\t\t\t{\n\t\t\t\tpathParams: {\n\t\t\t\t\tid,\n\t\t\t\t\tentryId\n\t\t\t\t},\n\t\t\t\tbody: {\n\t\t\t\t\tentryObject\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t * Remove from the stream.\n\t * @param id The id of the stream to remove from.\n\t * @param entryId The id of the entry to remove.\n\t * @returns Nothing.\n\t */\n\tpublic async removeEntry(id: string, entryId: string): Promise<void> {\n\t\tGuards.stringValue(AuditableItemStreamRestClient.CLASS_NAME, nameof(id), id);\n\t\tGuards.stringValue(AuditableItemStreamRestClient.CLASS_NAME, nameof(entryId), entryId);\n\n\t\tawait this.fetch<IAuditableItemStreamDeleteEntryRequest, INoContentResponse>(\n\t\t\t\"/:id/entries/:entryId\",\n\t\t\t\"DELETE\",\n\t\t\t{\n\t\t\t\tpathParams: {\n\t\t\t\t\tid,\n\t\t\t\t\tentryId\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t * Get the entries for the stream.\n\t * @param id The id of the stream to get, if undefined returns all matching entries.\n\t * @param options Additional options for the get operation.\n\t * @param options.conditions The conditions to filter the stream.\n\t * @param options.includeDeleted Whether to include deleted entries, defaults to false.\n\t * @param options.verifyEntries Should the entries be verified, defaults to false.\n\t * @param options.limit How many entries to return.\n\t * @param options.cursor Cursor to use for next chunk of data.\n\t * @param options.order Retrieve the entries in ascending/descending time order, defaults to Ascending.\n\t * @returns The stream and entries if found.\n\t * @throws NotFoundError if the stream is not found.\n\t */\n\tpublic async getEntries(\n\t\tid?: string,\n\t\toptions?: {\n\t\t\tconditions?: IComparator[];\n\t\t\tincludeDeleted?: boolean;\n\t\t\tverifyEntries?: boolean;\n\t\t\tlimit?: number;\n\t\t\tcursor?: string;\n\t\t\torder?: SortDirection;\n\t\t}\n\t): Promise<{\n\t\tentries: IAuditableItemStreamEntryList;\n\t\tcursor?: string;\n\t}> {\n\t\tconst queryParams = {\n\t\t\tconditions: HttpParameterHelper.objectToString(options?.conditions),\n\t\t\tincludeDeleted: Coerce.string(options?.includeDeleted),\n\t\t\tverifyEntries: Coerce.string(options?.verifyEntries),\n\t\t\tlimit: Coerce.string(options?.limit),\n\t\t\tcursor: options?.cursor,\n\t\t\torder: options?.order\n\t\t};\n\n\t\tlet response;\n\t\tif (!Is.empty(id)) {\n\t\t\tGuards.stringValue(AuditableItemStreamRestClient.CLASS_NAME, nameof(id), id);\n\n\t\t\tresponse = await this.fetch<\n\t\t\t\tIAuditableItemStreamListEntriesRequest,\n\t\t\t\tIAuditableItemStreamListEntriesResponse\n\t\t\t>(\"/:id/entries\", \"GET\", {\n\t\t\t\theaders: {\n\t\t\t\t\t[HeaderTypes.Accept]: MimeTypes.JsonLd\n\t\t\t\t},\n\t\t\t\tpathParams: {\n\t\t\t\t\tid\n\t\t\t\t},\n\t\t\t\tquery: queryParams\n\t\t\t});\n\t\t} else {\n\t\t\tresponse = await this.fetch<\n\t\t\t\tIAuditableItemStreamListEntriesNoStreamRequest,\n\t\t\t\tIAuditableItemStreamListEntriesResponse\n\t\t\t>(\"/entries\", \"GET\", {\n\t\t\t\theaders: {\n\t\t\t\t\t[HeaderTypes.Accept]: MimeTypes.JsonLd\n\t\t\t\t},\n\t\t\t\tquery: queryParams\n\t\t\t});\n\t\t}\n\n\t\treturn {\n\t\t\tentries: response.body,\n\t\t\tcursor: HeaderHelper.extractLinkHeaderRelation(response.headers?.[HeaderTypes.Link], \"next\")\n\t\t\t\t?.urlQueryParams?.cursor\n\t\t};\n\t}\n\n\t/**\n\t * Get the entry objects for the stream.\n\t * @param id The id of the stream to get, if undefined returns all matching entries.\n\t * @param options Additional options for the get operation.\n\t * @param options.conditions The conditions to filter the stream.\n\t * @param options.includeDeleted Whether to include deleted entries, defaults to false.\n\t * @param options.limit How many entries to return.\n\t * @param options.cursor Cursor to use for next chunk of data.\n\t * @param options.order Retrieve the entries in ascending/descending time order, defaults to Ascending.\n\t * @returns The stream and entries if found.\n\t * @throws NotFoundError if the stream is not found.\n\t */\n\tpublic async getEntryObjects(\n\t\tid?: string,\n\t\toptions?: {\n\t\t\tconditions?: IComparator[];\n\t\t\tincludeDeleted?: boolean;\n\t\t\tlimit?: number;\n\t\t\tcursor?: string;\n\t\t\torder?: SortDirection;\n\t\t}\n\t): Promise<{\n\t\tentries: IAuditableItemStreamEntryObjectList;\n\t\tcursor?: string;\n\t}> {\n\t\tconst queryParams = {\n\t\t\tconditions: HttpParameterHelper.objectToString(options?.conditions),\n\t\t\tincludeDeleted: Coerce.string(options?.includeDeleted),\n\t\t\tlimit: Coerce.string(options?.limit),\n\t\t\tcursor: options?.cursor,\n\t\t\torder: options?.order\n\t\t};\n\n\t\tlet response;\n\t\tif (!Is.empty(id)) {\n\t\t\tGuards.stringValue(AuditableItemStreamRestClient.CLASS_NAME, nameof(id), id);\n\t\t\tresponse = await this.fetch<\n\t\t\t\tIAuditableItemStreamListEntryObjectsRequest,\n\t\t\t\tIAuditableItemStreamListEntryObjectsResponse\n\t\t\t>(\"/:id/entries/objects\", \"GET\", {\n\t\t\t\theaders: {\n\t\t\t\t\t[HeaderTypes.Accept]: MimeTypes.JsonLd\n\t\t\t\t},\n\t\t\t\tpathParams: {\n\t\t\t\t\tid\n\t\t\t\t},\n\t\t\t\tquery: queryParams\n\t\t\t});\n\t\t} else {\n\t\t\tresponse = await this.fetch<\n\t\t\t\tIAuditableItemStreamListEntryObjectsNoStreamRequest,\n\t\t\t\tIAuditableItemStreamListEntryObjectsResponse\n\t\t\t>(\"/entries/objects\", \"GET\", {\n\t\t\t\theaders: {\n\t\t\t\t\t[HeaderTypes.Accept]: MimeTypes.JsonLd\n\t\t\t\t},\n\t\t\t\tquery: queryParams\n\t\t\t});\n\t\t}\n\n\t\treturn {\n\t\t\tentries: response.body,\n\t\t\tcursor: HeaderHelper.extractLinkHeaderRelation(response.headers?.[HeaderTypes.Link], \"next\")\n\t\t\t\t?.urlQueryParams?.cursor\n\t\t};\n\t}\n\n\t/**\n\t * Remove the verifiable storage for the stream and entries, not supported on client.\n\t * @param id The id of the stream to remove the storage from.\n\t * @returns Nothing.\n\t * @throws NotFoundError if the vertex is not found.\n\t */\n\tpublic async removeVerifiable(id: string): Promise<void> {\n\t\tthrow new NotSupportedError(AuditableItemStreamRestClient.CLASS_NAME, \"notSupportedOnClient\", {\n\t\t\tmethodName: \"removeVerifiable\"\n\t\t});\n\t}\n}\n"]}
|
package/docs/changelog.md
CHANGED
|
@@ -1,11 +1,39 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [0.0.3-next.
|
|
3
|
+
## [0.0.3-next.15](https://github.com/iotaledger/twin-auditable-item-stream/compare/auditable-item-stream-rest-client-v0.0.3-next.14...auditable-item-stream-rest-client-v0.0.3-next.15) (2026-05-12)
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
### Features
|
|
7
7
|
|
|
8
|
-
*
|
|
8
|
+
* typescript 6 update ([eb9a4db](https://github.com/iotaledger/twin-auditable-item-stream/commit/eb9a4db5dc693602464ab11b55759a3e86d1ecab))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @twin.org/auditable-item-stream-models bumped from 0.0.3-next.14 to 0.0.3-next.15
|
|
16
|
+
|
|
17
|
+
## [0.0.3-next.14](https://github.com/iotaledger/twin-auditable-item-stream/compare/auditable-item-stream-rest-client-v0.0.3-next.13...auditable-item-stream-rest-client-v0.0.3-next.14) (2026-04-16)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* change close REST route from POST to PUT ([047eb4f](https://github.com/iotaledger/twin-auditable-item-stream/commit/047eb4ff63f5cd4a29fdca006799b8c5fee08ec9))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Dependencies
|
|
26
|
+
|
|
27
|
+
* The following workspace dependencies were updated
|
|
28
|
+
* dependencies
|
|
29
|
+
* @twin.org/auditable-item-stream-models bumped from 0.0.3-next.13 to 0.0.3-next.14
|
|
30
|
+
|
|
31
|
+
## [0.0.3-next.13](https://github.com/iotaledger/twin-auditable-item-stream/compare/auditable-item-stream-rest-client-v0.0.3-next.12...auditable-item-stream-rest-client-v0.0.3-next.13) (2026-04-15)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Features
|
|
35
|
+
|
|
36
|
+
* add closable stream ([#59](https://github.com/iotaledger/twin-auditable-item-stream/issues/59)) ([26d3d08](https://github.com/iotaledger/twin-auditable-item-stream/commit/26d3d0887e1e57ca81859be5b56e853335a88d78))
|
|
9
37
|
|
|
10
38
|
|
|
11
39
|
### Dependencies
|
|
@@ -14,12 +42,12 @@
|
|
|
14
42
|
* dependencies
|
|
15
43
|
* @twin.org/auditable-item-stream-models bumped from 0.0.3-next.12 to 0.0.3-next.13
|
|
16
44
|
|
|
17
|
-
## [0.0.3-next.12](https://github.com/
|
|
45
|
+
## [0.0.3-next.12](https://github.com/iotaledger/twin-auditable-item-stream/compare/auditable-item-stream-rest-client-v0.0.3-next.11...auditable-item-stream-rest-client-v0.0.3-next.12) (2026-03-25)
|
|
18
46
|
|
|
19
47
|
|
|
20
48
|
### Features
|
|
21
49
|
|
|
22
|
-
* add validation and create structural changes ([#56](https://github.com/
|
|
50
|
+
* add validation and create structural changes ([#56](https://github.com/iotaledger/twin-auditable-item-stream/issues/56)) ([f7183b4](https://github.com/iotaledger/twin-auditable-item-stream/commit/f7183b42bf9563f8aa015476b82959fba2936bcd))
|
|
23
51
|
|
|
24
52
|
|
|
25
53
|
### Dependencies
|
|
@@ -28,7 +56,7 @@
|
|
|
28
56
|
* dependencies
|
|
29
57
|
* @twin.org/auditable-item-stream-models bumped from 0.0.3-next.11 to 0.0.3-next.12
|
|
30
58
|
|
|
31
|
-
## [0.0.3-next.11](https://github.com/
|
|
59
|
+
## [0.0.3-next.11](https://github.com/iotaledger/twin-auditable-item-stream/compare/auditable-item-stream-rest-client-v0.0.3-next.10...auditable-item-stream-rest-client-v0.0.3-next.11) (2026-02-25)
|
|
32
60
|
|
|
33
61
|
|
|
34
62
|
### Miscellaneous Chores
|
|
@@ -42,12 +70,12 @@
|
|
|
42
70
|
* dependencies
|
|
43
71
|
* @twin.org/auditable-item-stream-models bumped from 0.0.3-next.10 to 0.0.3-next.11
|
|
44
72
|
|
|
45
|
-
## [0.0.3-next.10](https://github.com/
|
|
73
|
+
## [0.0.3-next.10](https://github.com/iotaledger/twin-auditable-item-stream/compare/auditable-item-stream-rest-client-v0.0.3-next.9...auditable-item-stream-rest-client-v0.0.3-next.10) (2026-02-23)
|
|
46
74
|
|
|
47
75
|
|
|
48
76
|
### Features
|
|
49
77
|
|
|
50
|
-
* query with no stream id ([#53](https://github.com/
|
|
78
|
+
* query with no stream id ([#53](https://github.com/iotaledger/twin-auditable-item-stream/issues/53)) ([733fb20](https://github.com/iotaledger/twin-auditable-item-stream/commit/733fb209dfdb05a5f031bacd47ceab1901140286))
|
|
51
79
|
|
|
52
80
|
|
|
53
81
|
### Dependencies
|
|
@@ -56,12 +84,12 @@
|
|
|
56
84
|
* dependencies
|
|
57
85
|
* @twin.org/auditable-item-stream-models bumped from 0.0.3-next.9 to 0.0.3-next.10
|
|
58
86
|
|
|
59
|
-
## [0.0.3-next.9](https://github.com/
|
|
87
|
+
## [0.0.3-next.9](https://github.com/iotaledger/twin-auditable-item-stream/compare/auditable-item-stream-rest-client-v0.0.3-next.8...auditable-item-stream-rest-client-v0.0.3-next.9) (2026-02-12)
|
|
60
88
|
|
|
61
89
|
|
|
62
90
|
### Features
|
|
63
91
|
|
|
64
|
-
* add number of items ([#47](https://github.com/
|
|
92
|
+
* add number of items ([#47](https://github.com/iotaledger/twin-auditable-item-stream/issues/47)) ([149fc9f](https://github.com/iotaledger/twin-auditable-item-stream/commit/149fc9f505a86af0578551c09f7e8aa763f01be7))
|
|
65
93
|
|
|
66
94
|
|
|
67
95
|
### Dependencies
|
|
@@ -70,7 +98,7 @@
|
|
|
70
98
|
* dependencies
|
|
71
99
|
* @twin.org/auditable-item-stream-models bumped from 0.0.3-next.8 to 0.0.3-next.9
|
|
72
100
|
|
|
73
|
-
## [0.0.3-next.8](https://github.com/
|
|
101
|
+
## [0.0.3-next.8](https://github.com/iotaledger/twin-auditable-item-stream/compare/auditable-item-stream-rest-client-v0.0.3-next.7...auditable-item-stream-rest-client-v0.0.3-next.8) (2026-02-11)
|
|
74
102
|
|
|
75
103
|
|
|
76
104
|
### Miscellaneous Chores
|
|
@@ -84,7 +112,7 @@
|
|
|
84
112
|
* dependencies
|
|
85
113
|
* @twin.org/auditable-item-stream-models bumped from 0.0.3-next.7 to 0.0.3-next.8
|
|
86
114
|
|
|
87
|
-
## [0.0.3-next.7](https://github.com/
|
|
115
|
+
## [0.0.3-next.7](https://github.com/iotaledger/twin-auditable-item-stream/compare/auditable-item-stream-rest-client-v0.0.3-next.6...auditable-item-stream-rest-client-v0.0.3-next.7) (2026-01-26)
|
|
88
116
|
|
|
89
117
|
|
|
90
118
|
### Miscellaneous Chores
|
|
@@ -98,12 +126,12 @@
|
|
|
98
126
|
* dependencies
|
|
99
127
|
* @twin.org/auditable-item-stream-models bumped from 0.0.3-next.6 to 0.0.3-next.7
|
|
100
128
|
|
|
101
|
-
## [0.0.3-next.6](https://github.com/
|
|
129
|
+
## [0.0.3-next.6](https://github.com/iotaledger/twin-auditable-item-stream/compare/auditable-item-stream-rest-client-v0.0.3-next.5...auditable-item-stream-rest-client-v0.0.3-next.6) (2026-01-23)
|
|
102
130
|
|
|
103
131
|
|
|
104
132
|
### Features
|
|
105
133
|
|
|
106
|
-
* replace nextItem property with Link header ([#37](https://github.com/
|
|
134
|
+
* replace nextItem property with Link header ([#37](https://github.com/iotaledger/twin-auditable-item-stream/issues/37)) ([83578f1](https://github.com/iotaledger/twin-auditable-item-stream/commit/83578f19fb964703f1b452c5d13430060e36e620))
|
|
107
135
|
|
|
108
136
|
|
|
109
137
|
### Dependencies
|
|
@@ -112,7 +140,7 @@
|
|
|
112
140
|
* dependencies
|
|
113
141
|
* @twin.org/auditable-item-stream-models bumped from 0.0.3-next.5 to 0.0.3-next.6
|
|
114
142
|
|
|
115
|
-
## [0.0.3-next.5](https://github.com/
|
|
143
|
+
## [0.0.3-next.5](https://github.com/iotaledger/twin-auditable-item-stream/compare/auditable-item-stream-rest-client-v0.0.3-next.4...auditable-item-stream-rest-client-v0.0.3-next.5) (2026-01-22)
|
|
116
144
|
|
|
117
145
|
|
|
118
146
|
### Miscellaneous Chores
|
|
@@ -126,7 +154,7 @@
|
|
|
126
154
|
* dependencies
|
|
127
155
|
* @twin.org/auditable-item-stream-models bumped from 0.0.3-next.4 to 0.0.3-next.5
|
|
128
156
|
|
|
129
|
-
## [0.0.3-next.4](https://github.com/
|
|
157
|
+
## [0.0.3-next.4](https://github.com/iotaledger/twin-auditable-item-stream/compare/auditable-item-stream-rest-client-v0.0.3-next.3...auditable-item-stream-rest-client-v0.0.3-next.4) (2026-01-21)
|
|
130
158
|
|
|
131
159
|
|
|
132
160
|
### Miscellaneous Chores
|
|
@@ -140,7 +168,7 @@
|
|
|
140
168
|
* dependencies
|
|
141
169
|
* @twin.org/auditable-item-stream-models bumped from 0.0.3-next.3 to 0.0.3-next.4
|
|
142
170
|
|
|
143
|
-
## [0.0.3-next.3](https://github.com/
|
|
171
|
+
## [0.0.3-next.3](https://github.com/iotaledger/twin-auditable-item-stream/compare/auditable-item-stream-rest-client-v0.0.3-next.2...auditable-item-stream-rest-client-v0.0.3-next.3) (2026-01-14)
|
|
144
172
|
|
|
145
173
|
|
|
146
174
|
### Miscellaneous Chores
|
|
@@ -154,7 +182,7 @@
|
|
|
154
182
|
* dependencies
|
|
155
183
|
* @twin.org/auditable-item-stream-models bumped from 0.0.3-next.2 to 0.0.3-next.3
|
|
156
184
|
|
|
157
|
-
## [0.0.3-next.2](https://github.com/
|
|
185
|
+
## [0.0.3-next.2](https://github.com/iotaledger/twin-auditable-item-stream/compare/auditable-item-stream-rest-client-v0.0.3-next.1...auditable-item-stream-rest-client-v0.0.3-next.2) (2025-11-28)
|
|
158
186
|
|
|
159
187
|
|
|
160
188
|
### Miscellaneous Chores
|
|
@@ -168,24 +196,24 @@
|
|
|
168
196
|
* dependencies
|
|
169
197
|
* @twin.org/auditable-item-stream-models bumped from 0.0.3-next.1 to 0.0.3-next.2
|
|
170
198
|
|
|
171
|
-
## [0.0.3-next.1](https://github.com/
|
|
199
|
+
## [0.0.3-next.1](https://github.com/iotaledger/twin-auditable-item-stream/compare/auditable-item-stream-rest-client-v0.0.3-next.0...auditable-item-stream-rest-client-v0.0.3-next.1) (2025-11-12)
|
|
172
200
|
|
|
173
201
|
|
|
174
202
|
### Features
|
|
175
203
|
|
|
176
|
-
* add context id features ([#28](https://github.com/
|
|
177
|
-
* add validate-locales ([4babc73](https://github.com/
|
|
178
|
-
* eslint migration to flat config ([bd9cb2e](https://github.com/
|
|
179
|
-
* export remove verifiable on client ([554749b](https://github.com/
|
|
180
|
-
* update dependencies ([9ff038b](https://github.com/
|
|
181
|
-
* update framework core ([5621601](https://github.com/
|
|
182
|
-
* use new nameof operators ([d1a3bf8](https://github.com/
|
|
183
|
-
* use shared store mechanism ([#7](https://github.com/
|
|
204
|
+
* add context id features ([#28](https://github.com/iotaledger/twin-auditable-item-stream/issues/28)) ([10d788a](https://github.com/iotaledger/twin-auditable-item-stream/commit/10d788abfd73fdafe40b9218b399c4d652be2370))
|
|
205
|
+
* add validate-locales ([4babc73](https://github.com/iotaledger/twin-auditable-item-stream/commit/4babc7331f7fed61450fe2e2d8eccee52367f2be))
|
|
206
|
+
* eslint migration to flat config ([bd9cb2e](https://github.com/iotaledger/twin-auditable-item-stream/commit/bd9cb2ea2599300332c76a9c738a6ff437a5cc5b))
|
|
207
|
+
* export remove verifiable on client ([554749b](https://github.com/iotaledger/twin-auditable-item-stream/commit/554749b8369896a69de6392881171023a70f5cf1))
|
|
208
|
+
* update dependencies ([9ff038b](https://github.com/iotaledger/twin-auditable-item-stream/commit/9ff038b7e76e9fb586be4f2321231f04258ef794))
|
|
209
|
+
* update framework core ([5621601](https://github.com/iotaledger/twin-auditable-item-stream/commit/562160167c5082b9dae1b0bf68482ce2af1e7dce))
|
|
210
|
+
* use new nameof operators ([d1a3bf8](https://github.com/iotaledger/twin-auditable-item-stream/commit/d1a3bf8369f899fff8fd9d7b3b068f270fd8603d))
|
|
211
|
+
* use shared store mechanism ([#7](https://github.com/iotaledger/twin-auditable-item-stream/issues/7)) ([2aca4b8](https://github.com/iotaledger/twin-auditable-item-stream/commit/2aca4b85b0102f91c90619f02b116541786cf539))
|
|
184
212
|
|
|
185
213
|
|
|
186
214
|
### Bug Fixes
|
|
187
215
|
|
|
188
|
-
* query params force coercion ([fcdd52c](https://github.com/
|
|
216
|
+
* query params force coercion ([fcdd52c](https://github.com/iotaledger/twin-auditable-item-stream/commit/fcdd52cf8262a3bc19f6e7e9e6ef145890a9c8aa))
|
|
189
217
|
|
|
190
218
|
|
|
191
219
|
### Dependencies
|
|
@@ -194,12 +222,12 @@
|
|
|
194
222
|
* dependencies
|
|
195
223
|
* @twin.org/auditable-item-stream-models bumped from 0.0.3-next.0 to 0.0.3-next.1
|
|
196
224
|
|
|
197
|
-
## [0.0.2-next.5](https://github.com/
|
|
225
|
+
## [0.0.2-next.5](https://github.com/iotaledger/twin-auditable-item-stream/compare/auditable-item-stream-rest-client-v0.0.2-next.4...auditable-item-stream-rest-client-v0.0.2-next.5) (2025-10-09)
|
|
198
226
|
|
|
199
227
|
|
|
200
228
|
### Features
|
|
201
229
|
|
|
202
|
-
* add validate-locales ([4babc73](https://github.com/
|
|
230
|
+
* add validate-locales ([4babc73](https://github.com/iotaledger/twin-auditable-item-stream/commit/4babc7331f7fed61450fe2e2d8eccee52367f2be))
|
|
203
231
|
|
|
204
232
|
|
|
205
233
|
### Dependencies
|
|
@@ -208,12 +236,12 @@
|
|
|
208
236
|
* dependencies
|
|
209
237
|
* @twin.org/auditable-item-stream-models bumped from 0.0.2-next.4 to 0.0.2-next.5
|
|
210
238
|
|
|
211
|
-
## [0.0.2-next.4](https://github.com/
|
|
239
|
+
## [0.0.2-next.4](https://github.com/iotaledger/twin-auditable-item-stream/compare/auditable-item-stream-rest-client-v0.0.2-next.3...auditable-item-stream-rest-client-v0.0.2-next.4) (2025-09-29)
|
|
212
240
|
|
|
213
241
|
|
|
214
242
|
### Features
|
|
215
243
|
|
|
216
|
-
* use new nameof operators ([d1a3bf8](https://github.com/
|
|
244
|
+
* use new nameof operators ([d1a3bf8](https://github.com/iotaledger/twin-auditable-item-stream/commit/d1a3bf8369f899fff8fd9d7b3b068f270fd8603d))
|
|
217
245
|
|
|
218
246
|
|
|
219
247
|
### Dependencies
|
|
@@ -222,12 +250,12 @@
|
|
|
222
250
|
* dependencies
|
|
223
251
|
* @twin.org/auditable-item-stream-models bumped from 0.0.2-next.3 to 0.0.2-next.4
|
|
224
252
|
|
|
225
|
-
## [0.0.2-next.3](https://github.com/
|
|
253
|
+
## [0.0.2-next.3](https://github.com/iotaledger/twin-auditable-item-stream/compare/auditable-item-stream-rest-client-v0.0.2-next.2...auditable-item-stream-rest-client-v0.0.2-next.3) (2025-08-29)
|
|
226
254
|
|
|
227
255
|
|
|
228
256
|
### Features
|
|
229
257
|
|
|
230
|
-
* eslint migration to flat config ([bd9cb2e](https://github.com/
|
|
258
|
+
* eslint migration to flat config ([bd9cb2e](https://github.com/iotaledger/twin-auditable-item-stream/commit/bd9cb2ea2599300332c76a9c738a6ff437a5cc5b))
|
|
231
259
|
|
|
232
260
|
|
|
233
261
|
### Dependencies
|
|
@@ -236,12 +264,12 @@
|
|
|
236
264
|
* dependencies
|
|
237
265
|
* @twin.org/auditable-item-stream-models bumped from 0.0.2-next.2 to 0.0.2-next.3
|
|
238
266
|
|
|
239
|
-
## [0.0.2-next.2](https://github.com/
|
|
267
|
+
## [0.0.2-next.2](https://github.com/iotaledger/twin-auditable-item-stream/compare/auditable-item-stream-rest-client-v0.0.2-next.1...auditable-item-stream-rest-client-v0.0.2-next.2) (2025-08-20)
|
|
240
268
|
|
|
241
269
|
|
|
242
270
|
### Features
|
|
243
271
|
|
|
244
|
-
* update framework core ([5621601](https://github.com/
|
|
272
|
+
* update framework core ([5621601](https://github.com/iotaledger/twin-auditable-item-stream/commit/562160167c5082b9dae1b0bf68482ce2af1e7dce))
|
|
245
273
|
|
|
246
274
|
|
|
247
275
|
### Dependencies
|
|
@@ -250,19 +278,19 @@
|
|
|
250
278
|
* dependencies
|
|
251
279
|
* @twin.org/auditable-item-stream-models bumped from 0.0.2-next.1 to 0.0.2-next.2
|
|
252
280
|
|
|
253
|
-
## [0.0.2-next.1](https://github.com/
|
|
281
|
+
## [0.0.2-next.1](https://github.com/iotaledger/twin-auditable-item-stream/compare/auditable-item-stream-rest-client-v0.0.2-next.0...auditable-item-stream-rest-client-v0.0.2-next.1) (2025-07-21)
|
|
254
282
|
|
|
255
283
|
|
|
256
284
|
### Features
|
|
257
285
|
|
|
258
|
-
* export remove verifiable on client ([554749b](https://github.com/
|
|
259
|
-
* update dependencies ([9ff038b](https://github.com/
|
|
260
|
-
* use shared store mechanism ([#7](https://github.com/
|
|
286
|
+
* export remove verifiable on client ([554749b](https://github.com/iotaledger/twin-auditable-item-stream/commit/554749b8369896a69de6392881171023a70f5cf1))
|
|
287
|
+
* update dependencies ([9ff038b](https://github.com/iotaledger/twin-auditable-item-stream/commit/9ff038b7e76e9fb586be4f2321231f04258ef794))
|
|
288
|
+
* use shared store mechanism ([#7](https://github.com/iotaledger/twin-auditable-item-stream/issues/7)) ([2aca4b8](https://github.com/iotaledger/twin-auditable-item-stream/commit/2aca4b85b0102f91c90619f02b116541786cf539))
|
|
261
289
|
|
|
262
290
|
|
|
263
291
|
### Bug Fixes
|
|
264
292
|
|
|
265
|
-
* query params force coercion ([fcdd52c](https://github.com/
|
|
293
|
+
* query params force coercion ([fcdd52c](https://github.com/iotaledger/twin-auditable-item-stream/commit/fcdd52cf8262a3bc19f6e7e9e6ef145890a9c8aa))
|
|
266
294
|
|
|
267
295
|
|
|
268
296
|
### Dependencies
|
|
@@ -276,14 +304,14 @@
|
|
|
276
304
|
|
|
277
305
|
### Features
|
|
278
306
|
|
|
279
|
-
* release to production ([94d5757](https://github.com/
|
|
280
|
-
* update dependencies ([9ff038b](https://github.com/
|
|
281
|
-
* use shared store mechanism ([#7](https://github.com/
|
|
307
|
+
* release to production ([94d5757](https://github.com/iotaledger/twin-auditable-item-stream/commit/94d5757ff28b5462564f4ded56c8a3db781f2901))
|
|
308
|
+
* update dependencies ([9ff038b](https://github.com/iotaledger/twin-auditable-item-stream/commit/9ff038b7e76e9fb586be4f2321231f04258ef794))
|
|
309
|
+
* use shared store mechanism ([#7](https://github.com/iotaledger/twin-auditable-item-stream/issues/7)) ([2aca4b8](https://github.com/iotaledger/twin-auditable-item-stream/commit/2aca4b85b0102f91c90619f02b116541786cf539))
|
|
282
310
|
|
|
283
311
|
|
|
284
312
|
### Bug Fixes
|
|
285
313
|
|
|
286
|
-
* query params force coercion ([fcdd52c](https://github.com/
|
|
314
|
+
* query params force coercion ([fcdd52c](https://github.com/iotaledger/twin-auditable-item-stream/commit/fcdd52cf8262a3bc19f6e7e9e6ef145890a9c8aa))
|
|
287
315
|
|
|
288
316
|
|
|
289
317
|
### Dependencies
|
|
@@ -292,12 +320,12 @@
|
|
|
292
320
|
* dependencies
|
|
293
321
|
* @twin.org/auditable-item-stream-models bumped from ^0.0.0 to ^0.0.1
|
|
294
322
|
|
|
295
|
-
## [0.0.1-next.37](https://github.com/
|
|
323
|
+
## [0.0.1-next.37](https://github.com/iotaledger/twin-auditable-item-stream/compare/auditable-item-stream-rest-client-v0.0.1-next.36...auditable-item-stream-rest-client-v0.0.1-next.37) (2025-06-20)
|
|
296
324
|
|
|
297
325
|
|
|
298
326
|
### Bug Fixes
|
|
299
327
|
|
|
300
|
-
* query params force coercion ([fcdd52c](https://github.com/
|
|
328
|
+
* query params force coercion ([fcdd52c](https://github.com/iotaledger/twin-auditable-item-stream/commit/fcdd52cf8262a3bc19f6e7e9e6ef145890a9c8aa))
|
|
301
329
|
|
|
302
330
|
|
|
303
331
|
### Dependencies
|
|
@@ -306,7 +334,7 @@
|
|
|
306
334
|
* dependencies
|
|
307
335
|
* @twin.org/auditable-item-stream-models bumped from 0.0.1-next.36 to 0.0.1-next.37
|
|
308
336
|
|
|
309
|
-
## [0.0.1-next.36](https://github.com/
|
|
337
|
+
## [0.0.1-next.36](https://github.com/iotaledger/twin-auditable-item-stream/compare/auditable-item-stream-rest-client-v0.0.1-next.35...auditable-item-stream-rest-client-v0.0.1-next.36) (2025-06-18)
|
|
310
338
|
|
|
311
339
|
|
|
312
340
|
### Miscellaneous Chores
|
|
@@ -320,12 +348,12 @@
|
|
|
320
348
|
* dependencies
|
|
321
349
|
* @twin.org/auditable-item-stream-models bumped from 0.0.1-next.35 to 0.0.1-next.36
|
|
322
350
|
|
|
323
|
-
## [0.0.1-next.35](https://github.com/
|
|
351
|
+
## [0.0.1-next.35](https://github.com/iotaledger/twin-auditable-item-stream/compare/auditable-item-stream-rest-client-v0.0.1-next.34...auditable-item-stream-rest-client-v0.0.1-next.35) (2025-06-12)
|
|
324
352
|
|
|
325
353
|
|
|
326
354
|
### Features
|
|
327
355
|
|
|
328
|
-
* update dependencies ([9ff038b](https://github.com/
|
|
356
|
+
* update dependencies ([9ff038b](https://github.com/iotaledger/twin-auditable-item-stream/commit/9ff038b7e76e9fb586be4f2321231f04258ef794))
|
|
329
357
|
|
|
330
358
|
|
|
331
359
|
### Dependencies
|
|
@@ -334,7 +362,7 @@
|
|
|
334
362
|
* dependencies
|
|
335
363
|
* @twin.org/auditable-item-stream-models bumped from 0.0.1-next.34 to 0.0.1-next.35
|
|
336
364
|
|
|
337
|
-
## [0.0.1-next.34](https://github.com/
|
|
365
|
+
## [0.0.1-next.34](https://github.com/iotaledger/twin-auditable-item-stream/compare/auditable-item-stream-rest-client-v0.0.1-next.33...auditable-item-stream-rest-client-v0.0.1-next.34) (2025-06-03)
|
|
338
366
|
|
|
339
367
|
|
|
340
368
|
### Miscellaneous Chores
|
|
@@ -348,7 +376,7 @@
|
|
|
348
376
|
* dependencies
|
|
349
377
|
* @twin.org/auditable-item-stream-models bumped from 0.0.1-next.33 to 0.0.1-next.34
|
|
350
378
|
|
|
351
|
-
## [0.0.1-next.33](https://github.com/
|
|
379
|
+
## [0.0.1-next.33](https://github.com/iotaledger/twin-auditable-item-stream/compare/auditable-item-stream-rest-client-v0.0.1-next.32...auditable-item-stream-rest-client-v0.0.1-next.33) (2025-05-28)
|
|
352
380
|
|
|
353
381
|
|
|
354
382
|
### Miscellaneous Chores
|
|
@@ -362,7 +390,7 @@
|
|
|
362
390
|
* dependencies
|
|
363
391
|
* @twin.org/auditable-item-stream-models bumped from 0.0.1-next.32 to 0.0.1-next.33
|
|
364
392
|
|
|
365
|
-
## [0.0.1-next.32](https://github.com/
|
|
393
|
+
## [0.0.1-next.32](https://github.com/iotaledger/twin-auditable-item-stream/compare/auditable-item-stream-rest-client-v0.0.1-next.31...auditable-item-stream-rest-client-v0.0.1-next.32) (2025-05-08)
|
|
366
394
|
|
|
367
395
|
|
|
368
396
|
### Miscellaneous Chores
|
|
@@ -376,7 +404,7 @@
|
|
|
376
404
|
* dependencies
|
|
377
405
|
* @twin.org/auditable-item-stream-models bumped from 0.0.1-next.31 to 0.0.1-next.32
|
|
378
406
|
|
|
379
|
-
## [0.0.1-next.31](https://github.com/
|
|
407
|
+
## [0.0.1-next.31](https://github.com/iotaledger/twin-auditable-item-stream/compare/auditable-item-stream-rest-client-v0.0.1-next.30...auditable-item-stream-rest-client-v0.0.1-next.31) (2025-04-25)
|
|
380
408
|
|
|
381
409
|
|
|
382
410
|
### Miscellaneous Chores
|
|
@@ -390,7 +418,7 @@
|
|
|
390
418
|
* dependencies
|
|
391
419
|
* @twin.org/auditable-item-stream-models bumped from 0.0.1-next.30 to 0.0.1-next.31
|
|
392
420
|
|
|
393
|
-
## [0.0.1-next.30](https://github.com/
|
|
421
|
+
## [0.0.1-next.30](https://github.com/iotaledger/twin-auditable-item-stream/compare/auditable-item-stream-rest-client-v0.0.1-next.29...auditable-item-stream-rest-client-v0.0.1-next.30) (2025-04-25)
|
|
394
422
|
|
|
395
423
|
|
|
396
424
|
### Miscellaneous Chores
|
|
@@ -404,7 +432,7 @@
|
|
|
404
432
|
* dependencies
|
|
405
433
|
* @twin.org/auditable-item-stream-models bumped from 0.0.1-next.29 to 0.0.1-next.30
|
|
406
434
|
|
|
407
|
-
## [0.0.1-next.29](https://github.com/
|
|
435
|
+
## [0.0.1-next.29](https://github.com/iotaledger/twin-auditable-item-stream/compare/auditable-item-stream-rest-client-v0.0.1-next.28...auditable-item-stream-rest-client-v0.0.1-next.29) (2025-04-25)
|
|
408
436
|
|
|
409
437
|
|
|
410
438
|
### Miscellaneous Chores
|
|
@@ -418,12 +446,12 @@
|
|
|
418
446
|
* dependencies
|
|
419
447
|
* @twin.org/auditable-item-stream-models bumped from 0.0.1-next.28 to 0.0.1-next.29
|
|
420
448
|
|
|
421
|
-
## [0.0.1-next.28](https://github.com/
|
|
449
|
+
## [0.0.1-next.28](https://github.com/iotaledger/twin-auditable-item-stream/compare/auditable-item-stream-rest-client-v0.0.1-next.27...auditable-item-stream-rest-client-v0.0.1-next.28) (2025-04-17)
|
|
422
450
|
|
|
423
451
|
|
|
424
452
|
### Features
|
|
425
453
|
|
|
426
|
-
* use shared store mechanism ([#7](https://github.com/
|
|
454
|
+
* use shared store mechanism ([#7](https://github.com/iotaledger/twin-auditable-item-stream/issues/7)) ([2aca4b8](https://github.com/iotaledger/twin-auditable-item-stream/commit/2aca4b85b0102f91c90619f02b116541786cf539))
|
|
427
455
|
|
|
428
456
|
|
|
429
457
|
### Dependencies
|
|
@@ -432,7 +460,7 @@
|
|
|
432
460
|
* dependencies
|
|
433
461
|
* @twin.org/auditable-item-stream-models bumped from 0.0.1-next.27 to 0.0.1-next.28
|
|
434
462
|
|
|
435
|
-
## [0.0.1-next.27](https://github.com/
|
|
463
|
+
## [0.0.1-next.27](https://github.com/iotaledger/twin-auditable-item-stream/compare/auditable-item-stream-rest-client-v0.0.1-next.26...auditable-item-stream-rest-client-v0.0.1-next.27) (2025-04-11)
|
|
436
464
|
|
|
437
465
|
|
|
438
466
|
### Miscellaneous Chores
|
|
@@ -446,7 +474,7 @@
|
|
|
446
474
|
* dependencies
|
|
447
475
|
* @twin.org/auditable-item-stream-models bumped from 0.0.1-next.26 to 0.0.1-next.27
|
|
448
476
|
|
|
449
|
-
## [0.0.1-next.26](https://github.com/
|
|
477
|
+
## [0.0.1-next.26](https://github.com/iotaledger/twin-auditable-item-stream/compare/auditable-item-stream-rest-client-v0.0.1-next.25...auditable-item-stream-rest-client-v0.0.1-next.26) (2025-03-28)
|
|
450
478
|
|
|
451
479
|
|
|
452
480
|
### Miscellaneous Chores
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/auditable-item-stream-rest-client",
|
|
3
|
-
"version": "0.0.3-next.
|
|
3
|
+
"version": "0.0.3-next.15",
|
|
4
4
|
"description": "HTTP client for interacting with auditable stream service endpoints.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "git+https://github.com/
|
|
7
|
+
"url": "git+https://github.com/iotaledger/auditable-item-stream.git",
|
|
8
8
|
"directory": "packages/auditable-item-stream-rest-client"
|
|
9
9
|
},
|
|
10
10
|
"author": "martyn.janes@iota.org",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@twin.org/api-core": "next",
|
|
18
18
|
"@twin.org/api-models": "next",
|
|
19
|
-
"@twin.org/auditable-item-stream-models": "0.0.3-next.
|
|
19
|
+
"@twin.org/auditable-item-stream-models": "0.0.3-next.15",
|
|
20
20
|
"@twin.org/core": "next",
|
|
21
21
|
"@twin.org/data-json-ld": "next",
|
|
22
22
|
"@twin.org/entity": "next",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"auditable-item-stream"
|
|
49
49
|
],
|
|
50
50
|
"bugs": {
|
|
51
|
-
"url": "git+https://github.com/
|
|
51
|
+
"url": "git+https://github.com/iotaledger/auditable-item-stream/issues"
|
|
52
52
|
},
|
|
53
53
|
"homepage": "https://twindev.org"
|
|
54
54
|
}
|