@magda/minion-sdk 6.1.0-pr.3681.2 → 6.1.1-pr.3725.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
@@ -37,6 +37,17 @@ declare class AspectDefinitionsApi {
37
37
  response: Response;
38
38
  body: AspectDefinition;
39
39
  }>;
40
+ /**
41
+ * Delete an aspect definition by ID
42
+ * 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.
43
+ * @param xMagdaTenantId 0
44
+ * @param id ID of the aspect to be deleted.
45
+ * @param xMagdaSession Magda internal session id
46
+ */
47
+ deleteById(xMagdaTenantId: number, id: string, xMagdaSession: string): Promise<{
48
+ response: Response;
49
+ body: DeleteResult;
50
+ }>;
40
51
  /**
41
52
  * Get a list of all aspects
42
53
  *
package/dist/index.js CHANGED
@@ -57782,6 +57782,51 @@ var AspectDefinitionsApi = class {
57782
57782
  }
57783
57783
  return fetchWithRequestOptions(requestOptions);
57784
57784
  }
57785
+ /**
57786
+ * Delete an aspect definition by ID
57787
+ * 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.
57788
+ * @param xMagdaTenantId 0
57789
+ * @param id ID of the aspect to be deleted.
57790
+ * @param xMagdaSession Magda internal session id
57791
+ */
57792
+ deleteById(xMagdaTenantId, id, xMagdaSession) {
57793
+ const localVarPath = this.basePath + "/aspects/{id}".replace("{id}", String(id));
57794
+ let queryParameters = {};
57795
+ let headerParams = Object.assign({}, this.defaultHeaders);
57796
+ let formParams = {};
57797
+ if (xMagdaTenantId === null || xMagdaTenantId === void 0) {
57798
+ throw new Error("Required parameter xMagdaTenantId was null or undefined when calling deleteById.");
57799
+ }
57800
+ if (id === null || id === void 0) {
57801
+ throw new Error("Required parameter id was null or undefined when calling deleteById.");
57802
+ }
57803
+ if (xMagdaSession === null || xMagdaSession === void 0) {
57804
+ throw new Error("Required parameter xMagdaSession was null or undefined when calling deleteById.");
57805
+ }
57806
+ if (isNotEmpty(xMagdaTenantId)) {
57807
+ headerParams["X-Magda-Tenant-Id"] = xMagdaTenantId;
57808
+ }
57809
+ if (isNotEmpty(xMagdaSession)) {
57810
+ headerParams["X-Magda-Session"] = xMagdaSession;
57811
+ }
57812
+ let useFormData = false;
57813
+ const requestOptions = {
57814
+ method: "DELETE",
57815
+ qs: queryParameters,
57816
+ headers: headerParams,
57817
+ uri: localVarPath,
57818
+ json: true
57819
+ };
57820
+ this.authentications.default.applyToRequest(requestOptions);
57821
+ if (Object.keys(formParams).length) {
57822
+ if (useFormData) {
57823
+ requestOptions.formData = formParams;
57824
+ } else {
57825
+ requestOptions.form = formParams;
57826
+ }
57827
+ }
57828
+ return fetchWithRequestOptions(requestOptions);
57829
+ }
57785
57830
  /**
57786
57831
  * Get a list of all aspects
57787
57832
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@magda/minion-sdk",
3
3
  "description": "MAGDA Minion SDK",
4
- "version": "6.1.0-pr.3681.2",
4
+ "version": "6.1.1-pr.3725.0",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": "./dist/index.js",
@@ -23,8 +23,8 @@
23
23
  "main": "dist/index.js",
24
24
  "types": "dist/index.d.ts",
25
25
  "devDependencies": {
26
- "@magda/minion-framework": "^6.1.0-pr.3681.2",
27
- "@magda/typescript-common": "^6.1.0-pr.3681.2",
26
+ "@magda/minion-framework": "^6.1.1-pr.3725.0",
27
+ "@magda/typescript-common": "^6.1.1-pr.3725.0",
28
28
  "@microsoft/api-extractor": "~7.39.0",
29
29
  "esbuild": "^0.19.10",
30
30
  "ts-loader": "^9.5.1",