@viu/emporix-sdk 2.36.1 → 2.37.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.cts CHANGED
@@ -677,9 +677,18 @@ type SessionContextPatch = Pick<SessionContextPatch$1, "siteCode" | "currency" |
677
677
  };
678
678
 
679
679
  /**
680
- * Session-context binding for the current storefront session. Both endpoints
681
- * resolve the session-id from the `Authorization` token — no path/query
682
- * parameter required.
680
+ * Session-context binding for the current storefront session. Every method here
681
+ * hits a `/me/context` path, so the session-id comes from the `Authorization`
682
+ * token — no path or query parameter required.
683
+ *
684
+ * **The service's other half is intentionally not wrapped.** Emporix also exposes
685
+ * the same four operations addressed by an explicit session id —
686
+ * `GET`/`PUT /{sessionId}/context`, `POST`/`DELETE` on its attributes. Those are
687
+ * administrative: they let a caller read and rewrite *someone else's* session,
688
+ * which is not a storefront capability and needs a service token. Wrapping them
689
+ * here would put an admin surface on the object a storefront holds. If you need
690
+ * them, build the request directly — the generated types are in
691
+ * `../generated/session-context`.
683
692
  */
684
693
  declare class SessionContextService {
685
694
  private readonly ctx;
@@ -746,6 +755,13 @@ declare class IamService {
746
755
  update: (userId: string, input: IamUserUpdate, auth: AuthContext) => Promise<void>;
747
756
  delete: (userId: string, auth: AuthContext) => Promise<void>;
748
757
  getGroups: (userId: string, auth: AuthContext) => Promise<IamGroup[]>;
758
+ /**
759
+ * Reads one of a user's groups (`GET /users/{userId}/groups/{groupId}`).
760
+ * The collection read above returns the same shape per entry; this exists
761
+ * because Emporix exposes the item separately and a caller holding both ids
762
+ * should not have to page the collection to resolve one group.
763
+ */
764
+ getGroup: (userId: string, groupId: string, auth: AuthContext) => Promise<IamGroup>;
749
765
  getScopes: (userId: string, auth: AuthContext) => Promise<IamUserScopes>;
750
766
  getMyScopes: (auth: AuthContext) => Promise<IamUserScopes>;
751
767
  getAccessControls: (userId: string, auth: AuthContext) => Promise<IamAccessControl[]>;
@@ -3775,7 +3791,29 @@ type ImportedEntity = {
3775
3791
  /**
3776
3792
  * State of the imported entity.
3777
3793
  */
3778
- state?: 'TO_CREATE' | 'ENABLED' | 'DISABLED' | 'EXISTS';
3794
+ state?: 'TO_CREATE' | 'ENABLED' | 'DISABLED' | 'EXISTS' | 'FAILED';
3795
+ /**
3796
+ * Reasons the entity was skipped, disabled, or failed during import.
3797
+ */
3798
+ details?: Array<ImportDetails>;
3799
+ };
3800
+ type ImportDetails = {
3801
+ /**
3802
+ * Machine-readable reason code for UI localization.
3803
+ */
3804
+ code?: 'MISSING_FUNCTION' | 'MISSING_TOKEN' | 'NOT_IMPORTABLE' | 'ALREADY_EXISTS' | 'AGENT_IMPORTED_DISABLED' | 'IMPORT_FAILED';
3805
+ /**
3806
+ * ID of the related object, such as a function ID or token ID.
3807
+ */
3808
+ objectId?: string;
3809
+ /**
3810
+ * Display name of the related object, such as a tool name.
3811
+ */
3812
+ objectName?: string;
3813
+ /**
3814
+ * English fallback message when a localized string is not available.
3815
+ */
3816
+ message?: string;
3779
3817
  };
3780
3818
  type AttachmentResponse = {
3781
3819
  /**
package/dist/index.d.ts CHANGED
@@ -677,9 +677,18 @@ type SessionContextPatch = Pick<SessionContextPatch$1, "siteCode" | "currency" |
677
677
  };
678
678
 
679
679
  /**
680
- * Session-context binding for the current storefront session. Both endpoints
681
- * resolve the session-id from the `Authorization` token — no path/query
682
- * parameter required.
680
+ * Session-context binding for the current storefront session. Every method here
681
+ * hits a `/me/context` path, so the session-id comes from the `Authorization`
682
+ * token — no path or query parameter required.
683
+ *
684
+ * **The service's other half is intentionally not wrapped.** Emporix also exposes
685
+ * the same four operations addressed by an explicit session id —
686
+ * `GET`/`PUT /{sessionId}/context`, `POST`/`DELETE` on its attributes. Those are
687
+ * administrative: they let a caller read and rewrite *someone else's* session,
688
+ * which is not a storefront capability and needs a service token. Wrapping them
689
+ * here would put an admin surface on the object a storefront holds. If you need
690
+ * them, build the request directly — the generated types are in
691
+ * `../generated/session-context`.
683
692
  */
684
693
  declare class SessionContextService {
685
694
  private readonly ctx;
@@ -746,6 +755,13 @@ declare class IamService {
746
755
  update: (userId: string, input: IamUserUpdate, auth: AuthContext) => Promise<void>;
747
756
  delete: (userId: string, auth: AuthContext) => Promise<void>;
748
757
  getGroups: (userId: string, auth: AuthContext) => Promise<IamGroup[]>;
758
+ /**
759
+ * Reads one of a user's groups (`GET /users/{userId}/groups/{groupId}`).
760
+ * The collection read above returns the same shape per entry; this exists
761
+ * because Emporix exposes the item separately and a caller holding both ids
762
+ * should not have to page the collection to resolve one group.
763
+ */
764
+ getGroup: (userId: string, groupId: string, auth: AuthContext) => Promise<IamGroup>;
749
765
  getScopes: (userId: string, auth: AuthContext) => Promise<IamUserScopes>;
750
766
  getMyScopes: (auth: AuthContext) => Promise<IamUserScopes>;
751
767
  getAccessControls: (userId: string, auth: AuthContext) => Promise<IamAccessControl[]>;
@@ -3775,7 +3791,29 @@ type ImportedEntity = {
3775
3791
  /**
3776
3792
  * State of the imported entity.
3777
3793
  */
3778
- state?: 'TO_CREATE' | 'ENABLED' | 'DISABLED' | 'EXISTS';
3794
+ state?: 'TO_CREATE' | 'ENABLED' | 'DISABLED' | 'EXISTS' | 'FAILED';
3795
+ /**
3796
+ * Reasons the entity was skipped, disabled, or failed during import.
3797
+ */
3798
+ details?: Array<ImportDetails>;
3799
+ };
3800
+ type ImportDetails = {
3801
+ /**
3802
+ * Machine-readable reason code for UI localization.
3803
+ */
3804
+ code?: 'MISSING_FUNCTION' | 'MISSING_TOKEN' | 'NOT_IMPORTABLE' | 'ALREADY_EXISTS' | 'AGENT_IMPORTED_DISABLED' | 'IMPORT_FAILED';
3805
+ /**
3806
+ * ID of the related object, such as a function ID or token ID.
3807
+ */
3808
+ objectId?: string;
3809
+ /**
3810
+ * Display name of the related object, such as a tool name.
3811
+ */
3812
+ objectName?: string;
3813
+ /**
3814
+ * English fallback message when a localized string is not available.
3815
+ */
3816
+ message?: string;
3779
3817
  };
3780
3818
  type AttachmentResponse = {
3781
3819
  /**
package/dist/index.js CHANGED
@@ -28,10 +28,10 @@ import { CompaniesService } from './chunk-QQMLN76U.js';
28
28
  export { CompaniesService } from './chunk-QQMLN76U.js';
29
29
  import { ContactsService } from './chunk-27NLS646.js';
30
30
  export { ContactsService } from './chunk-27NLS646.js';
31
- import { CustomerGroupsService, IamService } from './chunk-LQFRJSVT.js';
32
- export { CustomerGroupsService, IamService } from './chunk-LQFRJSVT.js';
33
- import { CustomerService } from './chunk-PRN3T6TY.js';
34
- export { CustomerService } from './chunk-PRN3T6TY.js';
31
+ import { CustomerGroupsService, IamService } from './chunk-5XZ6MSXW.js';
32
+ export { CustomerGroupsService, IamService } from './chunk-5XZ6MSXW.js';
33
+ import { CustomerService } from './chunk-UA4BM6OP.js';
34
+ export { CustomerService } from './chunk-UA4BM6OP.js';
35
35
  import './chunk-3BDDYX3V.js';
36
36
  import { EmporixTimeoutError, EmporixNetworkError, errorFromResponse, EmporixNotFoundError, EmporixError } from './chunk-UWGGF4MC.js';
37
37
  export { EmporixAuthError, EmporixError, EmporixForbiddenError, EmporixInsufficientScopeError, EmporixNetworkError, EmporixNotFoundError, EmporixServerError, EmporixTimeoutError, EmporixValidationError, errorFromResponse } from './chunk-UWGGF4MC.js';
@@ -698,7 +698,7 @@ var HttpClient = class {
698
698
  };
699
699
 
700
700
  // package.json
701
- var version = "2.36.1";
701
+ var version = "2.37.0";
702
702
 
703
703
  // src/version.ts
704
704
  var SDK_VERSION = version;