NextContent Idea

SDK Proposal v2

Research Notes

Designs

https://www.figma.com/file/xAawYaHw1GcYw5KZmtt3Co/NextContent-Platform?node-id=102%3A748

Auth Ideas:

Considerations

  1. Lookup and LookupMany functions will paginate by default. 50 lookup objects per page containing fields defined as lookup fields.
  2. Collection from lookupMany can be used straight away and will be updated as new matching results come in
  3. UseNextCMS method takes in:
    1. Optional pageSize property value but defaults to environment variable value or 50
    2. Optional endpointUrl property value but defaults to environment variable value
    3. Optional authToken property value but defaults to environment variable value
    4. Optional viewAs property value (userId) but defaults to “public”
  4. CommitChanges can be called in event handlers (such as button click) and will be async
  5. Object in collection or item from lookup/lookupMany methods will contain a markDeleted() method which will mark the object for deletion. This change will only apply once commitChanges() is called.
  6. Object in collection will have a toString() override which automatically strips out fields marked as private
  7. Configuration (i.e. api endpoint, auth token, defaultPageSize, etc) will be set in the environment variables:
    1. NEXTCMS_ENDPOINT_URL
    2. NEXTCMS_AUTH_TOKEN
    3. NEXTCMS_DEFAULT_PAGE_SIZE