Packbase

pb.howls

Fetch, create, delete, react to, comment on, rehowl, and report howls.

Call pb.howls(id) with a howl UUID to get a lazy HowlHandle. Creating the handle does not send a request. Await the handle to fetch the howl. Action methods such as .react() send only their applicable request.

const  = await .('howl-id')
.(., ..)

Create a howl

const  = await ..({
  : 'pack-id',
  : 'Hello, world!',
  : ['art', 'rating_safe'],
})

Packbase creates howls in a background job. By default, the SDK starts the job and checks its status. The promise resolves with the completed Howl. Application code requires only the await above.

HowlCreateInput accepts:

FieldTypeNotes
tenant_idstringPack UUID. The caller must be a member.
parent_idstring?Parent howl UUID, when creating a reply through the creation job.
content_type'text'?The SDK supplies 'text' when omitted.
bodystring | nullPlain text or HTML. Use null only when assets are present.
asset_idsstring[]?Finalized upload IDs, up to 100.
tags[string, ...string[]]Must contain exactly one rating tag, in any position.

Pass { poll: false } to receive only { id } without a wait. Read Async Job Polling before you use this option. Your application must then monitor the incomplete job.

Upload assets

pb.howls.upload exposes init, append, finalize, and status. The SDK injects protocol commands and uses multipart FormData for appended blobs.

await ...({ : ., : . })
await ...({ , : 0, :  })
await ...()
await ...()

Upload responses are open JsonObject values until the server publishes stable response schemas.

Delete

await .('howl-id').()

The signed-in user must have permission to delete a howl. The server does not currently supply a howl edit route.

Reactions

await .('🔥')
await .()

react() sends POST /howl/:id/react. If you repeat the same reaction, the server returns status 400. The method does not toggle the reaction. unreact() sends DELETE /howl/:id/react. It removes the caller's reactions from the howl.

Comments and rehowls

const { :  } = await .('Good post.')
const { :  } = await .()
await .()

Comments are sanitized by the server and limited to 1,024 characters. unrehowl() targets the original howl ID.

Report

const  = await .('howl-id').(
  .,
  'Source material is available here.',
)

The returned ReportResult contains the moderation ticket's id and status.

On this page