Task: Implement a GetInterestRequest class under the existing jQuery openlink namespace to generate a precise XMPP IQ stanza for the “get-interest” command.
What to implement
Add a constructor function/class at $.openlink.GetInterestRequest that accepts a single parameter:
interestId (string) – the value to embed inside the element of the stanza.
Instance behavior:
Each new GetInterestRequest(interestId) must generate a unique ID for the IQ stanza. Provide a method getId() that returns this unique ID.
Provide a method toXml() that returns an exact XML string representing an IQ stanza in the following form (with dynamic pieces filled in from the instance and global helpers):
INTEREST_ID
Specifically:
UNIQUE_ID comes from getId().
OPENLINK_JID is retrieved by $.openlink.getOpenlinkJid().
INTEREST_ID is the value passed as interestId to the constructor.
Namespace and attachment:
The implementation must attach to the existing $.openlink namespace so that tests like new $.openlink.GetInterestRequest("...") work.
Do not introduce any dependencies beyond what’s already available in the test harness (no module loaders required).
Location:
Place the solution file under /app/ (for example: app/openlink-get-interest.js). The code should execute in environments where the test suite provides jQuery as an argument (i.e., (jQuery) is passed as $).
Acceptance criteria
Two distinct instances of GetInterestRequest created in succession return different IDs via getId().
toXml() on a GetInterestRequest instance with interestId "test-interest-id" produces exactly:
test-interest-id
where {ID} matches getId() and {OPENLINK_JID} matches $.openlink.getOpenlinkJid().
Notes
The tests mock domain-based JIDs via testStart, so your implementation must rely on:
$.openlink.getOpenlinkJid() for the to attribute
The provided interestId for the inner value
Ensure no extra whitespace or line breaks are added to the produced XML; the string must match exactly.