@viu/emporix-sdk 2.7.0 → 2.9.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/CHANGELOG.md +75 -0
- package/dist/cart.cjs +9 -3
- package/dist/cart.cjs.map +1 -1
- package/dist/cart.d.cts +9 -2
- package/dist/cart.d.ts +9 -2
- package/dist/cart.js +1 -1
- package/dist/{chunk-5JHTZBOC.js → chunk-B4UOYJKW.js} +12 -2
- package/dist/chunk-B4UOYJKW.js.map +1 -0
- package/dist/{chunk-SCI7D74B.js → chunk-BK25FDTH.js} +17 -5
- package/dist/chunk-BK25FDTH.js.map +1 -0
- package/dist/{chunk-B56JZNI7.js → chunk-HAEVK6IS.js} +6 -3
- package/dist/chunk-HAEVK6IS.js.map +1 -0
- package/dist/{chunk-IEZHGU7F.js → chunk-I3YYGSN2.js} +11 -5
- package/dist/chunk-I3YYGSN2.js.map +1 -0
- package/dist/{chunk-6UNFMCHZ.js → chunk-KVBCTXVH.js} +2 -2
- package/dist/chunk-KVBCTXVH.js.map +1 -0
- package/dist/{chunk-NM7VDXBR.js → chunk-LGLFJL3S.js} +6 -3
- package/dist/chunk-LGLFJL3S.js.map +1 -0
- package/dist/chunk-LGOC5XOI.js +40 -0
- package/dist/chunk-LGOC5XOI.js.map +1 -0
- package/dist/{chunk-RXVVFNYN.js → chunk-MM6JF3Z7.js} +6 -3
- package/dist/chunk-MM6JF3Z7.js.map +1 -0
- package/dist/companies.cjs +4 -1
- package/dist/companies.cjs.map +1 -1
- package/dist/companies.d.cts +7 -4
- package/dist/companies.d.ts +7 -4
- package/dist/companies.js +1 -1
- package/dist/contacts.cjs +4 -1
- package/dist/contacts.cjs.map +1 -1
- package/dist/contacts.d.cts +6 -4
- package/dist/contacts.d.ts +6 -4
- package/dist/contacts.js +1 -1
- package/dist/customer-groups.cjs +17 -0
- package/dist/customer-groups.cjs.map +1 -1
- package/dist/customer-groups.d.cts +94 -21
- package/dist/customer-groups.d.ts +94 -21
- package/dist/customer-groups.js +1 -1
- package/dist/index.cjs +72 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -5
- package/dist/index.d.ts +13 -5
- package/dist/index.js +25 -18
- package/dist/index.js.map +1 -1
- package/dist/locations.cjs +4 -1
- package/dist/locations.cjs.map +1 -1
- package/dist/locations.d.cts +7 -4
- package/dist/locations.d.ts +7 -4
- package/dist/locations.js +1 -1
- package/dist/orders.cjs.map +1 -1
- package/dist/orders.d.cts +1726 -80
- package/dist/orders.d.ts +1726 -80
- package/dist/orders.js +1 -1
- package/dist/price.cjs +15 -3
- package/dist/price.cjs.map +1 -1
- package/dist/price.d.cts +23 -4
- package/dist/price.d.ts +23 -4
- package/dist/price.js +1 -1
- package/dist/product.cjs +10 -0
- package/dist/product.cjs.map +1 -1
- package/dist/product.d.cts +10 -0
- package/dist/product.d.ts +10 -0
- package/dist/product.js +1 -1
- package/dist/types.gen-C_wOXYZB.d.cts +455 -0
- package/dist/types.gen-C_wOXYZB.d.ts +455 -0
- package/package.json +1 -1
- package/dist/chunk-5JHTZBOC.js.map +0 -1
- package/dist/chunk-6UNFMCHZ.js.map +0 -1
- package/dist/chunk-B56JZNI7.js.map +0 -1
- package/dist/chunk-IEZHGU7F.js.map +0 -1
- package/dist/chunk-NM7VDXBR.js.map +0 -1
- package/dist/chunk-RXVVFNYN.js.map +0 -1
- package/dist/chunk-SCI7D74B.js.map +0 -1
- package/dist/chunk-SKX7KCMH.js +0 -23
- package/dist/chunk-SKX7KCMH.js.map +0 -1
- package/dist/types.gen-D1QuqPLs.d.cts +0 -166
- package/dist/types.gen-D1QuqPLs.d.ts +0 -166
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/services/companies.ts"],"names":[],"mappings":";AAgBO,IAAM,mBAAN,MAAuB;AAAA,EAC5B,YAA6B,GAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,GAAA,GAAA,GAAA;AAAA,EAAqB;AAAA,EAArB,G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;AAAA;AAAA,EAGA,MAAM,MAAA,CAAO,aAAA,EAAuB,IAAA,EAAkC;AACpE,IAAA,MAAM,IAAA,CAAK,GAAA,CAAI,IAAA,CAAK,OAAA,CAAc;AAAA,MAChC,MAAA,EAAQ,QAAA;AAAA,MACR,MAAM,CAAA,EAAG,IAAA,CAAK,IAAA,EAAM,IAAI,aAAa,CAAA,CAAA;AAAA,MACrC;AAAA,KACD,CAAA;AAAA,EACH;AACF","file":"chunk-MM6JF3Z7.js","sourcesContent":["import type { ClientContext } from \"../core/context\";\nimport type { AuthContext } from \"../core/auth\";\nimport type {\n LegalEntity,\n LegalEntityCreate,\n LegalEntityUpdate,\n} from \"../generated/customer-management\";\n\n/**\n * Storefront-customer access to Legal Entities.\n *\n * `listMine`/`get` require `customermanagement.legalentity_read_own` on the\n * customer token. `create`/`update`/`delete` require the corresponding\n * `_manage` scopes — typically only granted to Admin-group customers; a 403\n * surfaces as `EmporixInsufficientScopeError`.\n */\nexport class CompaniesService {\n constructor(private readonly ctx: ClientContext) {}\n\n private base(): string {\n return `/customer-management/${this.ctx.tenant}/legal-entities`;\n }\n\n /** Lists the legal entities the calling customer is assigned to. */\n async listMine(auth: AuthContext): Promise<LegalEntity[]> {\n return this.ctx.http.request<LegalEntity[]>({\n method: \"GET\",\n path: this.base(),\n auth,\n });\n }\n\n /** Fetches a single legal entity by id. */\n async get(legalEntityId: string, auth: AuthContext): Promise<LegalEntity> {\n return this.ctx.http.request<LegalEntity>({\n method: \"GET\",\n path: `${this.base()}/${legalEntityId}`,\n auth,\n });\n }\n\n /** Creates a legal entity. Requires `customermanagement.legalentity_manage`. */\n async create(input: LegalEntityCreate, auth: AuthContext): Promise<{ id: string }> {\n return this.ctx.http.request<{ id: string }>({\n method: \"POST\",\n path: this.base(),\n auth,\n body: input,\n });\n }\n\n /**\n * Patches a legal entity. The endpoint is a PATCH, so the body is a partial\n * of the generated `LegalEntityUpdate` (full-replace) shape.\n */\n async update(\n legalEntityId: string,\n patch: Partial<LegalEntityUpdate>,\n auth: AuthContext,\n ): Promise<LegalEntity> {\n return this.ctx.http.request<LegalEntity>({\n method: \"PATCH\",\n path: `${this.base()}/${legalEntityId}`,\n auth,\n body: patch,\n });\n }\n\n /** Deletes a legal entity (async cascade on the server). */\n async delete(legalEntityId: string, auth: AuthContext): Promise<void> {\n await this.ctx.http.request<void>({\n method: \"DELETE\",\n path: `${this.base()}/${legalEntityId}`,\n auth,\n });\n }\n}\n"]}
|
package/dist/companies.cjs
CHANGED
|
@@ -34,7 +34,10 @@ var CompaniesService = class {
|
|
|
34
34
|
body: input
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Patches a legal entity. The endpoint is a PATCH, so the body is a partial
|
|
39
|
+
* of the generated `LegalEntityUpdate` (full-replace) shape.
|
|
40
|
+
*/
|
|
38
41
|
async update(legalEntityId, patch, auth) {
|
|
39
42
|
return this.ctx.http.request({
|
|
40
43
|
method: "PATCH",
|
package/dist/companies.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/services/companies.ts"],"names":[],"mappings":";;;AAgBO,IAAM,mBAAN,MAAuB;AAAA,EAC5B,YAA6B,GAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,GAAA,GAAA,GAAA;AAAA,EAAqB;AAAA,EAArB,GAAA;AAAA,EAErB,IAAA,GAAe;AACrB,IAAA,OAAO,CAAA,qBAAA,EAAwB,IAAA,CAAK,GAAA,CAAI,MAAM,CAAA,eAAA,CAAA;AAAA,EAChD;AAAA;AAAA,EAGA,MAAM,SAAS,IAAA,EAA2C;AACxD,IAAA,OAAO,IAAA,CAAK,GAAA,CAAI,IAAA,CAAK,OAAA,CAAuB;AAAA,MAC1C,MAAA,EAAQ,KAAA;AAAA,MACR,IAAA,EAAM,KAAK,IAAA,EAAK;AAAA,MAChB;AAAA,KACD,CAAA;AAAA,EACH;AAAA;AAAA,EAGA,MAAM,GAAA,CA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A,MACR,MAAM,CAAA,EAAG,IAAA,CAAK,IAAA,EAAM,IAAI,aAAa,CAAA,CAAA;AAAA,MACrC;AAAA,KACD,CAAA;AAAA,EACH;AAAA;AAAA,EAGA,MAAM,MAAA,CAAO,KAAA,EAA0B,IAAA,EAA4C;AACjF,IAAA,OAAO,IAAA,CAAK,GAAA,CAAI,IAAA,CAAK,OAAA,CAAwB;AAAA,MAC3C,MAAA,EAAQ,MAAA;AAAA,MACR,IAAA,EAAM,KAAK,IAAA,EAAK;AAAA,MAChB,IAAA;AAAA,MACA,IAAA,EAAM;AAAA,KACP,CAAA;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,MAAA,CACJ,aAAA,EACA,KAAA,EACA,IAAA,EACsB;AACtB,IAAA,OAAO,IAAA,CAAK,GAAA,CAAI,IAAA,CAAK,OAAA,CAAqB;AAAA,MACxC,MAAA,EAAQ,OAAA;AAAA,MACR,MAAM,CAAA,EAAG,IAAA,CAAK,IAAA,EAAM,IAAI,aAAa,CAAA,CAAA;AAAA,MACrC,IAAA;AAAA,MACA,IAAA,EAAM;AAAA,KACP,CAAA;AAAA,EACH;AAAA;AAAA,EAGA,MAAM,MAAA,CAAO,aAAA,EAAuB,IAAA,EAAkC;AACpE,IAAA,MAAM,IAAA,CAAK,GAAA,CAAI,IAAA,CAAK,OAAA,CAAc;AAAA,MAChC,MAAA,EAAQ,QAAA;AAAA,MACR,MAAM,CAAA,EAAG,IAAA,CAAK,IAAA,EAAM,IAAI,aAAa,CAAA,CAAA;AAAA,MACrC;AAAA,KACD,CAAA;AAAA,EACH;AACF","file":"companies.cjs","sourcesContent":["import type { ClientContext } from \"../core/context\";\nimport type { AuthContext } from \"../core/auth\";\nimport type {\n LegalEntity,\n LegalEntityCreate,\n LegalEntityUpdate,\n} from \"../generated/customer-management\";\n\n/**\n * Storefront-customer access to Legal Entities.\n *\n * `listMine`/`get` require `customermanagement.legalentity_read_own` on the\n * customer token. `create`/`update`/`delete` require the corresponding\n * `_manage` scopes — typically only granted to Admin-group customers; a 403\n * surfaces as `EmporixInsufficientScopeError`.\n */\nexport class CompaniesService {\n constructor(private readonly ctx: ClientContext) {}\n\n private base(): string {\n return `/customer-management/${this.ctx.tenant}/legal-entities`;\n }\n\n /** Lists the legal entities the calling customer is assigned to. */\n async listMine(auth: AuthContext): Promise<LegalEntity[]> {\n return this.ctx.http.request<LegalEntity[]>({\n method: \"GET\",\n path: this.base(),\n auth,\n });\n }\n\n /** Fetches a single legal entity by id. */\n async get(legalEntityId: string, auth: AuthContext): Promise<LegalEntity> {\n return this.ctx.http.request<LegalEntity>({\n method: \"GET\",\n path: `${this.base()}/${legalEntityId}`,\n auth,\n });\n }\n\n /** Creates a legal entity. Requires `customermanagement.legalentity_manage`. */\n async create(input: LegalEntityCreate, auth: AuthContext): Promise<{ id: string }> {\n return this.ctx.http.request<{ id: string }>({\n method: \"POST\",\n path: this.base(),\n auth,\n body: input,\n });\n }\n\n /**\n * Patches a legal entity. The endpoint is a PATCH, so the body is a partial\n * of the generated `LegalEntityUpdate` (full-replace) shape.\n */\n async update(\n legalEntityId: string,\n patch: Partial<LegalEntityUpdate>,\n auth: AuthContext,\n ): Promise<LegalEntity> {\n return this.ctx.http.request<LegalEntity>({\n method: \"PATCH\",\n path: `${this.base()}/${legalEntityId}`,\n auth,\n body: patch,\n });\n }\n\n /** Deletes a legal entity (async cascade on the server). */\n async delete(legalEntityId: string, auth: AuthContext): Promise<void> {\n await this.ctx.http.request<void>({\n method: \"DELETE\",\n path: `${this.base()}/${legalEntityId}`,\n auth,\n });\n }\n}\n"]}
|
package/dist/companies.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { C as ClientContext, b as AuthContext } from './context-DJDTlhLW.cjs';
|
|
2
|
-
import { L as LegalEntity,
|
|
3
|
-
export { A as AccountLimit,
|
|
2
|
+
import { L as LegalEntity, e as LegalEntityCreate, f as LegalEntityUpdate } from './types.gen-C_wOXYZB.cjs';
|
|
3
|
+
export { A as AccountLimit, d as CustomerGroup, g as LegalInfo } from './types.gen-C_wOXYZB.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Storefront-customer access to Legal Entities.
|
|
@@ -22,8 +22,11 @@ declare class CompaniesService {
|
|
|
22
22
|
create(input: LegalEntityCreate, auth: AuthContext): Promise<{
|
|
23
23
|
id: string;
|
|
24
24
|
}>;
|
|
25
|
-
/**
|
|
26
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Patches a legal entity. The endpoint is a PATCH, so the body is a partial
|
|
27
|
+
* of the generated `LegalEntityUpdate` (full-replace) shape.
|
|
28
|
+
*/
|
|
29
|
+
update(legalEntityId: string, patch: Partial<LegalEntityUpdate>, auth: AuthContext): Promise<LegalEntity>;
|
|
27
30
|
/** Deletes a legal entity (async cascade on the server). */
|
|
28
31
|
delete(legalEntityId: string, auth: AuthContext): Promise<void>;
|
|
29
32
|
}
|
package/dist/companies.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { C as ClientContext, b as AuthContext } from './context-DJDTlhLW.js';
|
|
2
|
-
import { L as LegalEntity,
|
|
3
|
-
export { A as AccountLimit,
|
|
2
|
+
import { L as LegalEntity, e as LegalEntityCreate, f as LegalEntityUpdate } from './types.gen-C_wOXYZB.js';
|
|
3
|
+
export { A as AccountLimit, d as CustomerGroup, g as LegalInfo } from './types.gen-C_wOXYZB.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Storefront-customer access to Legal Entities.
|
|
@@ -22,8 +22,11 @@ declare class CompaniesService {
|
|
|
22
22
|
create(input: LegalEntityCreate, auth: AuthContext): Promise<{
|
|
23
23
|
id: string;
|
|
24
24
|
}>;
|
|
25
|
-
/**
|
|
26
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Patches a legal entity. The endpoint is a PATCH, so the body is a partial
|
|
27
|
+
* of the generated `LegalEntityUpdate` (full-replace) shape.
|
|
28
|
+
*/
|
|
29
|
+
update(legalEntityId: string, patch: Partial<LegalEntityUpdate>, auth: AuthContext): Promise<LegalEntity>;
|
|
27
30
|
/** Deletes a legal entity (async cascade on the server). */
|
|
28
31
|
delete(legalEntityId: string, auth: AuthContext): Promise<void>;
|
|
29
32
|
}
|
package/dist/companies.js
CHANGED
package/dist/contacts.cjs
CHANGED
|
@@ -27,7 +27,10 @@ var ContactsService = class {
|
|
|
27
27
|
body: input
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* Patches a contact assignment. PATCH endpoint, so the body is a partial of
|
|
32
|
+
* the generated `ContactAssignmentUpdate` shape.
|
|
33
|
+
*/
|
|
31
34
|
async update(contactAssignmentId, patch, auth) {
|
|
32
35
|
return this.ctx.http.request({
|
|
33
36
|
method: "PATCH",
|
package/dist/contacts.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/services/contacts.ts"],"names":[],"mappings":";;;AAeO,IAAM,kBAAN,MAAsB;AAAA,EAC3B,YAA6B,GAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,GAAA,GAAA,GAAA;AAAA,EAAqB;AAAA,EAArB,GAAA;AAAA,EAErB,IAAA,GAAe;AACrB,IAAA,OAAO,CAAA,qBAAA,EAAwB,IAAA,CAAK,GAAA,CAAI,MAAM,CAAA,oBAAA,CAAA;AAAA,EAChD;AAAA;AAAA,EAGA,MAAM,cAAA,CAAe,aAAA,EAAuB,IAAA,EAAiD;AAC3F,IAAA,OAAO,IAAA,CAAK,GAAA,CAAI,IAAA,CAAK,OAAA,CAA6B;AAAA,MAChD,MAAA,EAAQ,KAAA;AAAA,MACR,IAAA,EAAM,KAAK,IAAA,EAAK;AAAA,MAChB,KAAA,EAAO,EAAE,aAAA,EAAc;AAAA,MACvB;AAAA,KACD,CAAA;AAAA,EACH;AAAA;AAAA,EAGA,MAAM,MAAA,CAAO,KAAA,EAAgC,IAAA,EAA4C;AACvF,IAAA,OAAO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2B;AAAA,MAC9C,MAAA,EAAQ,OAAA;AAAA,MACR,MAAM,CAAA,EAAG,IAAA,CAAK,IAAA,EAAM,IAAI,mBAAmB,CAAA,CAAA;AAAA,MAC3C,IAAA;AAAA,MACA,IAAA,EAAM;AAAA,KACP,CAAA;AAAA,EACH;AAAA;AAAA,EAGA,MAAM,QAAA,CAAS,mBAAA,EAA6B,IAAA,EAAkC;AAC5E,IAAA,MAAM,IAAA,CAAK,GAAA,CAAI,IAAA,CAAK,OAAA,CAAc;AAAA,MAChC,MAAA,EAAQ,QAAA;AAAA,MACR,MAAM,CAAA,EAAG,IAAA,CAAK,IAAA,EAAM,IAAI,mBAAmB,CAAA,CAAA;AAAA,MAC3C;AAAA,KACD,CAAA;AAAA,EACH;AACF","file":"contacts.cjs","sourcesContent":["import type { ClientContext } from \"../core/context\";\nimport type { AuthContext } from \"../core/auth\";\nimport type {\n ContactAssignment,\n ContactAssignmentCreate,\n ContactAssignmentUpdate,\n} from \"../generated/customer-management\";\n\n/**\n * Manages contact assignments linking customers to legal entities.\n *\n * `listForCompany` requires `customermanagement.contactassignment_read`;\n * `assign`/`update`/`unassign` require `_manage`. The query param\n * `legalEntityId` scopes the list to one company.\n */\nexport class ContactsService {\n constructor(private readonly ctx: ClientContext) {}\n\n private base(): string {\n return `/customer-management/${this.ctx.tenant}/contact-assignments`;\n }\n\n /** Lists contact assignments for one legal entity. */\n async listForCompany(legalEntityId: string, auth: AuthContext): Promise<ContactAssignment[]> {\n return this.ctx.http.request<ContactAssignment[]>({\n method: \"GET\",\n path: this.base(),\n query: { legalEntityId },\n auth,\n });\n }\n\n /** Creates a contact assignment. */\n async assign(input: ContactAssignmentCreate, auth: AuthContext): Promise<{ id: string }> {\n return this.ctx.http.request<{ id: string }>({\n method: \"POST\",\n path: this.base(),\n auth,\n body: input,\n });\n }\n\n /**\n * Patches a contact assignment. PATCH endpoint, so the body is a partial of\n * the generated `ContactAssignmentUpdate` shape.\n */\n async update(\n contactAssignmentId: string,\n patch: Partial<ContactAssignmentUpdate>,\n auth: AuthContext,\n ): Promise<ContactAssignment> {\n return this.ctx.http.request<ContactAssignment>({\n method: \"PATCH\",\n path: `${this.base()}/${contactAssignmentId}`,\n auth,\n body: patch,\n });\n }\n\n /** Deletes a contact assignment. */\n async unassign(contactAssignmentId: string, auth: AuthContext): Promise<void> {\n await this.ctx.http.request<void>({\n method: \"DELETE\",\n path: `${this.base()}/${contactAssignmentId}`,\n auth,\n });\n }\n}\n"]}
|
package/dist/contacts.d.cts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { C as ClientContext, b as AuthContext } from './context-DJDTlhLW.cjs';
|
|
2
|
-
import { C as ContactAssignment, a as ContactAssignmentCreate,
|
|
3
|
-
export { b as ContactAssignmentType } from './types.gen-D1QuqPLs.cjs';
|
|
2
|
+
import { C as ContactAssignment, a as ContactAssignmentCreate, b as ContactAssignmentUpdate } from './types.gen-C_wOXYZB.cjs';
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
5
|
* Manages contact assignments linking customers to legal entities.
|
|
@@ -19,8 +18,11 @@ declare class ContactsService {
|
|
|
19
18
|
assign(input: ContactAssignmentCreate, auth: AuthContext): Promise<{
|
|
20
19
|
id: string;
|
|
21
20
|
}>;
|
|
22
|
-
/**
|
|
23
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Patches a contact assignment. PATCH endpoint, so the body is a partial of
|
|
23
|
+
* the generated `ContactAssignmentUpdate` shape.
|
|
24
|
+
*/
|
|
25
|
+
update(contactAssignmentId: string, patch: Partial<ContactAssignmentUpdate>, auth: AuthContext): Promise<ContactAssignment>;
|
|
24
26
|
/** Deletes a contact assignment. */
|
|
25
27
|
unassign(contactAssignmentId: string, auth: AuthContext): Promise<void>;
|
|
26
28
|
}
|
package/dist/contacts.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { C as ClientContext, b as AuthContext } from './context-DJDTlhLW.js';
|
|
2
|
-
import { C as ContactAssignment, a as ContactAssignmentCreate,
|
|
3
|
-
export { b as ContactAssignmentType } from './types.gen-D1QuqPLs.js';
|
|
2
|
+
import { C as ContactAssignment, a as ContactAssignmentCreate, b as ContactAssignmentUpdate } from './types.gen-C_wOXYZB.js';
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
5
|
* Manages contact assignments linking customers to legal entities.
|
|
@@ -19,8 +18,11 @@ declare class ContactsService {
|
|
|
19
18
|
assign(input: ContactAssignmentCreate, auth: AuthContext): Promise<{
|
|
20
19
|
id: string;
|
|
21
20
|
}>;
|
|
22
|
-
/**
|
|
23
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Patches a contact assignment. PATCH endpoint, so the body is a partial of
|
|
23
|
+
* the generated `ContactAssignmentUpdate` shape.
|
|
24
|
+
*/
|
|
25
|
+
update(contactAssignmentId: string, patch: Partial<ContactAssignmentUpdate>, auth: AuthContext): Promise<ContactAssignment>;
|
|
24
26
|
/** Deletes a contact assignment. */
|
|
25
27
|
unassign(contactAssignmentId: string, auth: AuthContext): Promise<void>;
|
|
26
28
|
}
|
package/dist/contacts.js
CHANGED
package/dist/customer-groups.cjs
CHANGED
|
@@ -18,6 +18,23 @@ var CustomerGroupsService = class {
|
|
|
18
18
|
auth
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
+
/** Adds a user (customer or employee) to a group. */
|
|
22
|
+
async addMember(groupId, member, auth) {
|
|
23
|
+
return this.ctx.http.request({
|
|
24
|
+
method: "POST",
|
|
25
|
+
path: `${this.base()}/${groupId}/users`,
|
|
26
|
+
auth,
|
|
27
|
+
body: member
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/** Removes a user from a group. */
|
|
31
|
+
async removeMember(groupId, userId, auth) {
|
|
32
|
+
await this.ctx.http.request({
|
|
33
|
+
method: "DELETE",
|
|
34
|
+
path: `${this.base()}/${groupId}/users/${userId}`,
|
|
35
|
+
auth
|
|
36
|
+
});
|
|
37
|
+
}
|
|
21
38
|
};
|
|
22
39
|
|
|
23
40
|
exports.CustomerGroupsService = CustomerGroupsService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/services/customer-groups.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"sources":["../src/services/customer-groups.ts"],"names":[],"mappings":";;;AAeO,IAAM,wBAAN,MAA4B;AAAA,EACjC,YAA6B,GAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,GAAA,GAAA,GAAA;AAAA,EAAqB;AAAA,EAArB,GAAA;AAAA,EAErB,IAAA,GAAe;AACrB,IAAA,OAAO,CAAA,KAAA,EAAQ,IAAA,CAAK,GAAA,CAAI,MAAM,CAAA,OAAA,CAAA;AAAA,EAChC;AAAA;AAAA,EAGA,MAAM,cAAA,CAAe,aAAA,EAAuB,IAAA,EAAmD;AAC7F,IAAA,OAAO,IAAA,CAAK,GAAA,CAAI,IAAA,CAAK,OAAA,CAA+B;AAAA,MAClD,MAAA,EAAQ,KAAA;AAAA,MACR,IAAA,EAAM,KAAK,IAAA,EAAK;AAAA,MAChB,KAAA,EAAO,EAAE,mBAAA,EAAqB,aAAA,EAAc;AAAA,MAC5C;AAAA,KACD,CAAA;AAAA,EACH;AAAA;AAAA,EAGA,MAAM,SAAA,CACJ,OAAA,EACA,MAAA,EACA,IAAA,EACyB;AACzB,IAAA,OAAO,IAAA,CAAK,GAAA,CAAI,IAAA,CAAK,OAAA,CAAwB;AAAA,MAC3C,MAAA,EAAQ,MAAA;AAAA,MACR,MAAM,CAAA,EAAG,IAAA,CAAK,IAAA,EAAM,IAAI,OAAO,CAAA,MAAA,CAAA;AAAA,MAC/B,IAAA;AAAA,MACA,IAAA,EAAM;AAAA,KACP,CAAA;AAAA,EACH;AAAA;AAAA,EAGA,MAAM,YAAA,CAAa,OAAA,EAAiB,MAAA,EAAgB,IAAA,EAAkC;AACpF,IAAA,MAAM,IAAA,CAAK,GAAA,CAAI,IAAA,CAAK,OAAA,CAAc;AAAA,MAChC,MAAA,EAAQ,QAAA;AAAA,MACR,IAAA,EAAM,GAAG,IAAA,CAAK,IAAA,EAAM,CAAA,CAAA,EAAI,OAAO,UAAU,MAAM,CAAA,CAAA;AAAA,MAC/C;AAAA,KACD,CAAA;AAAA,EACH;AACF","file":"customer-groups.cjs","sourcesContent":["import type { ClientContext } from \"../core/context\";\nimport type { AuthContext } from \"../core/auth\";\nimport type {\n GroupsQueryDocument,\n AssignmentCreateRequest,\n} from \"../generated/iam\";\n\n/**\n * Access to IAM customer groups for a legal entity.\n *\n * `listForCompany` requires `iam.group_read`; the member mutations\n * (`addMember`/`removeMember`) require `iam.group_manage` — typically only\n * granted to Admin-group customers; a 403 surfaces as\n * `EmporixInsufficientScopeError`.\n */\nexport class CustomerGroupsService {\n constructor(private readonly ctx: ClientContext) {}\n\n private base(): string {\n return `/iam/${this.ctx.tenant}/groups`;\n }\n\n /** Lists customer groups belonging to one legal entity. */\n async listForCompany(legalEntityId: string, auth: AuthContext): Promise<GroupsQueryDocument[]> {\n return this.ctx.http.request<GroupsQueryDocument[]>({\n method: \"GET\",\n path: this.base(),\n query: { \"b2b.legalEntityId\": legalEntityId },\n auth,\n });\n }\n\n /** Adds a user (customer or employee) to a group. */\n async addMember(\n groupId: string,\n member: AssignmentCreateRequest,\n auth: AuthContext,\n ): Promise<{ id: string }> {\n return this.ctx.http.request<{ id: string }>({\n method: \"POST\",\n path: `${this.base()}/${groupId}/users`,\n auth,\n body: member,\n });\n }\n\n /** Removes a user from a group. */\n async removeMember(groupId: string, userId: string, auth: AuthContext): Promise<void> {\n await this.ctx.http.request<void>({\n method: \"DELETE\",\n path: `${this.base()}/${groupId}/users/${userId}`,\n auth,\n });\n }\n}\n"]}
|
|
@@ -1,36 +1,109 @@
|
|
|
1
1
|
import { C as ClientContext, b as AuthContext } from './context-DJDTlhLW.cjs';
|
|
2
2
|
|
|
3
|
+
type AssignmentCreateRequest = {
|
|
4
|
+
/**
|
|
5
|
+
* User unique identifier generated when the user is created. Might be customer ID or Management Dashboard user ID.
|
|
6
|
+
*/
|
|
7
|
+
userId: string;
|
|
8
|
+
/**
|
|
9
|
+
* Assignment type, possible values: CUSTOMER, EMPLOYEE
|
|
10
|
+
*/
|
|
11
|
+
userType?: 'CUSTOMER' | 'EMPLOYEE';
|
|
12
|
+
};
|
|
3
13
|
/**
|
|
4
|
-
*
|
|
5
|
-
* B2B foundation reads. The Emporix IAM API exposes groups keyed by
|
|
6
|
-
* `b2b.legalEntityId`. Membership-mutation endpoints exist on the server
|
|
7
|
-
* but their exact path/body shape is not in the current SDK input set —
|
|
8
|
-
* `customer-groups.ts` ships read-only here; mutations follow in a small
|
|
9
|
-
* follow-up plan once the API reference is confirmed.
|
|
14
|
+
* Group metadata.
|
|
10
15
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
type GroupsMetadataQueryDocument = {
|
|
17
|
+
/**
|
|
18
|
+
* Group document version.
|
|
19
|
+
*/
|
|
20
|
+
version: number;
|
|
21
|
+
/**
|
|
22
|
+
* Timestamp indicating when the group was created.
|
|
23
|
+
*/
|
|
24
|
+
createdAt: string;
|
|
25
|
+
/**
|
|
26
|
+
* Timestamp indicating when the group was last modified.
|
|
27
|
+
*/
|
|
28
|
+
modifiedAt?: string;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Definition of groups
|
|
32
|
+
*/
|
|
33
|
+
type GroupsQueryDocument = {
|
|
34
|
+
/**
|
|
35
|
+
* Group unique identifier generated when the group is created.
|
|
36
|
+
*/
|
|
37
|
+
id?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Localized group name in the form of a map of translations.
|
|
40
|
+
*/
|
|
41
|
+
name?: {
|
|
42
|
+
[key: string]: string;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Localized group description in the form of a map of translations.
|
|
46
|
+
*/
|
|
47
|
+
description?: {
|
|
48
|
+
[key: string]: string;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* An identifier of a vendor to whom the group belongs. Can only be set during creation and is immutable thereafter. A group with vendorId can only be assigned to users of type `EMPLOYEE`
|
|
52
|
+
*/
|
|
53
|
+
readonly vendorId?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Access control unique identifiers associated with this group.
|
|
56
|
+
*/
|
|
57
|
+
accessControls?: Array<string>;
|
|
58
|
+
/**
|
|
59
|
+
* Template unique identifiers associated with this group.
|
|
60
|
+
*/
|
|
61
|
+
templates?: Array<string>;
|
|
62
|
+
code?: string;
|
|
63
|
+
/**
|
|
64
|
+
* The group type determines if the group can consist of users of the `CUSTOMER` or the `EMPLOYEE` type.
|
|
65
|
+
*/
|
|
66
|
+
userType?: string;
|
|
67
|
+
/**
|
|
68
|
+
* additional properties for B2B
|
|
69
|
+
*/
|
|
70
|
+
b2b?: {
|
|
71
|
+
/**
|
|
72
|
+
* identifier of the assigned legal entity
|
|
73
|
+
*/
|
|
74
|
+
legalEntityId?: string;
|
|
75
|
+
};
|
|
76
|
+
restrictions?: Restrictions;
|
|
77
|
+
/**
|
|
78
|
+
* Custom group attributes that need to be included directly in the `mixins` object.
|
|
79
|
+
*/
|
|
80
|
+
mixins?: {
|
|
81
|
+
[key: string]: string;
|
|
82
|
+
};
|
|
83
|
+
metadata?: GroupsMetadataQueryDocument;
|
|
84
|
+
};
|
|
85
|
+
type Restrictions = Array<string>;
|
|
20
86
|
|
|
21
87
|
/**
|
|
22
|
-
*
|
|
88
|
+
* Access to IAM customer groups for a legal entity.
|
|
23
89
|
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
90
|
+
* `listForCompany` requires `iam.group_read`; the member mutations
|
|
91
|
+
* (`addMember`/`removeMember`) require `iam.group_manage` — typically only
|
|
92
|
+
* granted to Admin-group customers; a 403 surfaces as
|
|
93
|
+
* `EmporixInsufficientScopeError`.
|
|
27
94
|
*/
|
|
28
95
|
declare class CustomerGroupsService {
|
|
29
96
|
private readonly ctx;
|
|
30
97
|
constructor(ctx: ClientContext);
|
|
31
98
|
private base;
|
|
32
99
|
/** Lists customer groups belonging to one legal entity. */
|
|
33
|
-
listForCompany(legalEntityId: string, auth: AuthContext): Promise<
|
|
100
|
+
listForCompany(legalEntityId: string, auth: AuthContext): Promise<GroupsQueryDocument[]>;
|
|
101
|
+
/** Adds a user (customer or employee) to a group. */
|
|
102
|
+
addMember(groupId: string, member: AssignmentCreateRequest, auth: AuthContext): Promise<{
|
|
103
|
+
id: string;
|
|
104
|
+
}>;
|
|
105
|
+
/** Removes a user from a group. */
|
|
106
|
+
removeMember(groupId: string, userId: string, auth: AuthContext): Promise<void>;
|
|
34
107
|
}
|
|
35
108
|
|
|
36
|
-
export { CustomerGroupsService, type IamGroup, type
|
|
109
|
+
export { CustomerGroupsService, type GroupsQueryDocument as IamGroup, type AssignmentCreateRequest as IamGroupMemberAssignment };
|
|
@@ -1,36 +1,109 @@
|
|
|
1
1
|
import { C as ClientContext, b as AuthContext } from './context-DJDTlhLW.js';
|
|
2
2
|
|
|
3
|
+
type AssignmentCreateRequest = {
|
|
4
|
+
/**
|
|
5
|
+
* User unique identifier generated when the user is created. Might be customer ID or Management Dashboard user ID.
|
|
6
|
+
*/
|
|
7
|
+
userId: string;
|
|
8
|
+
/**
|
|
9
|
+
* Assignment type, possible values: CUSTOMER, EMPLOYEE
|
|
10
|
+
*/
|
|
11
|
+
userType?: 'CUSTOMER' | 'EMPLOYEE';
|
|
12
|
+
};
|
|
3
13
|
/**
|
|
4
|
-
*
|
|
5
|
-
* B2B foundation reads. The Emporix IAM API exposes groups keyed by
|
|
6
|
-
* `b2b.legalEntityId`. Membership-mutation endpoints exist on the server
|
|
7
|
-
* but their exact path/body shape is not in the current SDK input set —
|
|
8
|
-
* `customer-groups.ts` ships read-only here; mutations follow in a small
|
|
9
|
-
* follow-up plan once the API reference is confirmed.
|
|
14
|
+
* Group metadata.
|
|
10
15
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
type GroupsMetadataQueryDocument = {
|
|
17
|
+
/**
|
|
18
|
+
* Group document version.
|
|
19
|
+
*/
|
|
20
|
+
version: number;
|
|
21
|
+
/**
|
|
22
|
+
* Timestamp indicating when the group was created.
|
|
23
|
+
*/
|
|
24
|
+
createdAt: string;
|
|
25
|
+
/**
|
|
26
|
+
* Timestamp indicating when the group was last modified.
|
|
27
|
+
*/
|
|
28
|
+
modifiedAt?: string;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Definition of groups
|
|
32
|
+
*/
|
|
33
|
+
type GroupsQueryDocument = {
|
|
34
|
+
/**
|
|
35
|
+
* Group unique identifier generated when the group is created.
|
|
36
|
+
*/
|
|
37
|
+
id?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Localized group name in the form of a map of translations.
|
|
40
|
+
*/
|
|
41
|
+
name?: {
|
|
42
|
+
[key: string]: string;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Localized group description in the form of a map of translations.
|
|
46
|
+
*/
|
|
47
|
+
description?: {
|
|
48
|
+
[key: string]: string;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* An identifier of a vendor to whom the group belongs. Can only be set during creation and is immutable thereafter. A group with vendorId can only be assigned to users of type `EMPLOYEE`
|
|
52
|
+
*/
|
|
53
|
+
readonly vendorId?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Access control unique identifiers associated with this group.
|
|
56
|
+
*/
|
|
57
|
+
accessControls?: Array<string>;
|
|
58
|
+
/**
|
|
59
|
+
* Template unique identifiers associated with this group.
|
|
60
|
+
*/
|
|
61
|
+
templates?: Array<string>;
|
|
62
|
+
code?: string;
|
|
63
|
+
/**
|
|
64
|
+
* The group type determines if the group can consist of users of the `CUSTOMER` or the `EMPLOYEE` type.
|
|
65
|
+
*/
|
|
66
|
+
userType?: string;
|
|
67
|
+
/**
|
|
68
|
+
* additional properties for B2B
|
|
69
|
+
*/
|
|
70
|
+
b2b?: {
|
|
71
|
+
/**
|
|
72
|
+
* identifier of the assigned legal entity
|
|
73
|
+
*/
|
|
74
|
+
legalEntityId?: string;
|
|
75
|
+
};
|
|
76
|
+
restrictions?: Restrictions;
|
|
77
|
+
/**
|
|
78
|
+
* Custom group attributes that need to be included directly in the `mixins` object.
|
|
79
|
+
*/
|
|
80
|
+
mixins?: {
|
|
81
|
+
[key: string]: string;
|
|
82
|
+
};
|
|
83
|
+
metadata?: GroupsMetadataQueryDocument;
|
|
84
|
+
};
|
|
85
|
+
type Restrictions = Array<string>;
|
|
20
86
|
|
|
21
87
|
/**
|
|
22
|
-
*
|
|
88
|
+
* Access to IAM customer groups for a legal entity.
|
|
23
89
|
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
90
|
+
* `listForCompany` requires `iam.group_read`; the member mutations
|
|
91
|
+
* (`addMember`/`removeMember`) require `iam.group_manage` — typically only
|
|
92
|
+
* granted to Admin-group customers; a 403 surfaces as
|
|
93
|
+
* `EmporixInsufficientScopeError`.
|
|
27
94
|
*/
|
|
28
95
|
declare class CustomerGroupsService {
|
|
29
96
|
private readonly ctx;
|
|
30
97
|
constructor(ctx: ClientContext);
|
|
31
98
|
private base;
|
|
32
99
|
/** Lists customer groups belonging to one legal entity. */
|
|
33
|
-
listForCompany(legalEntityId: string, auth: AuthContext): Promise<
|
|
100
|
+
listForCompany(legalEntityId: string, auth: AuthContext): Promise<GroupsQueryDocument[]>;
|
|
101
|
+
/** Adds a user (customer or employee) to a group. */
|
|
102
|
+
addMember(groupId: string, member: AssignmentCreateRequest, auth: AuthContext): Promise<{
|
|
103
|
+
id: string;
|
|
104
|
+
}>;
|
|
105
|
+
/** Removes a user from a group. */
|
|
106
|
+
removeMember(groupId: string, userId: string, auth: AuthContext): Promise<void>;
|
|
34
107
|
}
|
|
35
108
|
|
|
36
|
-
export { CustomerGroupsService, type IamGroup, type
|
|
109
|
+
export { CustomerGroupsService, type GroupsQueryDocument as IamGroup, type AssignmentCreateRequest as IamGroupMemberAssignment };
|
package/dist/customer-groups.js
CHANGED