@automate.ax/integration-contracts 0.119.6 → 0.119.7

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.
@@ -330,12 +330,13 @@ export function normalizeAclRule(value) {
330
330
  if (!value.id || !value.scope?.type) {
331
331
  throw new Error("Google Calendar returned an incomplete ACL rule.");
332
332
  }
333
+ const scopeType = normalizeAclScope(value.scope.type);
333
334
  return {
334
335
  id: value.id,
335
336
  role: normalizeAclRole(value.role),
336
337
  scope: {
337
- type: normalizeAclScope(value.scope.type),
338
- value: value.scope.value || undefined,
338
+ type: scopeType,
339
+ value: scopeType === "default" ? undefined : (value.scope.value ?? undefined),
339
340
  },
340
341
  };
341
342
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automate.ax/integration-contracts",
3
- "version": "0.119.6",
3
+ "version": "0.119.7",
4
4
  "description": "Shared integration payload contracts and provider primitives for Automate.ax.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -53,7 +53,7 @@
53
53
  }
54
54
  },
55
55
  "dependencies": {
56
- "@automate.ax/codec": "0.119.6",
56
+ "@automate.ax/codec": "0.119.7",
57
57
  "@cfworker/json-schema": "^4.1.1",
58
58
  "@googleapis/calendar": "^15.0.0",
59
59
  "@googleapis/forms": "^6.0.1",
@@ -413,12 +413,14 @@ export function normalizeAclRule(
413
413
  if (!value.id || !value.scope?.type) {
414
414
  throw new Error("Google Calendar returned an incomplete ACL rule.")
415
415
  }
416
+ const scopeType = normalizeAclScope(value.scope.type)
416
417
  return {
417
418
  id: value.id,
418
419
  role: normalizeAclRole(value.role),
419
420
  scope: {
420
- type: normalizeAclScope(value.scope.type),
421
- value: value.scope.value || undefined,
421
+ type: scopeType,
422
+ value:
423
+ scopeType === "default" ? undefined : (value.scope.value ?? undefined),
422
424
  },
423
425
  }
424
426
  }