The AtlasUser in the system, which is a set of information like an e-mail, a name, a profile picture, etc.
The basket of permissions that we hit the API endpoint with.
Fusing them together leads to a monstrous solipsism where the AtlasUser cannot imagine any user other than himself. He cannot collaborate with other AtlasUsers unless they give him full access to their APIKeys and authority to hit endpoints with them.
Following practice at Meta, we introduce a new fundamental class called the AtlasViewer, which is the agent making requests. AtlasUser is just the person in the system. For the time being AtlasUser still accepts keys in its constructor, but it passes them through to the underlying AtlasViewer: this behavior will probably be deprecated in version 1.0.
:rocket:
This description was created by Ellipsis for commit 325def1b5a94e69e777489aae5a5673b1cef6785
Summary:
Refactored the SDK to introduce AtlasViewer for handling API requests, separating it from AtlasUser which now only represents user information.
Key points:
Introduced AtlasViewer class in src/viewer.ts to handle API requests.
Updated AtlasUser class in src/user.ts to represent user information only.
Modified constructors and methods in src/embedding.ts, src/index.ts, src/organization.ts, src/project.ts, and src/projection.ts to use AtlasViewer for API calls.
Updated type definitions in src/global.d.ts to include AtlasViewer related types.
Adjusted imports and exports in src/main.ts to include AtlasViewer.
This PR disentangles two concepts in the module:
Fusing them together leads to a monstrous solipsism where the AtlasUser cannot imagine any user other than himself. He cannot collaborate with other AtlasUsers unless they give him full access to their APIKeys and authority to hit endpoints with them.
Following practice at Meta, we introduce a new fundamental class called the
AtlasViewer
, which is the agent making requests.AtlasUser
is just the person in the system. For the time beingAtlasUser
still accepts keys in its constructor, but it passes them through to the underlying AtlasViewer: this behavior will probably be deprecated in version 1.0.Summary:
Refactored the SDK to introduce
AtlasViewer
for handling API requests, separating it fromAtlasUser
which now only represents user information.Key points:
AtlasViewer
class insrc/viewer.ts
to handle API requests.AtlasUser
class insrc/user.ts
to represent user information only.src/embedding.ts
,src/index.ts
,src/organization.ts
,src/project.ts
, andsrc/projection.ts
to useAtlasViewer
for API calls.src/global.d.ts
to includeAtlasViewer
related types.src/main.ts
to includeAtlasViewer
.Generated with :heart: by ellipsis.dev