Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: types & deps #510

Merged
merged 5 commits into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ following UTC time offsets format.</p>
<dt><a href="#resolveCustomerSecretsName">resolveCustomerSecretsName(baseURL, ctx)</a> ⇒ <code>string</code></dt>
<dd><p>Resolves the name of the customer secrets based on the baseURL.</p>
</dd>
<dt><a href="#getRUMDomainKey">getRUMDomainKey(baseURL, context)</a> ⇒ <code>Promise.&lt;string&gt;</code></dt>
<dd><p>Retrieves the RUM domain key for the specified base URL from the customer secrets.</p>
</dd>
<dt><a href="#generateCSVFile">generateCSVFile(data)</a> ⇒ <code>Buffer</code></dt>
<dd><p>Generates a CSV file from the provided JSON data.</p>
<p>Each key-value pair in the JSON objects
Expand All @@ -113,6 +116,9 @@ logging will remain unchanged.</p>
<dt><a href="#s3Wrapper">s3Wrapper(fn)</a> ⇒ <code>function</code></dt>
<dd><p>Adds an S3Client instance and bucket to the context.</p>
</dd>
<dt><a href="#SQS.">SQS.(queueUrl)</a> ⇒ <code>boolean</code></dt>
<dd><p>Check if the queue is a FIFO queue by examining its URL.</p>
</dd>
<dt><a href="#sqsEventAdapter">sqsEventAdapter(fn)</a> ⇒ <code>function</code></dt>
<dd><p>Wrapper to turn an SQS record into a function param
Inspired by <a href="https://github.com/adobe/helix-admin/blob/main/src/index.js#L108-L133">https://github.com/adobe/helix-admin/blob/main/src/index.js#L108-L133</a></p>
Expand Down Expand Up @@ -520,6 +526,23 @@ Resolves the name of the customer secrets based on the baseURL.
| baseURL | <code>string</code> | The base URL to resolve the customer secrets name from. |
| ctx | <code>Object</code> | The context object containing the function version. |

<a name="getRUMDomainKey"></a>

## getRUMDomainKey(baseURL, context) ⇒ <code>Promise.&lt;string&gt;</code>
Retrieves the RUM domain key for the specified base URL from the customer secrets.

**Kind**: global function
**Returns**: <code>Promise.&lt;string&gt;</code> - - A promise that resolves to the RUM domain key.
**Throws**:

- <code>Error</code> Throws an error if no domain key is found for the specified base URL.


| Param | Type | Description |
| --- | --- | --- |
| baseURL | <code>string</code> | The base URL for which the RUM domain key is to be retrieved. |
| context | <code>UniversalContext</code> | Helix Universal Context. See https://github.com/adobe/helix-universal/blob/main/src/adapter.d.ts#L120 |

<a name="generateCSVFile"></a>

## generateCSVFile(data) ⇒ <code>Buffer</code>
Expand Down Expand Up @@ -570,6 +593,18 @@ Adds an S3Client instance and bucket to the context.
| --- | --- |
| fn | <code>UniversalAction</code> |

<a name="SQS."></a>

## SQS.(queueUrl) ⇒ <code>boolean</code>
Check if the queue is a FIFO queue by examining its URL.

**Kind**: global function
**Returns**: <code>boolean</code> - true if the queue is a FIFO queue, false otherwise

| Param | Type | Description |
| --- | --- | --- |
| queueUrl | <code>string</code> | the URL of the SQS queue |

<a name="sqsEventAdapter"></a>

## sqsEventAdapter(fn) ⇒ <code>function</code>
Expand Down
Loading
Loading