@api-client/core 0.12.4 → 0.12.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/src/amf/shape/ShapeXmlSchemaGenerator.d.ts.map +1 -1
- package/build/src/amf/shape/ShapeXmlSchemaGenerator.js +1 -2
- package/build/src/amf/shape/ShapeXmlSchemaGenerator.js.map +1 -1
- package/build/src/events/BaseEvents.d.ts +3 -3
- package/build/src/events/BaseEvents.d.ts.map +1 -1
- package/build/src/events/BaseEvents.js.map +1 -1
- package/build/src/modeling/DataDomain.d.ts +1 -1
- package/build/src/modeling/DataDomain.d.ts.map +1 -1
- package/build/src/modeling/DataDomain.js.map +1 -1
- package/build/src/modeling/DomainAssociation.d.ts.map +1 -1
- package/build/src/modeling/DomainAssociation.js +2 -3
- package/build/src/modeling/DomainAssociation.js.map +1 -1
- package/build/src/modeling/DomainSerialization.d.ts.map +1 -1
- package/build/src/modeling/DomainSerialization.js +1 -1
- package/build/src/modeling/DomainSerialization.js.map +1 -1
- package/build/src/modeling/DomainVersioning.js.map +1 -1
- package/build/src/modeling/GraphUtils.d.ts +1 -1
- package/build/src/modeling/GraphUtils.d.ts.map +1 -1
- package/build/src/modeling/GraphUtils.js.map +1 -1
- package/build/src/modeling/legacy/DataAssociation.d.ts.map +1 -1
- package/build/src/modeling/legacy/DataAssociation.js +4 -5
- package/build/src/modeling/legacy/DataAssociation.js.map +1 -1
- package/build/src/modeling/legacy/DataProperty.d.ts.map +1 -1
- package/build/src/modeling/legacy/DataProperty.js +4 -5
- package/build/src/modeling/legacy/DataProperty.js.map +1 -1
- package/build/src/modeling/types.d.ts +2 -1
- package/build/src/modeling/types.d.ts.map +1 -1
- package/build/src/modeling/types.js.map +1 -1
- package/build/src/models/ProjectExecution.d.ts.map +1 -1
- package/build/src/models/ProjectExecution.js +2 -3
- package/build/src/models/ProjectExecution.js.map +1 -1
- package/build/src/models/Request.d.ts.map +1 -1
- package/build/src/models/Request.js +4 -5
- package/build/src/models/Request.js.map +1 -1
- package/build/src/models/store/Revision.d.ts +1 -1
- package/build/src/models/store/Revision.d.ts.map +1 -1
- package/build/src/models/store/Revision.js.map +1 -1
- package/build/src/patch/PatchClient.d.ts +2 -1
- package/build/src/patch/PatchClient.d.ts.map +1 -1
- package/build/src/patch/PatchClient.js +1 -1
- package/build/src/patch/PatchClient.js.map +1 -1
- package/build/src/patch/types.d.ts +1 -1
- package/build/src/patch/types.d.ts.map +1 -1
- package/build/src/patch/types.js.map +1 -1
- package/package.json +36 -4
- package/src/amf/shape/ShapeXmlSchemaGenerator.ts +1 -2
- package/src/events/BaseEvents.ts +3 -3
- package/src/modeling/DataDomain.ts +1 -1
- package/src/modeling/DomainAssociation.ts +2 -3
- package/src/modeling/DomainSerialization.ts +2 -1
- package/src/modeling/DomainVersioning.ts +1 -1
- package/src/modeling/GraphUtils.ts +1 -1
- package/src/modeling/legacy/DataAssociation.ts +4 -5
- package/src/modeling/legacy/DataProperty.ts +4 -5
- package/src/modeling/types.ts +2 -1
- package/src/models/ProjectExecution.ts +2 -3
- package/src/models/Request.ts +4 -5
- package/src/models/store/Revision.ts +1 -1
- package/src/patch/PatchClient.ts +2 -1
- package/src/patch/types.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Request.d.ts","sourceRoot":"","sources":["../../../src/models/Request.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Request.d.ts","sourceRoot":"","sources":["../../../src/models/Request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAC1C,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACrE,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AACvF,OAAO,EAAE,WAAW,EAAE,UAAU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I,WAAW;IAOzB;;OAEG;IACH,eAAe,IAAI,MAAM;IAMzB;;OAEG;IACH,SAAS,IAAI,aAAa;IAO1B,MAAM,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI;CAK/B"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Json } from '@api-client/json';
|
|
2
1
|
import { RequestConfig } from './RequestConfig.js';
|
|
3
2
|
import { Thing } from './Thing.js';
|
|
4
3
|
import { Certificate } from './ClientCertificate.js';
|
|
@@ -309,13 +308,13 @@ export class Request {
|
|
|
309
308
|
this.midnight = midnight;
|
|
310
309
|
}
|
|
311
310
|
if (Array.isArray(flows)) {
|
|
312
|
-
this.flows = flows.map((i) =>
|
|
311
|
+
this.flows = flows.map((i) => structuredClone(i));
|
|
313
312
|
}
|
|
314
313
|
else {
|
|
315
314
|
this.flows = undefined;
|
|
316
315
|
}
|
|
317
316
|
if (Array.isArray(assertions)) {
|
|
318
|
-
this.assertions = assertions.map((i) =>
|
|
317
|
+
this.assertions = assertions.map((i) => structuredClone(i));
|
|
319
318
|
}
|
|
320
319
|
else {
|
|
321
320
|
this.assertions = undefined;
|
|
@@ -346,10 +345,10 @@ export class Request {
|
|
|
346
345
|
result.authorization = this.authorization.map((i) => i.toJSON());
|
|
347
346
|
}
|
|
348
347
|
if (Array.isArray(this.flows)) {
|
|
349
|
-
result.flows = this.flows.map((i) =>
|
|
348
|
+
result.flows = this.flows.map((i) => structuredClone(i));
|
|
350
349
|
}
|
|
351
350
|
if (Array.isArray(this.assertions)) {
|
|
352
|
-
result.assertions = this.assertions.map((i) =>
|
|
351
|
+
result.assertions = this.assertions.map((i) => structuredClone(i));
|
|
353
352
|
}
|
|
354
353
|
if (this.clientCertificate) {
|
|
355
354
|
result.clientCertificate = this.clientCertificate.toJSON();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Request.js","sourceRoot":"","sources":["../../../src/models/Request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EA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gB,EAAE,GAAG,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,CAAA;QACnD,IAAI,CAAC,GAAG,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,CAAA;QAC/B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;IAC3B,CAAC;CACF","sourcesContent":["import { Json } from '@api-client/json'\nimport { IRequestConfig, RequestConfig } from './RequestConfig.js'\nimport { Thing, IThing } from './Thing.js'\nimport { HttpCertificate, Certificate } from './ClientCertificate.js'\nimport { IRequestAuthorization, RequestAuthorization } from './RequestAuthorization.js'\nimport { IRequestLog, RequestLog, Kind as LogKind } from './RequestLog.js'\nimport { SentRequest } from './SentRequest.js'\nimport { ErrorResponse } from './ErrorResponse.js'\nimport { Response } from './Response.js'\nimport { RequestsSize } from './RequestsSize.js'\nimport { IHttpRequest, HttpRequest, Kind as HttpRequestKind } from './HttpRequest.js'\nimport { ARCSavedRequest, ARCHistoryRequest } from './legacy/request/ArcRequest.js'\nimport { ErrorResponse as LegacyErrorResponse, Response as LegacyResponse } from './legacy/request/ArcResponse.js'\nimport { PayloadSerializer } from '../lib/transformers/PayloadSerializer.js'\nimport { Normalizer } from './legacy/Normalizer.js'\nimport { IHttpFlow } from './http-flows/HttpFlows.js'\nimport { IHttpAssertion } from './http-flows/HttpAssertion.js'\nimport { LegacyTranslator } from './http-flows/LegacyTranslator.js'\n\nexport const Kind = 'Core#Request'\nexport const createdSymbol = Symbol('created')\nexport const updatedSymbol = Symbol('updated')\nexport const midnightSymbol = Symbol('midnight')\n\n/**\n * The definition of a request object that functions inside API Client\n * with the full configuration.\n */\nexport interface IRequest {\n kind: string\n /**\n * The basic information about the request.\n */\n info: IThing\n /**\n * The HTTP definition of the request.\n */\n expects: IHttpRequest\n /**\n * The execution log of the last HTTP request with a response.\n */\n log?: IRequestLog\n /**\n * Timestamp when the request was last updated.\n */\n updated?: number\n /**\n * Timestamp when the request was created.\n */\n created?: number\n /**\n * A timestamp of the midnight when the request object was updated\n */\n midnight?: number\n /**\n * Request processing configuration.\n */\n config?: IRequestConfig\n /**\n * Request authorization configuration\n */\n authorization?: IRequestAuthorization[]\n /**\n * Http action flows.\n * In ARC this was \"actions\",\n */\n flows?: IHttpFlow[]\n /**\n * The certificate to use with the request.\n * Note, the certificate defined on the certificate authorization\n * should not be included here by default. The HTTP transport should recognize\n * this certificate and update the configuration.\n */\n clientCertificate?: HttpCertificate\n\n /**\n * The list of assertions (tests) to perform after the response is ready.\n */\n assertions?: IHttpAssertion[]\n}\n\nexport class Request {\n [createdSymbol] = 0;\n [updatedSymbol] = 0;\n [midnightSymbol] = 0\n kind = Kind\n /**\n * The basic information about the project.\n */\n info: Thing = new Thing()\n /**\n * The HTTP definition of the request.\n */\n expects: HttpRequest = new HttpRequest()\n /**\n * The execution log of the last HTTP request with a response.\n */\n log?: RequestLog\n /**\n * Request processing configuration.\n */\n config?: RequestConfig\n /**\n * Request authorization configuration\n */\n authorization?: RequestAuthorization[]\n /**\n * Http action flows.\n * In ARC this was \"actions\",\n */\n flows?: IHttpFlow[]\n /**\n * The certificate to use with the request.\n * Note, the certificate defined on the certificate authorization\n * should not be included here by default. The HTTP transport should recognize\n * this certificate and update the configuration.\n */\n clientCertificate?: Certificate\n\n /**\n * The list of assertions (tests) to perform after the response is ready.\n */\n assertions?: IHttpAssertion[]\n\n /**\n * Creates a request from an URL.\n *\n * @param url The Request URL.\n */\n\n static fromUrl(url: string): Request {\n const now: number = Date.now()\n const request = new Request({\n kind: Kind,\n created: now,\n updated: now,\n expects: {\n kind: HttpRequestKind,\n method: 'GET',\n url,\n },\n info: Thing.fromName(url).toJSON(),\n })\n return request\n }\n\n /**\n * Creates a request from a name.\n *\n * @param name The Request name.\n */\n static fromName(name: string): Request {\n const now: number = Date.now()\n const request = new Request({\n kind: Kind,\n created: now,\n updated: now,\n expects: {\n kind: HttpRequestKind,\n method: 'GET',\n url: '',\n },\n info: Thing.fromName(name).toJSON(),\n })\n return request\n }\n\n /**\n * Creates a request from an HttpRequest definition.\n *\n * @param info The request data.\n */\n static fromHttpRequest(info: IHttpRequest): Request {\n const now: number = Date.now()\n const request = new Request({\n kind: Kind,\n created: now,\n updated: now,\n expects: {\n kind: HttpRequestKind,\n method: info.method,\n url: info.url,\n headers: info.headers,\n payload: info.payload,\n },\n info: Thing.fromName(info.url).toJSON(),\n })\n return request\n }\n\n static async fromLegacy(request: ARCSavedRequest | ARCHistoryRequest): Promise<Request> {\n const normalized = Normalizer.normalizeRequest(request) as ARCSavedRequest\n if (!normalized) {\n throw new Error(`Unknown object.`)\n }\n const init: IRequest = {\n kind: Kind,\n expects: {\n kind: HttpRequestKind,\n method: normalized.method || 'GET',\n url: normalized.url || '',\n headers: normalized.headers,\n },\n info: Thing.fromName(normalized.name || 'Unnamed request').toJSON(),\n }\n init.created = normalized.created\n init.updated = normalized.updated\n if (normalized.actions) {\n init.flows = LegacyTranslator.translate(normalized.actions)\n }\n if (Array.isArray(normalized.authorization) && normalized.authorization.length) {\n init.authorization = normalized.authorization.map((i) => RequestAuthorization.fromLegacy(i).toJSON())\n }\n if (normalized.config) {\n init.config = RequestConfig.fromLegacy(normalized.config).toJSON()\n }\n if (normalized.payload) {\n init.expects.payload = await PayloadSerializer.serialize(normalized.payload)\n } else if (normalized.blob) {\n init.expects.payload = {\n type: 'blob',\n data: normalized.blob,\n }\n } else if (normalized.multipart) {\n init.expects.payload = {\n type: 'formdata',\n data: normalized.multipart,\n }\n }\n const log = new RequestLog()\n if (normalized.transportRequest) {\n const sent = await SentRequest.fromLegacy(normalized.transportRequest)\n log.request = sent\n }\n if (normalized.response) {\n const typedError = normalized.response as LegacyErrorResponse\n if (typedError.error) {\n log.response = await ErrorResponse.fromLegacy(typedError)\n } else {\n const typedResponse = normalized.response as LegacyResponse\n log.response = await Response.fromLegacy(typedResponse)\n if (Array.isArray(typedResponse.redirects) && typedResponse.redirects.length) {\n const promises = typedResponse.redirects.map((redirect) => log.addLegacyRedirect(redirect))\n await Promise.allSettled(promises)\n }\n if (typedResponse.size) {\n log.size = new RequestsSize(typedResponse.size)\n }\n }\n }\n init.log = log.toJSON()\n return new Request(init)\n }\n\n /**\n * @param value The timestamp when the request was created.\n */\n set created(value: number | undefined) {\n if (!value) {\n this[createdSymbol] = Date.now()\n } else {\n this[createdSymbol] = value\n }\n }\n\n /**\n * @returns The timestamp when the request was created.\n */\n get created(): number {\n return this[createdSymbol] || Date.now()\n }\n\n /**\n * @param value The timestamp when the request was last updated.\n */\n set updated(value: number | undefined) {\n if (!value) {\n this[updatedSymbol] = this.created\n } else {\n this[updatedSymbol] = value\n }\n const d = new Date(this[updatedSymbol])\n d.setHours(0, 0, 0, 0)\n this[midnightSymbol] = d.getTime()\n }\n\n /**\n * @returns The timestamp when the request was last updated.\n */\n get updated(): number {\n return this[updatedSymbol] || this.created\n }\n\n /**\n * @param value The timestamp of the midnight when the request object was updated\n */\n set midnight(value: number | undefined) {\n if (!value) {\n this[midnightSymbol] = this.defaultMidnight()\n } else {\n this[midnightSymbol] = value\n }\n }\n\n /**\n * @returns The timestamp of the midnight when the request object was updated\n */\n get midnight(): number {\n if (this[midnightSymbol]) {\n return this[midnightSymbol]\n }\n return this.defaultMidnight()\n }\n\n constructor(input?: string | IRequest) {\n let init: IRequest\n if (typeof input === 'string') {\n init = JSON.parse(input)\n } else if (typeof input === 'object') {\n init = input\n } else {\n const now: number = Date.now()\n init = {\n kind: Kind,\n created: now,\n updated: now,\n expects: {\n kind: HttpRequestKind,\n method: 'GET',\n url: '',\n },\n info: Thing.fromName('').toJSON(),\n }\n }\n this.new(init)\n }\n\n new(init: IRequest): void {\n const {\n expects,\n log,\n updated,\n created = Date.now(),\n midnight,\n config,\n authorization,\n flows,\n clientCertificate,\n info,\n assertions,\n } = init\n if (expects) {\n this.expects = new HttpRequest(expects)\n } else {\n this.expects = new HttpRequest()\n }\n if (info) {\n this.info = new Thing(info)\n } else {\n this.info = Thing.fromName('')\n }\n if (log) {\n this.log = new RequestLog(log)\n } else {\n this.log = undefined\n }\n if (config) {\n this.config = new RequestConfig(config)\n } else {\n this.config = undefined\n }\n if (Array.isArray(authorization)) {\n this.authorization = authorization.map((i) => new RequestAuthorization(i))\n } else {\n this.authorization = undefined\n }\n this.created = created\n if (updated) {\n this.updated = updated\n } else {\n this.updated = this.created\n }\n if (midnight) {\n this.midnight = midnight\n }\n if (Array.isArray(flows)) {\n this.flows = flows.map((i) => Json.clone(i))\n } else {\n this.flows = undefined\n }\n if (Array.isArray(assertions)) {\n this.assertions = assertions.map((i) => Json.clone(i))\n } else {\n this.assertions = undefined\n }\n if (clientCertificate) {\n this.clientCertificate = new Certificate(clientCertificate)\n } else {\n this.clientCertificate = undefined\n }\n }\n\n toJSON(): IRequest {\n const result: IRequest = {\n kind: Kind,\n expects: this.expects.toJSON(),\n info: this.info.toJSON(),\n created: this.created,\n updated: this.updated,\n midnight: this.midnight,\n }\n if (this.log) {\n result.log = this.log.toJSON()\n }\n if (this.config) {\n result.config = this.config.toJSON()\n }\n if (Array.isArray(this.authorization)) {\n result.authorization = this.authorization.map((i) => i.toJSON())\n }\n if (Array.isArray(this.flows)) {\n result.flows = this.flows.map((i) => Json.clone(i))\n }\n if (Array.isArray(this.assertions)) {\n result.assertions = this.assertions.map((i) => Json.clone(i))\n }\n if (this.clientCertificate) {\n result.clientCertificate = this.clientCertificate.toJSON()\n }\n return result\n }\n\n /**\n * Sets the basic information about a project.\n */\n setInfo(info: IThing): void {\n this.info = new Thing(info)\n this.updated = Date.now()\n }\n\n /**\n * If the info object does not exist it is being created.\n * @return The instance of an HTTP request information.\n */\n getExpects(): HttpRequest {\n if (!this.expects) {\n this.expects = new HttpRequest()\n }\n return this.expects\n }\n\n /**\n * @returns The default value for the midnight when the request was last updated.\n */\n defaultMidnight(): number {\n const d = new Date(this.updated)\n d.setHours(0, 0, 0, 0)\n return d.getTime()\n }\n\n /**\n * Reads the config from the request. If the config object does not exists it creates one.\n */\n getConfig(): RequestConfig {\n if (!this.config) {\n this.config = new RequestConfig()\n }\n return this.config\n }\n\n setLog(log: IRequestLog): void {\n const info: IRequestLog = { ...log, kind: LogKind }\n this.log = new RequestLog(info)\n this.updated = Date.now()\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Request.js","sourceRoot":"","sources":["../../../src/models/Request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClE,OAAO,EAAE,KAAK,EAAU,MAAM,YAAY,CAAA;AAC1C,OAAO,EAAmB,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACrE,OAAO,EAAyB,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AACvF,OAAO,EAAe,UAAU,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAgB,WAAW,EAAE,IAAI,IAAI,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAGrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAA;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AAEnE,MAAM,CAAC,MAAM,IAAI,GAAG,cAAc,CAAA;AAClC,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,SAAS,CAAC,CAAA;AAC9C,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,SAAS,CAAC,CAAA;AAC9C,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,UAAU,CAAC,CAAA;AA2DhD,MAAM,OAAO,OAAO;IAClB,CAAC,aAAa,CAAC,GAAG,CAAC,CA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,aAAa,EAAE,CAAA;QACnC,CAAC;QACD,OAAO,IAAI,CAAC,MAAM,CAAA;IACpB,CAAC;IAED,MAAM,CAAC,GAAgB;QACrB,MAAM,IAAI,GAAgB,EAAE,GAAG,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,CAAA;QACnD,IAAI,CAAC,GAAG,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,CAAA;QAC/B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;IAC3B,CAAC;CACF","sourcesContent":["import { IRequestConfig, RequestConfig } from './RequestConfig.js'\nimport { Thing, IThing } from './Thing.js'\nimport { HttpCertificate, Certificate } from './ClientCertificate.js'\nimport { IRequestAuthorization, RequestAuthorization } from './RequestAuthorization.js'\nimport { IRequestLog, RequestLog, Kind as LogKind } from './RequestLog.js'\nimport { SentRequest } from './SentRequest.js'\nimport { ErrorResponse } from './ErrorResponse.js'\nimport { Response } from './Response.js'\nimport { RequestsSize } from './RequestsSize.js'\nimport { IHttpRequest, HttpRequest, Kind as HttpRequestKind } from './HttpRequest.js'\nimport { ARCSavedRequest, ARCHistoryRequest } from './legacy/request/ArcRequest.js'\nimport { ErrorResponse as LegacyErrorResponse, Response as LegacyResponse } from './legacy/request/ArcResponse.js'\nimport { PayloadSerializer } from '../lib/transformers/PayloadSerializer.js'\nimport { Normalizer } from './legacy/Normalizer.js'\nimport { IHttpFlow } from './http-flows/HttpFlows.js'\nimport { IHttpAssertion } from './http-flows/HttpAssertion.js'\nimport { LegacyTranslator } from './http-flows/LegacyTranslator.js'\n\nexport const Kind = 'Core#Request'\nexport const createdSymbol = Symbol('created')\nexport const updatedSymbol = Symbol('updated')\nexport const midnightSymbol = Symbol('midnight')\n\n/**\n * The definition of a request object that functions inside API Client\n * with the full configuration.\n */\nexport interface IRequest {\n kind: string\n /**\n * The basic information about the request.\n */\n info: IThing\n /**\n * The HTTP definition of the request.\n */\n expects: IHttpRequest\n /**\n * The execution log of the last HTTP request with a response.\n */\n log?: IRequestLog\n /**\n * Timestamp when the request was last updated.\n */\n updated?: number\n /**\n * Timestamp when the request was created.\n */\n created?: number\n /**\n * A timestamp of the midnight when the request object was updated\n */\n midnight?: number\n /**\n * Request processing configuration.\n */\n config?: IRequestConfig\n /**\n * Request authorization configuration\n */\n authorization?: IRequestAuthorization[]\n /**\n * Http action flows.\n * In ARC this was \"actions\",\n */\n flows?: IHttpFlow[]\n /**\n * The certificate to use with the request.\n * Note, the certificate defined on the certificate authorization\n * should not be included here by default. The HTTP transport should recognize\n * this certificate and update the configuration.\n */\n clientCertificate?: HttpCertificate\n\n /**\n * The list of assertions (tests) to perform after the response is ready.\n */\n assertions?: IHttpAssertion[]\n}\n\nexport class Request {\n [createdSymbol] = 0;\n [updatedSymbol] = 0;\n [midnightSymbol] = 0\n kind = Kind\n /**\n * The basic information about the project.\n */\n info: Thing = new Thing()\n /**\n * The HTTP definition of the request.\n */\n expects: HttpRequest = new HttpRequest()\n /**\n * The execution log of the last HTTP request with a response.\n */\n log?: RequestLog\n /**\n * Request processing configuration.\n */\n config?: RequestConfig\n /**\n * Request authorization configuration\n */\n authorization?: RequestAuthorization[]\n /**\n * Http action flows.\n * In ARC this was \"actions\",\n */\n flows?: IHttpFlow[]\n /**\n * The certificate to use with the request.\n * Note, the certificate defined on the certificate authorization\n * should not be included here by default. The HTTP transport should recognize\n * this certificate and update the configuration.\n */\n clientCertificate?: Certificate\n\n /**\n * The list of assertions (tests) to perform after the response is ready.\n */\n assertions?: IHttpAssertion[]\n\n /**\n * Creates a request from an URL.\n *\n * @param url The Request URL.\n */\n\n static fromUrl(url: string): Request {\n const now: number = Date.now()\n const request = new Request({\n kind: Kind,\n created: now,\n updated: now,\n expects: {\n kind: HttpRequestKind,\n method: 'GET',\n url,\n },\n info: Thing.fromName(url).toJSON(),\n })\n return request\n }\n\n /**\n * Creates a request from a name.\n *\n * @param name The Request name.\n */\n static fromName(name: string): Request {\n const now: number = Date.now()\n const request = new Request({\n kind: Kind,\n created: now,\n updated: now,\n expects: {\n kind: HttpRequestKind,\n method: 'GET',\n url: '',\n },\n info: Thing.fromName(name).toJSON(),\n })\n return request\n }\n\n /**\n * Creates a request from an HttpRequest definition.\n *\n * @param info The request data.\n */\n static fromHttpRequest(info: IHttpRequest): Request {\n const now: number = Date.now()\n const request = new Request({\n kind: Kind,\n created: now,\n updated: now,\n expects: {\n kind: HttpRequestKind,\n method: info.method,\n url: info.url,\n headers: info.headers,\n payload: info.payload,\n },\n info: Thing.fromName(info.url).toJSON(),\n })\n return request\n }\n\n static async fromLegacy(request: ARCSavedRequest | ARCHistoryRequest): Promise<Request> {\n const normalized = Normalizer.normalizeRequest(request) as ARCSavedRequest\n if (!normalized) {\n throw new Error(`Unknown object.`)\n }\n const init: IRequest = {\n kind: Kind,\n expects: {\n kind: HttpRequestKind,\n method: normalized.method || 'GET',\n url: normalized.url || '',\n headers: normalized.headers,\n },\n info: Thing.fromName(normalized.name || 'Unnamed request').toJSON(),\n }\n init.created = normalized.created\n init.updated = normalized.updated\n if (normalized.actions) {\n init.flows = LegacyTranslator.translate(normalized.actions)\n }\n if (Array.isArray(normalized.authorization) && normalized.authorization.length) {\n init.authorization = normalized.authorization.map((i) => RequestAuthorization.fromLegacy(i).toJSON())\n }\n if (normalized.config) {\n init.config = RequestConfig.fromLegacy(normalized.config).toJSON()\n }\n if (normalized.payload) {\n init.expects.payload = await PayloadSerializer.serialize(normalized.payload)\n } else if (normalized.blob) {\n init.expects.payload = {\n type: 'blob',\n data: normalized.blob,\n }\n } else if (normalized.multipart) {\n init.expects.payload = {\n type: 'formdata',\n data: normalized.multipart,\n }\n }\n const log = new RequestLog()\n if (normalized.transportRequest) {\n const sent = await SentRequest.fromLegacy(normalized.transportRequest)\n log.request = sent\n }\n if (normalized.response) {\n const typedError = normalized.response as LegacyErrorResponse\n if (typedError.error) {\n log.response = await ErrorResponse.fromLegacy(typedError)\n } else {\n const typedResponse = normalized.response as LegacyResponse\n log.response = await Response.fromLegacy(typedResponse)\n if (Array.isArray(typedResponse.redirects) && typedResponse.redirects.length) {\n const promises = typedResponse.redirects.map((redirect) => log.addLegacyRedirect(redirect))\n await Promise.allSettled(promises)\n }\n if (typedResponse.size) {\n log.size = new RequestsSize(typedResponse.size)\n }\n }\n }\n init.log = log.toJSON()\n return new Request(init)\n }\n\n /**\n * @param value The timestamp when the request was created.\n */\n set created(value: number | undefined) {\n if (!value) {\n this[createdSymbol] = Date.now()\n } else {\n this[createdSymbol] = value\n }\n }\n\n /**\n * @returns The timestamp when the request was created.\n */\n get created(): number {\n return this[createdSymbol] || Date.now()\n }\n\n /**\n * @param value The timestamp when the request was last updated.\n */\n set updated(value: number | undefined) {\n if (!value) {\n this[updatedSymbol] = this.created\n } else {\n this[updatedSymbol] = value\n }\n const d = new Date(this[updatedSymbol])\n d.setHours(0, 0, 0, 0)\n this[midnightSymbol] = d.getTime()\n }\n\n /**\n * @returns The timestamp when the request was last updated.\n */\n get updated(): number {\n return this[updatedSymbol] || this.created\n }\n\n /**\n * @param value The timestamp of the midnight when the request object was updated\n */\n set midnight(value: number | undefined) {\n if (!value) {\n this[midnightSymbol] = this.defaultMidnight()\n } else {\n this[midnightSymbol] = value\n }\n }\n\n /**\n * @returns The timestamp of the midnight when the request object was updated\n */\n get midnight(): number {\n if (this[midnightSymbol]) {\n return this[midnightSymbol]\n }\n return this.defaultMidnight()\n }\n\n constructor(input?: string | IRequest) {\n let init: IRequest\n if (typeof input === 'string') {\n init = JSON.parse(input)\n } else if (typeof input === 'object') {\n init = input\n } else {\n const now: number = Date.now()\n init = {\n kind: Kind,\n created: now,\n updated: now,\n expects: {\n kind: HttpRequestKind,\n method: 'GET',\n url: '',\n },\n info: Thing.fromName('').toJSON(),\n }\n }\n this.new(init)\n }\n\n new(init: IRequest): void {\n const {\n expects,\n log,\n updated,\n created = Date.now(),\n midnight,\n config,\n authorization,\n flows,\n clientCertificate,\n info,\n assertions,\n } = init\n if (expects) {\n this.expects = new HttpRequest(expects)\n } else {\n this.expects = new HttpRequest()\n }\n if (info) {\n this.info = new Thing(info)\n } else {\n this.info = Thing.fromName('')\n }\n if (log) {\n this.log = new RequestLog(log)\n } else {\n this.log = undefined\n }\n if (config) {\n this.config = new RequestConfig(config)\n } else {\n this.config = undefined\n }\n if (Array.isArray(authorization)) {\n this.authorization = authorization.map((i) => new RequestAuthorization(i))\n } else {\n this.authorization = undefined\n }\n this.created = created\n if (updated) {\n this.updated = updated\n } else {\n this.updated = this.created\n }\n if (midnight) {\n this.midnight = midnight\n }\n if (Array.isArray(flows)) {\n this.flows = flows.map((i) => structuredClone(i))\n } else {\n this.flows = undefined\n }\n if (Array.isArray(assertions)) {\n this.assertions = assertions.map((i) => structuredClone(i))\n } else {\n this.assertions = undefined\n }\n if (clientCertificate) {\n this.clientCertificate = new Certificate(clientCertificate)\n } else {\n this.clientCertificate = undefined\n }\n }\n\n toJSON(): IRequest {\n const result: IRequest = {\n kind: Kind,\n expects: this.expects.toJSON(),\n info: this.info.toJSON(),\n created: this.created,\n updated: this.updated,\n midnight: this.midnight,\n }\n if (this.log) {\n result.log = this.log.toJSON()\n }\n if (this.config) {\n result.config = this.config.toJSON()\n }\n if (Array.isArray(this.authorization)) {\n result.authorization = this.authorization.map((i) => i.toJSON())\n }\n if (Array.isArray(this.flows)) {\n result.flows = this.flows.map((i) => structuredClone(i))\n }\n if (Array.isArray(this.assertions)) {\n result.assertions = this.assertions.map((i) => structuredClone(i))\n }\n if (this.clientCertificate) {\n result.clientCertificate = this.clientCertificate.toJSON()\n }\n return result\n }\n\n /**\n * Sets the basic information about a project.\n */\n setInfo(info: IThing): void {\n this.info = new Thing(info)\n this.updated = Date.now()\n }\n\n /**\n * If the info object does not exist it is being created.\n * @return The instance of an HTTP request information.\n */\n getExpects(): HttpRequest {\n if (!this.expects) {\n this.expects = new HttpRequest()\n }\n return this.expects\n }\n\n /**\n * @returns The default value for the midnight when the request was last updated.\n */\n defaultMidnight(): number {\n const d = new Date(this.updated)\n d.setHours(0, 0, 0, 0)\n return d.getTime()\n }\n\n /**\n * Reads the config from the request. If the config object does not exists it creates one.\n */\n getConfig(): RequestConfig {\n if (!this.config) {\n this.config = new RequestConfig()\n }\n return this.config\n }\n\n setLog(log: IRequestLog): void {\n const info: IRequestLog = { ...log, kind: LogKind }\n this.log = new RequestLog(info)\n this.updated = Date.now()\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Revision.d.ts","sourceRoot":"","sources":["../../../../src/models/store/Revision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Revision.d.ts","sourceRoot":"","sources":["../../../../src/models/store/Revision.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1C,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,OAAO,YAAY,CAAA;IACzB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IACV;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,SAAU,SAAQ,iBAAiB;IAClD;;OAEG;IACH,KAAK,EAAE,SAAS,EAAE,CAAA;IAClB;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAA;CACjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Revision.js","sourceRoot":"","sources":["../../../../src/models/store/Revision.ts"],"names":[],"mappings":"","sourcesContent":["import { Operation } from '@api-client/json'\nimport { RevisionKind } from '../kinds.js'\n\nexport interface IRevisionListItem {\n kind: typeof RevisionKind\n /**\n * The datastore key for this patch object.\n */\n id: string\n /**\n * The timestamp when the patch was created.\n */\n created: number\n /**\n * The ever incrementing revision number.\n */\n revision: number\n /**\n * A flag determining that the revision is inactive.\n * This may happen when a previous revision has been restored. This revision is then\n * detached from the latest revision tree. It can be user to move forward in the history though.\n *\n * Implementations! Revisions should be removed from the storage when a new revision has been created\n * that has diverged from the tree.\n */\n deleted?: boolean\n}\n\n/**\n * The definition of a patch revision.\n * The revision is created with the `@api-client/json` library.\n */\nexport interface IRevision extends IRevisionListItem {\n /**\n * The `@api-client/json` revisions object used to restore the previous state.\n */\n patch: Operation[]\n /**\n * The content of the document.\n * Note that the content does not include patches.\n */\n content: unknown\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Revision.js","sourceRoot":"","sources":["../../../../src/models/store/Revision.ts"],"names":[],"mappings":"","sourcesContent":["import type { Operation } from '@api-client/json/patch/types.js'\nimport { RevisionKind } from '../kinds.js'\n\nexport interface IRevisionListItem {\n kind: typeof RevisionKind\n /**\n * The datastore key for this patch object.\n */\n id: string\n /**\n * The timestamp when the patch was created.\n */\n created: number\n /**\n * The ever incrementing revision number.\n */\n revision: number\n /**\n * A flag determining that the revision is inactive.\n * This may happen when a previous revision has been restored. This revision is then\n * detached from the latest revision tree. It can be user to move forward in the history though.\n *\n * Implementations! Revisions should be removed from the storage when a new revision has been created\n * that has diverged from the tree.\n */\n deleted?: boolean\n}\n\n/**\n * The definition of a patch revision.\n * The revision is created with the `@api-client/json` library.\n */\nexport interface IRevision extends IRevisionListItem {\n /**\n * The `@api-client/json` revisions object used to restore the previous state.\n */\n patch: Operation[]\n /**\n * The content of the document.\n * Note that the content does not include patches.\n */\n content: unknown\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Operation
|
|
1
|
+
import type { Operation } from '@api-client/json/patch/types.js';
|
|
2
|
+
import { JsonDocument } from '@api-client/json/patch/json_document.js';
|
|
2
3
|
import type { MediaPatchInfo, PatchInfo } from './types.js';
|
|
3
4
|
/**
|
|
4
5
|
* Options for the PatchClient constructor.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PatchClient.d.ts","sourceRoot":"","sources":["../../../src/patch/PatchClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"PatchClient.d.ts","sourceRoot":"","sources":["../../../src/patch/PatchClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAA;AAEtE,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAE3D;;;;GAIG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACnC;;OAEG;IACH,QAAQ,EAAE,CAAC,CAAA;IACX;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,UAAU,EAAE,MAAM,CAAA;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;;;;;;GAOG;AACH,qBAAa,WAAW,CAAC,CAAC,SAAS,MAAM,CAAE,SAAQ,YAAY,CAAC,CAAC,CAAC;IAChE;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,UAAU,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;;;;;;OAOG;gBACS,OAAO,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAO1C;;;;;OAKG;IACH,aAAa,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,SAAS,GAAG,cAAc;CAcnE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PatchClient.js","sourceRoot":"","sources":["../../../src/patch/PatchClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PatchClient.js","sourceRoot":"","sources":["../../../src/patch/PatchClient.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAA;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AA4B/B;;;;;;;GAOG;AACH,MAAM,OAAO,WAA8B,SAAQ,YAAe;IAChE;;OAEG;IACH,GAAG,CAAQ;IACX;;OAEG;IACH,UAAU,CAAQ;IAElB;;;OAGG;IACH,OAAO,CAAS;IAEhB;;;;;;;OAOG;IACH,YAAY,OAA8B;QACxC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;QACvB,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAA;QACtB,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAA;QACpC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;IAChC,CAAC;IAED;;;;;OAKG;IACH,aAAa,CAAC,UAAuB;QACnC,MAAM,MAAM,GAA+B;YACzC,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;YACrB,KAAK,EAAE,UAAU;YACjB,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,EAAE,EAAE,MAAM,EAAE;SACb,CAAA;QACD,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;YAC/B,MAAM,MAAM,GAAG,MAAwB,CAAA;YACvC,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;QAC/B,CAAC;QACD,OAAO,MAAM,CAAA;IACf,CAAC;CACF","sourcesContent":["import type { Operation } from '@api-client/json/patch/types.js'\nimport { JsonDocument } from '@api-client/json/patch/json_document.js'\nimport { nanoid } from 'nanoid'\nimport type { MediaPatchInfo, PatchInfo } from './types.js'\n\n/**\n * Options for the PatchClient constructor.\n *\n * @typeParam T The type of the document being patched.\n */\nexport interface PatchClientOptions<T> {\n /**\n * The initial document. A deep copy is made internally.\n */\n document: T\n /**\n * The name of the application creating the patches.\n */\n app: string\n /**\n * The version of the application creating the patches.\n */\n appVersion: string\n /**\n * When version is required for patching, it should be set with the constructor and\n * updated whenever the document changes.\n */\n version?: number\n}\n\n/**\n * A client for managing and applying JSON patches to a document.\n * This class simplifies the process of generating, applying, and comparing patches\n * using the `@api-client/json` library. It also provides a mechanism to notify\n * listeners when the document has been changed after applying a patch.\n *\n * @typeParam T The type of the document being patched.\n */\nexport class PatchClient<T extends object> extends JsonDocument<T> {\n /**\n * The application name generating the patch. Used for tracking/debugging.\n */\n app: string\n /**\n * The application version generating the patch. Used for tracking/debugging.\n */\n appVersion: string\n\n /**\n * When version is required for patching, it should be set with the constructor and\n * updated whenever the document changes.\n */\n version?: number\n\n /**\n * Creates a new PatchClient instance.\n *\n * @param options Options for initializing the client.\n * @param options.document The initial document. A deep copy is made internally.\n * @param options.app The name of the application creating the patches.\n * @param options.appVersion The version of the application creating the patches.\n */\n constructor(options: PatchClientOptions<T>) {\n super(options.document)\n this.app = options.app\n this.appVersion = options.appVersion\n this.version = options.version\n }\n\n /**\n * Generates a patch information object.\n *\n * @param operations The patch operations to include.\n * @returns A `IPatchInfo` object containing the patch data, timestamp, app name, app version, and a unique ID.\n */\n generatePatch(operations: Operation[]): PatchInfo | MediaPatchInfo {\n const result: PatchInfo | MediaPatchInfo = {\n timestamp: Date.now(),\n patch: operations,\n app: this.app,\n appVersion: this.appVersion,\n id: nanoid(),\n }\n if (this.version !== undefined) {\n const casted = result as MediaPatchInfo\n casted.version = this.version\n }\n return result\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/patch/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/patch/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IACV;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,KAAK,EAAE,SAAS,EAAE,CAAA;IAClB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,SAAS;IAC/C;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IACV;;OAEG;IACH,KAAK,EAAE,eAAe,EAAE,CAAA;CACzB;AAED,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC9C;;OAEG;IACH,MAAM,EAAE,SAAS,EAAE,CAAA;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAmB,SAAQ,cAAc;IACxD;;OAEG;IACH,MAAM,EAAE,SAAS,EAAE,CAAA;IACnB;;;;;OAKG;IACH,UAAU,EAAE,MAAM,CAAA;CACnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/patch/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Operation } from '@api-client/json'\nimport { AccessOperation } from '../models/store/Permission.js'\n\n/**\n * An interface describing a schema to be sent to the server\n * when making a patch of a file.\n */\nexport interface PatchInfo {\n /**\n * Auto generated by the client sending the PATCH.\n */\n id: string\n /**\n * The current timestamp.\n */\n timestamp: number\n /**\n * The patch generated by the client.\n */\n patch: Operation[]\n /**\n * The application id that generated the patch.\n * This is a string that is assigned to each application in the suite.\n * External applications need to use a constant string for their apps.\n */\n app?: string\n /**\n * The version of the application that generated the patch.\n * This can and will be used to handle potential differences between suite applications.\n */\n appVersion?: string\n}\n\n/**\n * A patch used when patching a file media.\n */\nexport interface MediaPatchInfo extends PatchInfo {\n /**\n * The version of the document that this patch was based on.\n * This is used for conflict detection.\n */\n version: number\n}\n\n/**\n * An interface describing a schema to be sent to the server\n * when making a patch with user access to a file.\n */\nexport interface AccessPatchInfo {\n /**\n * Auto generated by the client sending the PATCH.\n */\n id: string\n /**\n * The patch generated by the client.\n */\n patch: AccessOperation[]\n}\n\nexport interface PatchRevision extends PatchInfo {\n /**\n * The patch to apply to the object to revert the changes.\n */\n revert: Operation[]\n}\n\n/**\n * A schema sent by the store server in a response to the patch request.\n * It contains an information about the applied patch, the reverse operation associated with it,\n * application information, and the generated by the client patch id.\n */\nexport interface MediaPatchRevision extends MediaPatchInfo {\n /**\n * The patch to apply to the object to revert the changes.\n */\n revert: Operation[]\n /**\n * The new version number of the document after applying the patch.\n * Clients need to use this value when sending another patch.\n * If the client doesn't have the current version number, it needs to\n * refresh the document and try again.\n */\n newVersion: number\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/patch/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Operation } from '@api-client/json/patch/types.js'\nimport { AccessOperation } from '../models/store/Permission.js'\n\n/**\n * An interface describing a schema to be sent to the server\n * when making a patch of a file.\n */\nexport interface PatchInfo {\n /**\n * Auto generated by the client sending the PATCH.\n */\n id: string\n /**\n * The current timestamp.\n */\n timestamp: number\n /**\n * The patch generated by the client.\n */\n patch: Operation[]\n /**\n * The application id that generated the patch.\n * This is a string that is assigned to each application in the suite.\n * External applications need to use a constant string for their apps.\n */\n app?: string\n /**\n * The version of the application that generated the patch.\n * This can and will be used to handle potential differences between suite applications.\n */\n appVersion?: string\n}\n\n/**\n * A patch used when patching a file media.\n */\nexport interface MediaPatchInfo extends PatchInfo {\n /**\n * The version of the document that this patch was based on.\n * This is used for conflict detection.\n */\n version: number\n}\n\n/**\n * An interface describing a schema to be sent to the server\n * when making a patch with user access to a file.\n */\nexport interface AccessPatchInfo {\n /**\n * Auto generated by the client sending the PATCH.\n */\n id: string\n /**\n * The patch generated by the client.\n */\n patch: AccessOperation[]\n}\n\nexport interface PatchRevision extends PatchInfo {\n /**\n * The patch to apply to the object to revert the changes.\n */\n revert: Operation[]\n}\n\n/**\n * A schema sent by the store server in a response to the patch request.\n * It contains an information about the applied patch, the reverse operation associated with it,\n * application information, and the generated by the client patch id.\n */\nexport interface MediaPatchRevision extends MediaPatchInfo {\n /**\n * The patch to apply to the object to revert the changes.\n */\n revert: Operation[]\n /**\n * The new version number of the document after applying the patch.\n * Clients need to use this value when sending another patch.\n * If the client doesn't have the current version number, it needs to\n * refresh the document and try again.\n */\n newVersion: number\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@api-client/core",
|
|
3
3
|
"description": "The API Client's core client library. Works in NodeJS and in a ES enabled browser.",
|
|
4
|
-
"version": "0.12.
|
|
4
|
+
"version": "0.12.6",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"exports": {
|
|
7
7
|
"./browser.js": {
|
|
@@ -16,7 +16,38 @@
|
|
|
16
16
|
"import": "./build/src/index.js",
|
|
17
17
|
"default": "./build/src/index.js",
|
|
18
18
|
"types": "./build/src/index.d.ts"
|
|
19
|
-
}
|
|
19
|
+
},
|
|
20
|
+
"./package.json": "./package.json",
|
|
21
|
+
"./amf/*.js": "./build/src/amf/*.js",
|
|
22
|
+
"./amf/*": "./build/src/amf/*",
|
|
23
|
+
"./authorization/*.js": "./build/src/authorization/*.js",
|
|
24
|
+
"./authorization/*": "./build/src/authorization/*",
|
|
25
|
+
"./config/*.js": "./build/src/config/*.js",
|
|
26
|
+
"./config/*": "./build/src/config/*",
|
|
27
|
+
"./cookies/*.js": "./build/src/cookies/*.js",
|
|
28
|
+
"./cookies/*": "./build/src/cookies/*",
|
|
29
|
+
"./data/*.js": "./build/src/data/*.js",
|
|
30
|
+
"./data/*": "./build/src/data/*",
|
|
31
|
+
"./events/*.js": "./build/src/events/*.js",
|
|
32
|
+
"./events/*": "./build/src/events/*",
|
|
33
|
+
"./exceptions/*.js": "./build/src/exceptions/*.js",
|
|
34
|
+
"./exceptions/*": "./build/src/exceptions/*",
|
|
35
|
+
"./lib/*.js": "./build/src/lib/*.js",
|
|
36
|
+
"./lib/*": "./build/src/lib/*",
|
|
37
|
+
"./mocking/*.js": "./build/src/mocking/*.js",
|
|
38
|
+
"./mocking/*": "./build/src/mocking/*",
|
|
39
|
+
"./modeling/*.js": "./build/src/modeling/*.js",
|
|
40
|
+
"./modeling/*": "./build/src/modeling/*",
|
|
41
|
+
"./models/*.js": "./build/src/models/*.js",
|
|
42
|
+
"./models/*": "./build/src/models/*",
|
|
43
|
+
"./patch/*.js": "./build/src/patch/*.js",
|
|
44
|
+
"./patch/*": "./build/src/patch/*",
|
|
45
|
+
"./proxy/*.js": "./build/src/proxy/*.js",
|
|
46
|
+
"./proxy/*": "./build/src/proxy/*",
|
|
47
|
+
"./runtime/*.js": "./build/src/runtime/*.js",
|
|
48
|
+
"./runtime/*": "./build/src/runtime/*",
|
|
49
|
+
"./testing/*.js": "./build/src/testing/*.js",
|
|
50
|
+
"./testing/*": "./build/src/testing/*"
|
|
20
51
|
},
|
|
21
52
|
"imports": {
|
|
22
53
|
"#amf/*": "./src/amf/*",
|
|
@@ -57,6 +88,7 @@
|
|
|
57
88
|
"@pawel-up/jexl": "^3.0.0",
|
|
58
89
|
"@xmldom/xmldom": "^0.9.7",
|
|
59
90
|
"amf-json-ld-lib": "^0.0.15",
|
|
91
|
+
"chalk": "^5.4.1",
|
|
60
92
|
"console-table-printer": "^2.11.2",
|
|
61
93
|
"nanoid": "^5.1.5",
|
|
62
94
|
"ws": "^8.12.0",
|
|
@@ -95,9 +127,9 @@
|
|
|
95
127
|
"globals": "^16.0.0",
|
|
96
128
|
"husky": "^9.0.11",
|
|
97
129
|
"jsdom": "^26.0.0",
|
|
98
|
-
"lint-staged": "^
|
|
130
|
+
"lint-staged": "^16.0.0",
|
|
99
131
|
"nock": "^14.0.1",
|
|
100
|
-
"oauth2-mock-server": "^
|
|
132
|
+
"oauth2-mock-server": "^8.0.0",
|
|
101
133
|
"playwright": "^1.50.1",
|
|
102
134
|
"prettier": "^3.5.1",
|
|
103
135
|
"sinon": "^20.0.0",
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Json } from '@api-client/json'
|
|
2
1
|
import { AmfNamespace as ns } from '../definitions/Namespace.js'
|
|
3
2
|
import { ShapeBase } from './ShapeBase.js'
|
|
4
3
|
import { XmlDataNodeGenerator } from '../data-node/XmlDataNodeGenerator.js'
|
|
@@ -869,7 +868,7 @@ export class ShapeXmlSchemaGenerator extends ShapeBase {
|
|
|
869
868
|
const { and = [], xone = [], or = [] } = schema
|
|
870
869
|
if (and.length) {
|
|
871
870
|
// we combine all properties together under `schema` with changed properties
|
|
872
|
-
const copy =
|
|
871
|
+
const copy = structuredClone(schema) as IApiNodeShape
|
|
873
872
|
copy.and = []
|
|
874
873
|
copy.properties = []
|
|
875
874
|
and.forEach((item) => {
|
package/src/events/BaseEvents.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Operation } from '@api-client/json/patch/types.js'
|
|
2
2
|
import CustomEvent from './CustomEvent.js'
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -588,7 +588,7 @@ export interface IPatchInfo extends IPatchBase {
|
|
|
588
588
|
/**
|
|
589
589
|
* The patch generated by the client.
|
|
590
590
|
*/
|
|
591
|
-
patch:
|
|
591
|
+
patch: Operation[]
|
|
592
592
|
}
|
|
593
593
|
|
|
594
594
|
/**
|
|
@@ -601,5 +601,5 @@ export interface IPatchRevision extends IPatchInfo {
|
|
|
601
601
|
/**
|
|
602
602
|
* The patch to apply to the object to revert the changes.
|
|
603
603
|
*/
|
|
604
|
-
revert:
|
|
604
|
+
revert: Operation[]
|
|
605
605
|
}
|
|
@@ -7,7 +7,6 @@ import { observed, retargetChange, toRaw } from './observed.js'
|
|
|
7
7
|
import type { DomainEntity } from './DomainEntity.js'
|
|
8
8
|
import type { IApiAssociationShape, IApiPropertyShape } from '../amf/definitions/Shapes.js'
|
|
9
9
|
import type { AssociationBinding, AssociationBindings, AssociationWebBindings } from './Bindings.js'
|
|
10
|
-
import { Json } from '@api-client/json'
|
|
11
10
|
import { DomainAttributeAttribute, DomainAttributeAttributes } from './DataFormat.js'
|
|
12
11
|
import type { AssociationTarget, DomainGraphEdge } from './types.js'
|
|
13
12
|
import { ShapeGenerator } from './amf/ShapeGenerator.js'
|
|
@@ -222,7 +221,7 @@ export class DomainAssociation extends DomainElement {
|
|
|
222
221
|
info: this.info.toJSON(),
|
|
223
222
|
}
|
|
224
223
|
if (this.schema) {
|
|
225
|
-
result.schema =
|
|
224
|
+
result.schema = structuredClone(toRaw(this, this.schema))
|
|
226
225
|
}
|
|
227
226
|
if (typeof this.multiple === 'boolean') {
|
|
228
227
|
result.multiple = this.multiple
|
|
@@ -231,7 +230,7 @@ export class DomainAssociation extends DomainElement {
|
|
|
231
230
|
result.required = this.required
|
|
232
231
|
}
|
|
233
232
|
if (Array.isArray(this.bindings) && this.bindings.length) {
|
|
234
|
-
result.bindings = (toRaw(this, this.bindings) as AssociationBinding[]).map((i) =>
|
|
233
|
+
result.bindings = (toRaw(this, this.bindings) as AssociationBinding[]).map((i) => structuredClone(i))
|
|
235
234
|
}
|
|
236
235
|
if (Array.isArray(this.targets) && this.targets.length) {
|
|
237
236
|
result.targets = (toRaw(this, this.targets) as AssociationTarget[]).map((i) => ({ ...i }))
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { JsonEdge, Node } from '@api-client/graph/graph/types.js'
|
|
2
|
+
import { Graph } from '@api-client/graph/graph/Graph.js'
|
|
2
3
|
import type { DataDomainGraph, DomainGraphEdge, DomainGraphNodeType, SerializedGraph } from './types.js'
|
|
3
4
|
import {
|
|
4
5
|
DomainAssociationKind,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JsonEdge, Node } from '@api-client/graph'
|
|
1
|
+
import type { JsonEdge, Node } from '@api-client/graph/graph/types.js'
|
|
2
2
|
import type { DataDomain, DataDomainSchema } from './DataDomain.js'
|
|
3
3
|
import type { DomainGraphEdge, DataDomainGraph, SerializedGraph } from './types.js'
|
|
4
4
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Json } from '@api-client/json'
|
|
2
1
|
import { AmfShapeGenerator } from '../../amf/AmfShapeGenerator.js'
|
|
3
2
|
import { IApiAssociationShape, IApiPropertyShape } from '../../amf/definitions/Shapes.js'
|
|
4
3
|
import { nanoid } from 'nanoid'
|
|
@@ -253,7 +252,7 @@ export class DataAssociation {
|
|
|
253
252
|
this.info = Thing.fromName('')
|
|
254
253
|
}
|
|
255
254
|
if (schema) {
|
|
256
|
-
this.schema =
|
|
255
|
+
this.schema = structuredClone(schema)
|
|
257
256
|
} else {
|
|
258
257
|
this.schema = undefined
|
|
259
258
|
}
|
|
@@ -273,7 +272,7 @@ export class DataAssociation {
|
|
|
273
272
|
this.targets = []
|
|
274
273
|
}
|
|
275
274
|
if (Array.isArray(bindings)) {
|
|
276
|
-
this.bindings = bindings.map((i) =>
|
|
275
|
+
this.bindings = bindings.map((i) => structuredClone(i))
|
|
277
276
|
} else {
|
|
278
277
|
this.bindings = []
|
|
279
278
|
}
|
|
@@ -330,7 +329,7 @@ export class DataAssociation {
|
|
|
330
329
|
info: this.info.toJSON(),
|
|
331
330
|
}
|
|
332
331
|
if (this.schema) {
|
|
333
|
-
result.schema =
|
|
332
|
+
result.schema = structuredClone(this.schema)
|
|
334
333
|
}
|
|
335
334
|
if (typeof this.multiple === 'boolean') {
|
|
336
335
|
result.multiple = this.multiple
|
|
@@ -342,7 +341,7 @@ export class DataAssociation {
|
|
|
342
341
|
result.targets = this.targets.map((i) => ({ ...i }))
|
|
343
342
|
}
|
|
344
343
|
if (Array.isArray(this.bindings) && this.bindings.length) {
|
|
345
|
-
result.bindings = this.bindings.map((i) =>
|
|
344
|
+
result.bindings = this.bindings.map((i) => structuredClone(i))
|
|
346
345
|
}
|
|
347
346
|
return result
|
|
348
347
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Json } from '@api-client/json'
|
|
2
1
|
import { IThing, Thing } from '../../models/Thing.js'
|
|
3
2
|
import { nanoid } from 'nanoid'
|
|
4
3
|
import { DataNamespace } from './DataNamespace.js'
|
|
@@ -387,12 +386,12 @@ export class DataProperty {
|
|
|
387
386
|
this.taxonomy = []
|
|
388
387
|
}
|
|
389
388
|
if (schema) {
|
|
390
|
-
this.schema =
|
|
389
|
+
this.schema = structuredClone(schema)
|
|
391
390
|
} else {
|
|
392
391
|
this.schema = undefined
|
|
393
392
|
}
|
|
394
393
|
if (Array.isArray(bindings)) {
|
|
395
|
-
this.bindings = bindings.map((i) =>
|
|
394
|
+
this.bindings = bindings.map((i) => structuredClone(i))
|
|
396
395
|
} else {
|
|
397
396
|
this.bindings = []
|
|
398
397
|
}
|
|
@@ -441,10 +440,10 @@ export class DataProperty {
|
|
|
441
440
|
result.taxonomy = [...this.taxonomy]
|
|
442
441
|
}
|
|
443
442
|
if (this.schema) {
|
|
444
|
-
result.schema =
|
|
443
|
+
result.schema = structuredClone(this.schema)
|
|
445
444
|
}
|
|
446
445
|
if (Array.isArray(this.bindings) && this.bindings.length) {
|
|
447
|
-
result.bindings = this.bindings.map((i) =>
|
|
446
|
+
result.bindings = this.bindings.map((i) => structuredClone(i))
|
|
448
447
|
}
|
|
449
448
|
return result
|
|
450
449
|
}
|
package/src/modeling/types.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { GraphJson } from '@api-client/graph/graph/types.js'
|
|
2
|
+
import type { Graph } from '@api-client/graph/graph/Graph.js'
|
|
2
3
|
import type { DomainAssociation } from './DomainAssociation.js'
|
|
3
4
|
import type { DomainEntity } from './DomainEntity.js'
|
|
4
5
|
import type { DomainModel } from './DomainModel.js'
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Json } from '@api-client/json'
|
|
2
1
|
import { IRequestLog } from './RequestLog.js'
|
|
3
2
|
|
|
4
3
|
export const Kind = 'Core#ProjectExecution'
|
|
@@ -166,7 +165,7 @@ export class ProjectExecution implements IProjectExecution {
|
|
|
166
165
|
const { started = Date.now(), midnight, project, user, key, app, ended = started, iterations, parent } = init
|
|
167
166
|
this.started = started
|
|
168
167
|
this.ended = ended
|
|
169
|
-
this.iterations = iterations.map((i) =>
|
|
168
|
+
this.iterations = iterations.map((i) => structuredClone(i))
|
|
170
169
|
if (key) {
|
|
171
170
|
this.key = key
|
|
172
171
|
} else {
|
|
@@ -206,7 +205,7 @@ export class ProjectExecution implements IProjectExecution {
|
|
|
206
205
|
project: this.project,
|
|
207
206
|
app: this.app,
|
|
208
207
|
ended: this.ended,
|
|
209
|
-
iterations: this.iterations.map((i) =>
|
|
208
|
+
iterations: this.iterations.map((i) => structuredClone(i)),
|
|
210
209
|
started: this.started,
|
|
211
210
|
}
|
|
212
211
|
if (this.parent) {
|
package/src/models/Request.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Json } from '@api-client/json'
|
|
2
1
|
import { IRequestConfig, RequestConfig } from './RequestConfig.js'
|
|
3
2
|
import { Thing, IThing } from './Thing.js'
|
|
4
3
|
import { HttpCertificate, Certificate } from './ClientCertificate.js'
|
|
@@ -384,12 +383,12 @@ export class Request {
|
|
|
384
383
|
this.midnight = midnight
|
|
385
384
|
}
|
|
386
385
|
if (Array.isArray(flows)) {
|
|
387
|
-
this.flows = flows.map((i) =>
|
|
386
|
+
this.flows = flows.map((i) => structuredClone(i))
|
|
388
387
|
} else {
|
|
389
388
|
this.flows = undefined
|
|
390
389
|
}
|
|
391
390
|
if (Array.isArray(assertions)) {
|
|
392
|
-
this.assertions = assertions.map((i) =>
|
|
391
|
+
this.assertions = assertions.map((i) => structuredClone(i))
|
|
393
392
|
} else {
|
|
394
393
|
this.assertions = undefined
|
|
395
394
|
}
|
|
@@ -419,10 +418,10 @@ export class Request {
|
|
|
419
418
|
result.authorization = this.authorization.map((i) => i.toJSON())
|
|
420
419
|
}
|
|
421
420
|
if (Array.isArray(this.flows)) {
|
|
422
|
-
result.flows = this.flows.map((i) =>
|
|
421
|
+
result.flows = this.flows.map((i) => structuredClone(i))
|
|
423
422
|
}
|
|
424
423
|
if (Array.isArray(this.assertions)) {
|
|
425
|
-
result.assertions = this.assertions.map((i) =>
|
|
424
|
+
result.assertions = this.assertions.map((i) => structuredClone(i))
|
|
426
425
|
}
|
|
427
426
|
if (this.clientCertificate) {
|
|
428
427
|
result.clientCertificate = this.clientCertificate.toJSON()
|
package/src/patch/PatchClient.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Operation
|
|
1
|
+
import type { Operation } from '@api-client/json/patch/types.js'
|
|
2
|
+
import { JsonDocument } from '@api-client/json/patch/json_document.js'
|
|
2
3
|
import { nanoid } from 'nanoid'
|
|
3
4
|
import type { MediaPatchInfo, PatchInfo } from './types.js'
|
|
4
5
|
|
package/src/patch/types.ts
CHANGED