@ai-matrx/associations 0.14.90 → 0.14.92

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 CHANGED
@@ -1,10 +1,29 @@
1
1
  # Changelog — @ai-matrx/associations
2
2
 
3
- ## 0.14.90
3
+ ## 0.14.92
4
4
 
5
5
  UNVERIFIED: this release has no Unreleased entry and the source comparison could not be made (the caller supplied no source comparison). Whether source changed is unknown; consumer action is unknown.
6
6
  Check the package's gitHead on npm against this version's gitHead: `git diff <previous gitHead> <this gitHead> -- apps/shared/associations/src`.
7
7
 
8
+ ## 0.14.91
9
+
10
+ SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
11
+ so they may include breaking API changes. Consumer action is UNKNOWN: read the diff before upgrading.
12
+ Diff: `git diff 3f2e8b4145 6426eb15ac -- apps/shared/associations/src`
13
+
14
+ Changed shipped source files (1):
15
+ - `apps/shared/associations/src/core/rpcResult.ts`
16
+
17
+ ## 0.14.90
18
+
19
+ SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
20
+ so they may include breaking API changes. Consumer action is UNKNOWN: read the diff before upgrading.
21
+ Diff: `git diff 1eae2f04b4 3f2e8b4145 -- apps/shared/associations/src`
22
+
23
+ Changed shipped source files (2):
24
+ - `apps/shared/associations/src/association-types.generated.ts`
25
+ - `apps/shared/associations/src/entity-types.generated.ts`
26
+
8
27
  ## 0.14.89
9
28
 
10
29
  **A kind's plural is real English.** The default plural of a registry label now comes from the new `pluralizeLabel` (exported from core): "Social post analysis" becomes "Social post analyses", "Private contact research" stays as is, and "Code Repository" becomes "Code Repositories". Before this, `label + "s"` printed "analysiss" and "researchs" on the Resources grid. No consumer action required.
@@ -360,6 +379,8 @@ No source changes intended and no consumer action required.
360
379
  ## 0.14.48
361
380
  ### Unreleased
362
381
 
382
+ - **A signed-out visitor is a state, not a fault.** `mapPgError` answers the identity port's `NotAuthenticatedError` with `unauthorized` and no longer sends it to the error sink, so a guest's first send no longer prints `[associations] internal: Not authenticated` four times. Consumer action: none.
383
+
363
384
  - `web_brand` joins `ASSOCIATION_TARGET_TYPES` (`AssociationTargetType`): a brand's people are filed on it (`party -> web_brand`, role `owns` | `key_person`). `web_brand` was already a registry token. Consumer: matrx-frontend `features/marketing/smart-add/relations.ts`.
364
385
 
365
386
  ## 0.14.47
@@ -773,7 +773,7 @@ interface ReferenceSearchCandidatesFn {
773
773
  }
774
774
  interface CandidatesServiceApi {
775
775
  /**
776
- * The universal candidate reader RPC (`public.reference_search_candidates`)
776
+ * The universal candidate reader RPC (`platform.reference_search_candidates`)
777
777
  * — shared by candidate search here and title resolution in titles.ts.
778
778
  */
779
779
  callReferenceSearchCandidates: ReferenceSearchCandidatesFn;
@@ -821,7 +821,7 @@ interface CreateEntityRowArgs {
821
821
  title: string;
822
822
  /**
823
823
  * The organization the new row belongs to. REQUIRED by
824
- * `public.entity_row_create`: every creatable token's table carries
824
+ * `platform.entity_row_create`: every creatable token's table carries
825
825
  * `organization_id`, and the door refuses a row with nobody owning it.
826
826
  */
827
827
  orgId?: string | null;
@@ -773,7 +773,7 @@ interface ReferenceSearchCandidatesFn {
773
773
  }
774
774
  interface CandidatesServiceApi {
775
775
  /**
776
- * The universal candidate reader RPC (`public.reference_search_candidates`)
776
+ * The universal candidate reader RPC (`platform.reference_search_candidates`)
777
777
  * — shared by candidate search here and title resolution in titles.ts.
778
778
  */
779
779
  callReferenceSearchCandidates: ReferenceSearchCandidatesFn;
@@ -821,7 +821,7 @@ interface CreateEntityRowArgs {
821
821
  title: string;
822
822
  /**
823
823
  * The organization the new row belongs to. REQUIRED by
824
- * `public.entity_row_create`: every creatable token's table carries
824
+ * `platform.entity_row_create`: every creatable token's table carries
825
825
  * `organization_id`, and the door refuses a row with nobody owning it.
826
826
  */
827
827
  orgId?: string | null;
@@ -2751,6 +2751,8 @@ var SIGNED_OUT_LEAD = "You're signed out";
2751
2751
  var SIGNED_OUT_MESSAGE = `${SIGNED_OUT_LEAD}. Sign in again \u2014 your text is kept here.`;
2752
2752
  function createRpcResultHelpers(errorSink, sessionAttached) {
2753
2753
  function mapPgError(e) {
2754
+ if (e?.name === "NotAuthenticatedError")
2755
+ return { code: "unauthorized", message: SIGNED_OUT_MESSAGE };
2754
2756
  const { pgCode, pgMessage, pgHint } = readPgFields(e);
2755
2757
  if (pgCode === "PGRST202") {
2756
2758
  const message = "demanded schema violation: the database this client is pointed at cannot answer a demanded @ai-matrx/associations RPC (PostgREST PGRST202 \u2014 function not found). This package DEMANDS the platform " + `schema (README \xA7 The demanded schema). ${pgMessage ?? ""}`.trim();
@@ -4101,7 +4103,7 @@ function createEntityRowsService(deps, titles) {
4101
4103
  return {
4102
4104
  /**
4103
4105
  * Create one row of `token`'s backing table named `title`, through
4104
- * `public.entity_row_create`. The door stamps `created_by` from `auth.uid()`,
4106
+ * `platform.entity_row_create`. The door stamps `created_by` from `auth.uid()`,
4105
4107
  * checks the caller can act in the organization, and refuses machinery tokens and
4106
4108
  * tables with no organization by name. Returns the new row's id + title. The
4107
4109
  * caller wires associations afterwards — this layer never writes edges.
@@ -4169,7 +4171,7 @@ function createEntityRowsService(deps, titles) {
4169
4171
  }
4170
4172
  },
4171
4173
  /**
4172
- * Rename one row of `token`'s table through `public.entity_row_rename`. The door
4174
+ * Rename one row of `token`'s table through `platform.entity_row_rename`. The door
4173
4175
  * decides on the one ladder — the row's author, `editor` on the row, or a platform
4174
4176
  * admin — and answers "there is no such thing here" rather than telling a caller
4175
4177
  * that somebody else's row exists.