- Docs for various nodes updated (closes #9)

- Fixed some nodes not matching how their docs describe how they function (such as node configuration should always take precedence over inputs)
This commit is contained in:
Skylar Sadlier
2021-09-02 10:51:47 -06:00
parent b698389491
commit 4bd2dce434
24 changed files with 184 additions and 184 deletions

View File

@@ -30,14 +30,14 @@
</div>
<div class="form-row">
<label for="node-input-roomId"><i class="fa fa-user"></i> Room ID</label>
<input type="text" id="node-input-roomId">
<input type="text" id="node-input-roomId" placeholder="msg.topic">
</div>
<div class="form-row">
<label for="node-input-contentType"><i class="fa fa-user"></i> Content-Type</label>
<input type="text" id="node-input-contentType" placeholder="application/pdf">
<input type="text" id="node-input-contentType" placeholder="msg.contentType">
</div>
<div class="form-tips">
Must be a valid <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types" target="_blank">MIME Type</a>
Must be a valid <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types" target="_blank">MIME Type</a> (ex: application/pdf) or left empty
</div>
</script>
@@ -48,36 +48,42 @@
<h3>Inputs</h3>
<dl class="message-properties">
<dt>msg.payload
<span class="property-type">File | String | Buffer | ReadStream | Blob</span>
<span class="property-type">File | string | Buffer | ReadStream | Blob</span>
</dt>
<dd> the contents of the file to upload. </dd>
<dt>msg.topic
<span class="property-type">String | Null</span>
<span class="property-type">string</span>
</dt>
<dd> Room ID to send file to. Optional if configured on the node. Overrides node configuration if set.</dd>
<dd> Room ID to send file to. Ignored if configured on the node, otherwise required.</dd>
<dt class="optional">msg.filename
<span class="property-type">String | Null</span>
<span class="property-type">string | null</span>
</dt>
<dd> name of the file to upload (optional). Overrides node configuration.</dd>
<dt class="optional">msg.contentType
<span class="property-type">String | Null</span>
</dt>
<dd> Content <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types" target="_blank">MIME Type</a>. Optional if configured on the node. Overrides node configuration if set.</dd>
<dd> name of the file to upload (optional). Note: If this is not defined the file will receive a randomly generated name (without an extension).</dd>
<dt class="optional">msg.body
<span class="property-type">String | Null</span>
<span class="property-type">string | null</span>
</dt>
<dd> this will be the display name the client will see when rendered in their chat client. If this is left empty the it uses <code>msg.filename</code>. If <code>msg.filename</code> is also undefined it sets it to empty string</dd>
<dd> this will be the display name the client will see when rendered in their chat client. If this is left empty it will just display as "Attachment".</dd>
<dt class="optional">msg.contentType
<span class="property-type">string | null</span>
</dt>
<dd> Content <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types" target="_blank">MIME Type</a>. Optional but highly recommended (so the client receiving knows what type of file it is).</dd>
<dt class="optional">msg.content
<span class="property-type">object | null</span>
</dt>
<dd> craft your own msg.content to send to the server. If defined then <code>msg.filename</code>, <code>msg.contentType</code>, <code>msg.body</code>, and <code>msg.payload</code> aren't required since the file already exists.</dd>
</dl>
<h3>Outputs</h3>
<ol class="node-ports">
<li>Success
<dl class="message-properties">
<dd>original msg object preserved.</dd>
<dt>msg.eventId <span class="property-type">string</span></dt>
<dd>the eventId from the posted message.</dd>
</dl>
</li>
<li>Error