@magda/registry-client 6.1.0-pr.3681.2 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -35,6 +35,17 @@ declare class AspectDefinitionsApi {
35
35
  response: Response;
36
36
  body: AspectDefinition;
37
37
  }>;
38
+ /**
39
+ * Delete an aspect definition by ID
40
+ * Deletes an aspect definition. The aspect definition can only be deleted when no record aspect data references it (within the tenant); otherwise a 409 response is returned and nothing is deleted.
41
+ * @param xMagdaTenantId 0
42
+ * @param id ID of the aspect to be deleted.
43
+ * @param xMagdaSession Magda internal session id
44
+ */
45
+ deleteById(xMagdaTenantId: number, id: string, xMagdaSession: string): Promise<{
46
+ response: Response;
47
+ body: DeleteResult;
48
+ }>;
38
49
  /**
39
50
  * Get a list of all aspects
40
51
  *
package/dist/index.js CHANGED
@@ -13766,6 +13766,51 @@ var AspectDefinitionsApi = class {
13766
13766
  }
13767
13767
  return fetchWithRequestOptions(requestOptions);
13768
13768
  }
13769
+ /**
13770
+ * Delete an aspect definition by ID
13771
+ * Deletes an aspect definition. The aspect definition can only be deleted when no record aspect data references it (within the tenant); otherwise a 409 response is returned and nothing is deleted.
13772
+ * @param xMagdaTenantId 0
13773
+ * @param id ID of the aspect to be deleted.
13774
+ * @param xMagdaSession Magda internal session id
13775
+ */
13776
+ deleteById(xMagdaTenantId, id, xMagdaSession) {
13777
+ const localVarPath = this.basePath + "/aspects/{id}".replace("{id}", String(id));
13778
+ let queryParameters = {};
13779
+ let headerParams = Object.assign({}, this.defaultHeaders);
13780
+ let formParams = {};
13781
+ if (xMagdaTenantId === null || xMagdaTenantId === void 0) {
13782
+ throw new Error("Required parameter xMagdaTenantId was null or undefined when calling deleteById.");
13783
+ }
13784
+ if (id === null || id === void 0) {
13785
+ throw new Error("Required parameter id was null or undefined when calling deleteById.");
13786
+ }
13787
+ if (xMagdaSession === null || xMagdaSession === void 0) {
13788
+ throw new Error("Required parameter xMagdaSession was null or undefined when calling deleteById.");
13789
+ }
13790
+ if (isNotEmpty(xMagdaTenantId)) {
13791
+ headerParams["X-Magda-Tenant-Id"] = xMagdaTenantId;
13792
+ }
13793
+ if (isNotEmpty(xMagdaSession)) {
13794
+ headerParams["X-Magda-Session"] = xMagdaSession;
13795
+ }
13796
+ let useFormData = false;
13797
+ const requestOptions = {
13798
+ method: "DELETE",
13799
+ qs: queryParameters,
13800
+ headers: headerParams,
13801
+ uri: localVarPath,
13802
+ json: true
13803
+ };
13804
+ this.authentications.default.applyToRequest(requestOptions);
13805
+ if (Object.keys(formParams).length) {
13806
+ if (useFormData) {
13807
+ requestOptions.formData = formParams;
13808
+ } else {
13809
+ requestOptions.form = formParams;
13810
+ }
13811
+ }
13812
+ return fetchWithRequestOptions(requestOptions);
13813
+ }
13769
13814
  /**
13770
13815
  * Get a list of all aspects
13771
13816
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@magda/registry-client",
3
3
  "description": "MAGDA Registry Client",
4
- "version": "6.1.0-pr.3681.2",
4
+ "version": "6.1.0",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": "./dist/index.js",
@@ -23,7 +23,7 @@
23
23
  "main": "dist/index.js",
24
24
  "types": "dist/index.d.ts",
25
25
  "devDependencies": {
26
- "@magda/typescript-common": "^6.1.0-pr.3681.2",
26
+ "@magda/typescript-common": "^6.1.0",
27
27
  "@microsoft/api-extractor": "~7.39.0",
28
28
  "esbuild": "^0.19.10",
29
29
  "ts-loader": "^9.5.1",