@signalhousellc/sdk 1.0.19 → 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/domains/Landings.js +16 -0
package/package.json
CHANGED
package/src/domains/Landings.js
CHANGED
|
@@ -108,6 +108,22 @@ export class Landings {
|
|
|
108
108
|
* @throws {Error} Throws an error if the landingId parameter is missing
|
|
109
109
|
* @returns {Promise<Object>} - The response from the server after deleting the landing page
|
|
110
110
|
*/
|
|
111
|
+
/**
|
|
112
|
+
* Get a landing page by its associated brand ID
|
|
113
|
+
* @async
|
|
114
|
+
* @roles api, admin, developer, billing, user
|
|
115
|
+
* @param {Object} params - The parameters for getting a landing page by brand
|
|
116
|
+
* @param {string} params.brandId - The brand ID to look up the landing page for
|
|
117
|
+
* @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
|
|
118
|
+
* @throws {Error} Throws an error if the brandId parameter is missing
|
|
119
|
+
* @returns {Promise<Object>} - The landing page object returned from the server
|
|
120
|
+
*/
|
|
121
|
+
async getLandingByBrandId({ brandId, options = {} }) {
|
|
122
|
+
this.client._require({ brandId });
|
|
123
|
+
const safeBrandId = encodeURIComponent(brandId);
|
|
124
|
+
return this.client(`/landing/brand/${safeBrandId}`, { method: "GET", ...options });
|
|
125
|
+
}
|
|
126
|
+
|
|
111
127
|
async deleteLanding({ landingId, options = {} }) {
|
|
112
128
|
this.client._require({ landingId });
|
|
113
129
|
const safeLandingId = encodeURIComponent(landingId);
|