@nizam-os/carrier-sdk 2.4.1 → 2.4.2

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.
@@ -9,4 +9,13 @@ export interface ReconcileResponse {
9
9
  kc_has_nizam_missing?: string[] | undefined;
10
10
  /** Per-org membership-set divergences (KC vs Nizam). */
11
11
  membership_divergent?: NizamCarrier.MembershipDriftResponse[] | undefined;
12
+ /** Object type discriminator (Stripe pattern). */
13
+ object?: ReconcileResponse.Object_ | undefined;
14
+ }
15
+ export declare namespace ReconcileResponse {
16
+ /** Object type discriminator (Stripe pattern). */
17
+ const Object_: {
18
+ readonly KeycloakReconciliation: "keycloak_reconciliation";
19
+ };
20
+ type Object_ = (typeof Object_)[keyof typeof Object_];
12
21
  }
@@ -1,3 +1,11 @@
1
1
  "use strict";
2
2
  // This file was auto-generated by Fern from our API Definition.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.ReconcileResponse = void 0;
5
+ var ReconcileResponse;
6
+ (function (ReconcileResponse) {
7
+ /** Object type discriminator (Stripe pattern). */
8
+ ReconcileResponse.Object_ = {
9
+ KeycloakReconciliation: "keycloak_reconciliation",
10
+ };
11
+ })(ReconcileResponse || (exports.ReconcileResponse = ReconcileResponse = {}));
@@ -14,11 +14,19 @@ function anySignal(...args) {
14
14
  for (const signal of signals) {
15
15
  if (signal.aborted) {
16
16
  controller.abort(signal?.reason);
17
- break;
17
+ return controller.signal;
18
18
  }
19
19
  signal.addEventListener("abort", () => controller.abort(signal?.reason), {
20
20
  signal: controller.signal,
21
21
  });
22
+ // Re-check after adding listener: the signal may have aborted
23
+ // between the initial `signal.aborted` check and the `addEventListener`
24
+ // call above. If it did, the abort event was already dispatched and
25
+ // the listener will never fire — we must manually abort.
26
+ if (signal.aborted) {
27
+ controller.abort(signal?.reason);
28
+ return controller.signal;
29
+ }
22
30
  }
23
31
  return controller.signal;
24
32
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nizam-os/carrier-sdk",
3
- "version": "2.4.1",
3
+ "version": "2.4.2",
4
4
  "description": "Nizam Carrier API SDK for TypeScript / JavaScript.",
5
5
  "license": "MIT",
6
6
  "private": false,