@canopy-io/node 0.4.0 → 0.5.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @canopy-io/node
2
2
 
3
+ ## 0.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 0444343: Types regenerated from the spec, which adds five branding fields and makes one existing field nullable.
8
+
9
+ One caller shape changed: `product_name` on the effective branding (`GET /api/v1/branding`, `effective`) is now `string | null`. When the customer sets no product name, the hosted pages show none instead of Canopy's, and the response says so with `null`. Code that read it as always a string should handle the absent case.
10
+
11
+ Everything else is additive. The stored branding, the effective branding and the update body gain `logo_kind` (`full` or `icon`), `favicon_url`, `background_color`, `terms_url` and `privacy_url`. The API's public operation count stays at 138.
12
+
3
13
  ## 0.4.0
4
14
 
5
15
  ### Minor Changes
package/dist/index.d.cts CHANGED
@@ -2188,7 +2188,7 @@ interface paths {
2188
2188
  };
2189
2189
  /**
2190
2190
  * Get an Environment's branding
2191
- * @description Returns the Environment's branding: the values the customer set (`branding`, null where unset) beside the effective result every hosted page and the organization admin portal render (`effective`: product name, logo, primary color, support link, and whether the attribution line stays). `brand_removal_available` says whether the Account's plan removes the attribution line.
2191
+ * @description Returns the Environment's branding: the values the customer set (`branding`, null where unset) beside the effective result every hosted page and the organization admin portal render (`effective`: product name, logo, favicon, primary and background colors, support, terms and privacy links, and whether the attribution mark stays). Only the primary color has a default; every other unset field is `null`. `brand_removal_available` says whether the Account's plan removes the attribution mark.
2192
2192
  */
2193
2193
  get: operations["ApiBrandingController_getBranding"];
2194
2194
  put?: never;
@@ -2198,7 +2198,7 @@ interface paths {
2198
2198
  head?: never;
2199
2199
  /**
2200
2200
  * Change an Environment's branding
2201
- * @description Sets the Environment's branding. Every field is optional and each one falls back on its own: send only what you want to change, send `null` to return a field to Canopy's default. The product name replaces Canopy's on every customer-facing surface, the logo shows at the top, the primary color drives buttons and links, and the support link becomes the support line. Returns `400` (`validation`) for a malformed value. Emits `environment.branding_updated`.
2201
+ * @description Sets the Environment's branding. Every field is optional and stands on its own: send only what you want to change, send `null` to clear a field (the primary color then returns to the default blue). The product name shows in the browser tab, as the logo's alt text and in place of a missing logo; the logo shows at the top and the favicon in the tab; the primary color drives buttons and links, and the hover, link and focus shades are derived from it; the background color paints the page behind the card; the support, terms and privacy links show as "Need help?", "Terms" and "Privacy" under every hosted page. Returns `400` (`validation`) for a malformed value. Emits `environment.branding_updated`.
2202
2202
  */
2203
2203
  patch: operations["ApiBrandingController_updateBranding"];
2204
2204
  trace?: never;
@@ -3756,37 +3756,70 @@ interface components {
3756
3756
  StoredBrandingDto: {
3757
3757
  product_name: string | null;
3758
3758
  logo_url: string | null;
3759
+ /** @enum {string|null} */
3760
+ logo_kind: "full" | "icon" | null;
3761
+ favicon_url: string | null;
3759
3762
  primary_color: string | null;
3763
+ background_color: string | null;
3760
3764
  support_url: string | null;
3765
+ terms_url: string | null;
3766
+ privacy_url: string | null;
3761
3767
  };
3762
3768
  EffectiveBrandingDto: {
3763
- product_name: string;
3769
+ /** @description Null when the customer set none; surfaces then show no name. */
3770
+ product_name: string | null;
3764
3771
  logo_url: string | null;
3772
+ /**
3773
+ * @description `full`: the logo is shown alone. `icon`: it is shown at icon size with the product name beside it.
3774
+ * @enum {string}
3775
+ */
3776
+ logo_kind: "full" | "icon";
3777
+ favicon_url: string | null;
3765
3778
  /** @description Six-digit hex. */
3766
3779
  primary_color: string;
3780
+ /** @description Six-digit hex, or null for the neutral grey. */
3781
+ background_color: string | null;
3767
3782
  support_url: string | null;
3768
- /** @description Whether the attribution line stays on hosted pages and the portal. False only on a plan with brand removal. */
3783
+ terms_url: string | null;
3784
+ privacy_url: string | null;
3785
+ /** @description Whether the attribution mark stays on hosted pages and the portal. False only on a plan with brand removal. */
3769
3786
  attribution: boolean;
3770
3787
  };
3771
3788
  EnvironmentBrandingResponseDto: {
3772
3789
  environment_slug: string;
3773
3790
  branding: components["schemas"]["StoredBrandingDto"];
3774
3791
  effective: components["schemas"]["EffectiveBrandingDto"];
3775
- /** @description Whether the Account's plan removes the attribution line. When false, the line stays whatever the customer sets. */
3792
+ /** @description Whether the Account's plan removes the attribution mark. When false, the mark stays whatever the customer sets. */
3776
3793
  brand_removal_available: boolean;
3777
3794
  };
3778
3795
  UpdateEnvironmentBrandingDto: {
3779
- /** @description The product name every hosted page and the organization admin portal show in place of Canopy's. Null clears it. */
3796
+ /** @description The product name hosted pages and the organization admin portal show: in the browser tab title, beside the logo when `logo_kind` is `icon`, as a full logo's alt text, and in place of a logo when none is set. Null clears it, and the pages then show no name. */
3780
3797
  product_name?: string | null;
3781
3798
  /** @description Absolute https URL of the logo shown at the top of hosted pages and the portal. Null clears it. */
3782
3799
  logo_url?: string | null;
3783
3800
  /**
3784
- * @description Six-digit hex color for buttons and links on hosted pages and the portal. Null returns to Canopy's primary.
3801
+ * @description What the logo image is. `full`: a complete logo that already carries the product name, shown alone. `icon`: a square mark, shown at icon size with the product name beside it. Null returns to `full`.
3802
+ * @enum {string|null}
3803
+ */
3804
+ logo_kind?: "full" | "icon" | null;
3805
+ /** @description Absolute https URL of the browser-tab icon on hosted pages: a square PNG or ICO of at least 32 px. Null clears it. */
3806
+ favicon_url?: string | null;
3807
+ /**
3808
+ * @description Six-digit hex colour for buttons and links on hosted pages and the portal. Hover, link, focus and tint shades are derived from it so each meets its contrast rule. Null returns to the default blue.
3785
3809
  * @example #B93C0C
3786
3810
  */
3787
3811
  primary_color?: string | null;
3788
- /** @description Where the support line points: an https URL or a mailto: address. Null hides the line. */
3812
+ /**
3813
+ * @description Six-digit hex colour for the page behind the card on hosted pages. The card stays white; footer text is chosen to reach 4.5:1 against it. Null returns to the neutral grey.
3814
+ * @example #0B1F3A
3815
+ */
3816
+ background_color?: string | null;
3817
+ /** @description Where "Need help?" points: an https URL or a mailto: address. Null hides it. */
3789
3818
  support_url?: string | null;
3819
+ /** @description Absolute https URL of the customer's terms, linked as "Terms" in the hosted pages' footer. Null hides it. */
3820
+ terms_url?: string | null;
3821
+ /** @description Absolute https URL of the customer's privacy policy, linked as "Privacy" in the hosted pages' footer. Null hides it. */
3822
+ privacy_url?: string | null;
3790
3823
  };
3791
3824
  WebhookCreatedResponseDto: {
3792
3825
  id: string;
@@ -19197,7 +19230,7 @@ interface operations {
19197
19230
  };
19198
19231
  };
19199
19232
  };
19200
- /** @description A value is malformed: the logo must be an https URL, the color a six-digit hex, the support link an https URL or a mailto: address; or the request sent both an `X-API-Key` and an `Authorization` header */
19233
+ /** @description A value is malformed: the logo, favicon, terms and privacy links must be https URLs, the colors six-digit hex, the support link an https URL or a mailto: address, and the product name at most 60 characters; or the request sent both an `X-API-Key` and an `Authorization` header */
19201
19234
  400: {
19202
19235
  headers: {
19203
19236
  [name: string]: unknown;
@@ -19208,7 +19241,7 @@ interface operations {
19208
19241
  * "error": {
19209
19242
  * "statusCode": 400,
19210
19243
  * "code": null,
19211
- * "message": "A value is malformed: the logo must be an https URL, the color a six-digit hex, the support link an https URL or a mailto: address; or the request sent both an `X-API-Key` and an `Authorization` header",
19244
+ * "message": "A value is malformed: the logo, favicon, terms and privacy links must be https URLs, the colors six-digit hex, the support link an https URL or a mailto: address, and the product name at most 60 characters; or the request sent both an `X-API-Key` and an `Authorization` header",
19212
19245
  * "timestamp": "2026-04-20T12:00:00.000Z",
19213
19246
  * "path": "/api/v1/branding",
19214
19247
  * "method": "PATCH"
package/dist/index.d.ts CHANGED
@@ -2188,7 +2188,7 @@ interface paths {
2188
2188
  };
2189
2189
  /**
2190
2190
  * Get an Environment's branding
2191
- * @description Returns the Environment's branding: the values the customer set (`branding`, null where unset) beside the effective result every hosted page and the organization admin portal render (`effective`: product name, logo, primary color, support link, and whether the attribution line stays). `brand_removal_available` says whether the Account's plan removes the attribution line.
2191
+ * @description Returns the Environment's branding: the values the customer set (`branding`, null where unset) beside the effective result every hosted page and the organization admin portal render (`effective`: product name, logo, favicon, primary and background colors, support, terms and privacy links, and whether the attribution mark stays). Only the primary color has a default; every other unset field is `null`. `brand_removal_available` says whether the Account's plan removes the attribution mark.
2192
2192
  */
2193
2193
  get: operations["ApiBrandingController_getBranding"];
2194
2194
  put?: never;
@@ -2198,7 +2198,7 @@ interface paths {
2198
2198
  head?: never;
2199
2199
  /**
2200
2200
  * Change an Environment's branding
2201
- * @description Sets the Environment's branding. Every field is optional and each one falls back on its own: send only what you want to change, send `null` to return a field to Canopy's default. The product name replaces Canopy's on every customer-facing surface, the logo shows at the top, the primary color drives buttons and links, and the support link becomes the support line. Returns `400` (`validation`) for a malformed value. Emits `environment.branding_updated`.
2201
+ * @description Sets the Environment's branding. Every field is optional and stands on its own: send only what you want to change, send `null` to clear a field (the primary color then returns to the default blue). The product name shows in the browser tab, as the logo's alt text and in place of a missing logo; the logo shows at the top and the favicon in the tab; the primary color drives buttons and links, and the hover, link and focus shades are derived from it; the background color paints the page behind the card; the support, terms and privacy links show as "Need help?", "Terms" and "Privacy" under every hosted page. Returns `400` (`validation`) for a malformed value. Emits `environment.branding_updated`.
2202
2202
  */
2203
2203
  patch: operations["ApiBrandingController_updateBranding"];
2204
2204
  trace?: never;
@@ -3756,37 +3756,70 @@ interface components {
3756
3756
  StoredBrandingDto: {
3757
3757
  product_name: string | null;
3758
3758
  logo_url: string | null;
3759
+ /** @enum {string|null} */
3760
+ logo_kind: "full" | "icon" | null;
3761
+ favicon_url: string | null;
3759
3762
  primary_color: string | null;
3763
+ background_color: string | null;
3760
3764
  support_url: string | null;
3765
+ terms_url: string | null;
3766
+ privacy_url: string | null;
3761
3767
  };
3762
3768
  EffectiveBrandingDto: {
3763
- product_name: string;
3769
+ /** @description Null when the customer set none; surfaces then show no name. */
3770
+ product_name: string | null;
3764
3771
  logo_url: string | null;
3772
+ /**
3773
+ * @description `full`: the logo is shown alone. `icon`: it is shown at icon size with the product name beside it.
3774
+ * @enum {string}
3775
+ */
3776
+ logo_kind: "full" | "icon";
3777
+ favicon_url: string | null;
3765
3778
  /** @description Six-digit hex. */
3766
3779
  primary_color: string;
3780
+ /** @description Six-digit hex, or null for the neutral grey. */
3781
+ background_color: string | null;
3767
3782
  support_url: string | null;
3768
- /** @description Whether the attribution line stays on hosted pages and the portal. False only on a plan with brand removal. */
3783
+ terms_url: string | null;
3784
+ privacy_url: string | null;
3785
+ /** @description Whether the attribution mark stays on hosted pages and the portal. False only on a plan with brand removal. */
3769
3786
  attribution: boolean;
3770
3787
  };
3771
3788
  EnvironmentBrandingResponseDto: {
3772
3789
  environment_slug: string;
3773
3790
  branding: components["schemas"]["StoredBrandingDto"];
3774
3791
  effective: components["schemas"]["EffectiveBrandingDto"];
3775
- /** @description Whether the Account's plan removes the attribution line. When false, the line stays whatever the customer sets. */
3792
+ /** @description Whether the Account's plan removes the attribution mark. When false, the mark stays whatever the customer sets. */
3776
3793
  brand_removal_available: boolean;
3777
3794
  };
3778
3795
  UpdateEnvironmentBrandingDto: {
3779
- /** @description The product name every hosted page and the organization admin portal show in place of Canopy's. Null clears it. */
3796
+ /** @description The product name hosted pages and the organization admin portal show: in the browser tab title, beside the logo when `logo_kind` is `icon`, as a full logo's alt text, and in place of a logo when none is set. Null clears it, and the pages then show no name. */
3780
3797
  product_name?: string | null;
3781
3798
  /** @description Absolute https URL of the logo shown at the top of hosted pages and the portal. Null clears it. */
3782
3799
  logo_url?: string | null;
3783
3800
  /**
3784
- * @description Six-digit hex color for buttons and links on hosted pages and the portal. Null returns to Canopy's primary.
3801
+ * @description What the logo image is. `full`: a complete logo that already carries the product name, shown alone. `icon`: a square mark, shown at icon size with the product name beside it. Null returns to `full`.
3802
+ * @enum {string|null}
3803
+ */
3804
+ logo_kind?: "full" | "icon" | null;
3805
+ /** @description Absolute https URL of the browser-tab icon on hosted pages: a square PNG or ICO of at least 32 px. Null clears it. */
3806
+ favicon_url?: string | null;
3807
+ /**
3808
+ * @description Six-digit hex colour for buttons and links on hosted pages and the portal. Hover, link, focus and tint shades are derived from it so each meets its contrast rule. Null returns to the default blue.
3785
3809
  * @example #B93C0C
3786
3810
  */
3787
3811
  primary_color?: string | null;
3788
- /** @description Where the support line points: an https URL or a mailto: address. Null hides the line. */
3812
+ /**
3813
+ * @description Six-digit hex colour for the page behind the card on hosted pages. The card stays white; footer text is chosen to reach 4.5:1 against it. Null returns to the neutral grey.
3814
+ * @example #0B1F3A
3815
+ */
3816
+ background_color?: string | null;
3817
+ /** @description Where "Need help?" points: an https URL or a mailto: address. Null hides it. */
3789
3818
  support_url?: string | null;
3819
+ /** @description Absolute https URL of the customer's terms, linked as "Terms" in the hosted pages' footer. Null hides it. */
3820
+ terms_url?: string | null;
3821
+ /** @description Absolute https URL of the customer's privacy policy, linked as "Privacy" in the hosted pages' footer. Null hides it. */
3822
+ privacy_url?: string | null;
3790
3823
  };
3791
3824
  WebhookCreatedResponseDto: {
3792
3825
  id: string;
@@ -19197,7 +19230,7 @@ interface operations {
19197
19230
  };
19198
19231
  };
19199
19232
  };
19200
- /** @description A value is malformed: the logo must be an https URL, the color a six-digit hex, the support link an https URL or a mailto: address; or the request sent both an `X-API-Key` and an `Authorization` header */
19233
+ /** @description A value is malformed: the logo, favicon, terms and privacy links must be https URLs, the colors six-digit hex, the support link an https URL or a mailto: address, and the product name at most 60 characters; or the request sent both an `X-API-Key` and an `Authorization` header */
19201
19234
  400: {
19202
19235
  headers: {
19203
19236
  [name: string]: unknown;
@@ -19208,7 +19241,7 @@ interface operations {
19208
19241
  * "error": {
19209
19242
  * "statusCode": 400,
19210
19243
  * "code": null,
19211
- * "message": "A value is malformed: the logo must be an https URL, the color a six-digit hex, the support link an https URL or a mailto: address; or the request sent both an `X-API-Key` and an `Authorization` header",
19244
+ * "message": "A value is malformed: the logo, favicon, terms and privacy links must be https URLs, the colors six-digit hex, the support link an https URL or a mailto: address, and the product name at most 60 characters; or the request sent both an `X-API-Key` and an `Authorization` header",
19212
19245
  * "timestamp": "2026-04-20T12:00:00.000Z",
19213
19246
  * "path": "/api/v1/branding",
19214
19247
  * "method": "PATCH"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canopy-io/node",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Official TypeScript SDK for Canopy — hierarchical identity and access management.",
5
5
  "license": "MIT",
6
6
  "author": "Canopy Identity Inc.",