@oblax/identity 2.1.0 → 2.2.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.
@@ -14,7 +14,7 @@ import { OrganizationsSubmodule } from './organizations.js';
14
14
  * @example
15
15
  * ```typescript
16
16
  * const oblax = new Oblax({
17
- * endpoint: 'https://api.my-app.oblax.io',
17
+ * endpoint: '<api-endpoint>', // the client's endpoint: `obx project clients list`
18
18
  * clientId: 'my-web-app',
19
19
  * modules: [PlatformBrowser(), Identity()],
20
20
  * })
@@ -13,7 +13,7 @@ import { OrganizationsSubmodule } from './organizations.js';
13
13
  * @example
14
14
  * ```typescript
15
15
  * const oblax = new Oblax({
16
- * endpoint: 'https://api.my-app.oblax.io',
16
+ * endpoint: '<api-endpoint>', // the client's endpoint: `obx project clients list`
17
17
  * clientId: 'my-web-app',
18
18
  * modules: [PlatformBrowser(), Identity()],
19
19
  * })
package/dist/index.d.ts CHANGED
@@ -26,7 +26,7 @@ export type { IdentityConfig, Person, CreatePersonParams, UpdatePersonParams, Li
26
26
  * import { Identity } from '@oblax/identity'
27
27
  *
28
28
  * const oblax = new Oblax({
29
- * endpoint: 'https://api.my-app.oblax.io',
29
+ * endpoint: '<api-endpoint>', // the client's endpoint: `obx project clients list`
30
30
  * clientId: 'my-web-app',
31
31
  * modules: [PlatformBrowser(), Identity()],
32
32
  * })
package/dist/index.js CHANGED
@@ -23,7 +23,7 @@ export { PersonRolesSubmodule } from './person-roles.js';
23
23
  * import { Identity } from '@oblax/identity'
24
24
  *
25
25
  * const oblax = new Oblax({
26
- * endpoint: 'https://api.my-app.oblax.io',
26
+ * endpoint: '<api-endpoint>', // the client's endpoint: `obx project clients list`
27
27
  * clientId: 'my-web-app',
28
28
  * modules: [PlatformBrowser(), Identity()],
29
29
  * })
@@ -11,6 +11,8 @@ import type { LinkOrganizationPersonParams, OrganizationPerson, OrganizationPers
11
11
  * })
12
12
  *
13
13
  * const people = await oblax.identity.organizations.people.list({ organizationId: 'org-id' })
14
+ *
15
+ * await oblax.identity.organizations.people.unlink({ organizationId: 'org-id', personId: 'person-id' })
14
16
  * ```
15
17
  */
16
18
  export declare class OrganizationPeopleSubmodule {
@@ -22,5 +24,10 @@ export declare class OrganizationPeopleSubmodule {
22
24
  list(params: OrganizationPersonOwnerParams): Promise<OrganizationPerson[]>;
23
25
  /** Fetches a single organization-person link. */
24
26
  get(params: OrganizationPersonIdParams): Promise<OrganizationPerson>;
27
+ /**
28
+ * Unlinks the person from the organization; the person and the organization stay. A link
29
+ * that isn't there is 404. Returns `void` (HTTP 204).
30
+ */
31
+ unlink(params: OrganizationPersonIdParams): Promise<void>;
25
32
  }
26
33
  //# sourceMappingURL=organization-people.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"organization-people.d.ts","sourceRoot":"","sources":["../src/organization-people.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,KAAK,EACV,4BAA4B,EAC5B,kBAAkB,EAClB,0BAA0B,EAC1B,6BAA6B,EAC9B,MAAM,YAAY,CAAA;AAEnB;;;;;;;;;;;;GAYG;AACH,qBAAa,2BAA2B;IAC1B,OAAO,CAAC,QAAQ,CAAC,GAAG;gBAAH,GAAG,EAAE,YAAY;IAE9C,yCAAyC;IACnC,IAAI,CAAC,MAAM,EAAE,4BAA4B,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAO7E,qDAAqD;IAC/C,IAAI,CAAC,MAAM,EAAE,6BAA6B,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;IAMhF,iDAAiD;IAC3C,GAAG,CAAC,MAAM,EAAE,0BAA0B,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAK3E"}
1
+ {"version":3,"file":"organization-people.d.ts","sourceRoot":"","sources":["../src/organization-people.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C,OAAO,KAAK,EACV,4BAA4B,EAC5B,kBAAkB,EAClB,0BAA0B,EAC1B,6BAA6B,EAC9B,MAAM,YAAY,CAAA;AAEnB;;;;;;;;;;;;;;GAcG;AACH,qBAAa,2BAA2B;IAC1B,OAAO,CAAC,QAAQ,CAAC,GAAG;gBAAH,GAAG,EAAE,YAAY;IAE9C,yCAAyC;IACnC,IAAI,CAAC,MAAM,EAAE,4BAA4B,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAO7E,qDAAqD;IAC/C,IAAI,CAAC,MAAM,EAAE,6BAA6B,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;IAMhF,iDAAiD;IAC3C,GAAG,CAAC,MAAM,EAAE,0BAA0B,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAM1E;;;OAGG;IACG,MAAM,CAAC,MAAM,EAAE,0BAA0B,GAAG,OAAO,CAAC,IAAI,CAAC;CAKhE"}
@@ -1,3 +1,4 @@
1
+ import { pathSegment } from '@oblax/core';
1
2
  /**
2
3
  * Manages the people linked to an organization.
3
4
  *
@@ -9,6 +10,8 @@
9
10
  * })
10
11
  *
11
12
  * const people = await oblax.identity.organizations.people.list({ organizationId: 'org-id' })
13
+ *
14
+ * await oblax.identity.organizations.people.unlink({ organizationId: 'org-id', personId: 'person-id' })
12
15
  * ```
13
16
  */
14
17
  export class OrganizationPeopleSubmodule {
@@ -27,5 +30,12 @@ export class OrganizationPeopleSubmodule {
27
30
  async get(params) {
28
31
  return this.ctx.http.get(`/identity/organizations/${params.organizationId}/people/${params.personId}`);
29
32
  }
33
+ /**
34
+ * Unlinks the person from the organization; the person and the organization stay. A link
35
+ * that isn't there is 404. Returns `void` (HTTP 204).
36
+ */
37
+ async unlink(params) {
38
+ return this.ctx.http.delete(`/identity/organizations/${pathSegment(params.organizationId)}/people/${pathSegment(params.personId)}`);
39
+ }
30
40
  }
31
41
  //# sourceMappingURL=organization-people.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"organization-people.js","sourceRoot":"","sources":["../src/organization-people.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,2BAA2B;IACtC,YAA6B,GAAiB;QAAjB,QAAG,GAAH,GAAG,CAAc;IAAG,CAAC;IAElD,yCAAyC;IACzC,KAAK,CAAC,IAAI,CAAC,MAAoC;QAC7C,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CACvB,2BAA2B,MAAM,CAAC,cAAc,SAAS,EACzD,EAAE,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAE,CAC/B,CAAA;IACH,CAAC;IAED,qDAAqD;IACrD,KAAK,CAAC,IAAI,CAAC,MAAqC;QAC9C,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CACtB,2BAA2B,MAAM,CAAC,cAAc,SAAS,CAC1D,CAAA;IACH,CAAC;IAED,iDAAiD;IACjD,KAAK,CAAC,GAAG,CAAC,MAAkC;QAC1C,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CACtB,2BAA2B,MAAM,CAAC,cAAc,WAAW,MAAM,CAAC,QAAQ,EAAE,CAC7E,CAAA;IACH,CAAC;CACF"}
1
+ {"version":3,"file":"organization-people.js","sourceRoot":"","sources":["../src/organization-people.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAQzC;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,2BAA2B;IACtC,YAA6B,GAAiB;QAAjB,QAAG,GAAH,GAAG,CAAc;IAAG,CAAC;IAElD,yCAAyC;IACzC,KAAK,CAAC,IAAI,CAAC,MAAoC;QAC7C,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CACvB,2BAA2B,MAAM,CAAC,cAAc,SAAS,EACzD,EAAE,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAE,CAC/B,CAAA;IACH,CAAC;IAED,qDAAqD;IACrD,KAAK,CAAC,IAAI,CAAC,MAAqC;QAC9C,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CACtB,2BAA2B,MAAM,CAAC,cAAc,SAAS,CAC1D,CAAA;IACH,CAAC;IAED,iDAAiD;IACjD,KAAK,CAAC,GAAG,CAAC,MAAkC;QAC1C,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CACtB,2BAA2B,MAAM,CAAC,cAAc,WAAW,MAAM,CAAC,QAAQ,EAAE,CAC7E,CAAA;IACH,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,MAAM,CAAC,MAAkC;QAC7C,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CACzB,2BAA2B,WAAW,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,WAAW,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CACvG,CAAA;IACH,CAAC;CACF"}
@@ -11,6 +11,8 @@ import type { LinkPersonOrganizationParams, OrganizationPerson, PersonOrganizati
11
11
  * })
12
12
  *
13
13
  * const orgs = await oblax.identity.people.organizations.list({ personId: 'person-id' })
14
+ *
15
+ * await oblax.identity.people.organizations.unlink({ personId: 'person-id', organizationId: 'org-id' })
14
16
  * ```
15
17
  */
16
18
  export declare class PersonOrganizationsSubmodule {
@@ -22,5 +24,10 @@ export declare class PersonOrganizationsSubmodule {
22
24
  list(params: PersonOrganizationOwnerParams): Promise<OrganizationPerson[]>;
23
25
  /** Fetches a single organization-person link. */
24
26
  get(params: PersonOrganizationIdParams): Promise<OrganizationPerson>;
27
+ /**
28
+ * Unlinks the person from the organization; the person and the organization stay. A link
29
+ * that isn't there is 404. Returns `void` (HTTP 204).
30
+ */
31
+ unlink(params: PersonOrganizationIdParams): Promise<void>;
25
32
  }
26
33
  //# sourceMappingURL=person-organizations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"person-organizations.d.ts","sourceRoot":"","sources":["../src/person-organizations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EA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 @@
1
+ import { pathSegment } from '@oblax/core';
1
2
  /**
2
3
  * Manages the organizations a person is linked to.
3
4
  *
@@ -9,6 +10,8 @@
9
10
  * })
10
11
  *
11
12
  * const orgs = await oblax.identity.people.organizations.list({ personId: 'person-id' })
13
+ *
14
+ * await oblax.identity.people.organizations.unlink({ personId: 'person-id', organizationId: 'org-id' })
12
15
  * ```
13
16
  */
14
17
  export class PersonOrganizationsSubmodule {
@@ -27,5 +30,12 @@ export class PersonOrganizationsSubmodule {
27
30
  async get(params) {
28
31
  return this.ctx.http.get(`/identity/people/${params.personId}/organizations/${params.organizationId}`);
29
32
  }
33
+ /**
34
+ * Unlinks the person from the organization; the person and the organization stay. A link
35
+ * that isn't there is 404. Returns `void` (HTTP 204).
36
+ */
37
+ async unlink(params) {
38
+ return this.ctx.http.delete(`/identity/people/${pathSegment(params.personId)}/organizations/${pathSegment(params.organizationId)}`);
39
+ }
30
40
  }
31
41
  //# sourceMappingURL=person-organizations.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"person-organizations.js","sourceRoot":"","sources":["../src/person-organizations.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,4BAA4B;IACvC,YAA6B,GAAiB;QAAjB,QAAG,GAAH,GAAG,CAAc;IAAG,CAAC;IAElD,yCAAyC;IACzC,KAAK,CAAC,IAAI,CAAC,MAAoC;QAC7C,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CACvB,oBAAoB,MAAM,CAAC,QAAQ,gBAAgB,EACnD,EAAE,eAAe,EAAE,MAAM,CAAC,cAAc,EAAE,CAC3C,CAAA;IACH,CAAC;IAED,sDAAsD;IACtD,KAAK,CAAC,IAAI,CAAC,MAAqC;QAC9C,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CACtB,oBAAoB,MAAM,CAAC,QAAQ,gBAAgB,CACpD,CAAA;IACH,CAAC;IAED,iDAAiD;IACjD,KAAK,CAAC,GAAG,CAAC,MAAkC;QAC1C,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CACtB,oBAAoB,MAAM,CAAC,QAAQ,kBAAkB,MAAM,CAAC,cAAc,EAAE,CAC7E,CAAA;IACH,CAAC;CACF"}
1
+ {"version":3,"file":"person-organizations.js","sourceRoot":"","sources":["../src/person-organizations.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAQzC;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,4BAA4B;IACvC,YAA6B,GAAiB;QAAjB,QAAG,GAAH,GAAG,CAAc;IAAG,CAAC;IAElD,yCAAyC;IACzC,KAAK,CAAC,IAAI,CAAC,MAAoC;QAC7C,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CACvB,oBAAoB,MAAM,CAAC,QAAQ,gBAAgB,EACnD,EAAE,eAAe,EAAE,MAAM,CAAC,cAAc,EAAE,CAC3C,CAAA;IACH,CAAC;IAED,sDAAsD;IACtD,KAAK,CAAC,IAAI,CAAC,MAAqC;QAC9C,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CACtB,oBAAoB,MAAM,CAAC,QAAQ,gBAAgB,CACpD,CAAA;IACH,CAAC;IAED,iDAAiD;IACjD,KAAK,CAAC,GAAG,CAAC,MAAkC;QAC1C,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CACtB,oBAAoB,MAAM,CAAC,QAAQ,kBAAkB,MAAM,CAAC,cAAc,EAAE,CAC7E,CAAA;IACH,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,MAAM,CAAC,MAAkC;QAC7C,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CACzB,oBAAoB,WAAW,CAAC,MAAM,CAAC,QAAQ,CAAC,kBAAkB,WAAW,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,CACvG,CAAA;IACH,CAAC;CACF"}
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@oblax/identity",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "Oblax SDK — identity module (people, organizations, addresses, contact methods, preferences, roles, bank accounts)",
5
5
  "license": "MIT",
6
6
  "author": {
7
7
  "name": "Oblax SDK for JavaScript Team",
8
- "url": "https://docs.oblax.io/docs/getting-started/your-first-sdk-call"
8
+ "url": "https://docs.oblax.io/docs/getting-started/first-call/"
9
9
  },
10
10
  "homepage": "https://github.com/oblaxio/oblax-sdk-js#readme",
11
11
  "repository": {
@@ -37,11 +37,11 @@
37
37
  "access": "public"
38
38
  },
39
39
  "peerDependencies": {
40
- "@oblax/core": "^2.1.0"
40
+ "@oblax/core": "^2.2.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "typescript": "^5.5.0",
44
- "@oblax/core": "2.1.0"
44
+ "@oblax/core": "2.2.0"
45
45
  },
46
46
  "scripts": {
47
47
  "build": "tsc --build tsconfig.json",