@canva/error 0.0.1-rc.1 → 1.1.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.
Files changed (3) hide show
  1. package/README.md +49 -0
  2. package/index.d.ts +4 -0
  3. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,49 @@
1
+ # @canva/error
2
+
3
+ A package for Canva's Apps SDK that exports a `CanvaError` class for handling errors.
4
+
5
+ ![](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge&logo=typescript&logoColor=white)
6
+
7
+ ## Table of contents
8
+
9
+ - [Introduction](#introduction)
10
+ - [Installation](#installation)
11
+ - [Usage](#usage)
12
+ - [Related packages](#related-packages)
13
+ - [Contributing](#contributing)
14
+ - [License](#license)
15
+
16
+ ## Introduction
17
+
18
+ `@canva/error` is an npm package for Canva's [Apps SDK](https://www.canva.dev/docs/apps). It exports a `CanvaError` class that apps can use to catch and handle errors.
19
+
20
+ **Note:** To get up and running with the Apps SDK, check out [the quick start guide](https://www.canva.dev/docs/apps/quick-start).
21
+
22
+ ## Installation
23
+
24
+ ```bash
25
+ npm install @canva/error
26
+ ```
27
+
28
+ ## Usage
29
+
30
+ See the documentation for [Handling errors](https://www.canva.dev/docs/apps/handling-errors).
31
+
32
+ ## Related packages
33
+
34
+ The Apps SDK is made up of the following packages:
35
+
36
+ - [`@canva/app-ui-kit`](https://www.npmjs.com/package/@canva/app-ui-kit) - React-based component library for creating apps that mimic the look and feel of Canva.
37
+ - [`@canva/asset`](https://www.npmjs.com/package/@canva/asset) - Provides methods for working with assets, such as image and video files.
38
+ - [`@canva/design`](https://www.npmjs.com/package/@canva/design) - Provides methods for interacting with the user's design, such as creating elements.
39
+ - [`@canva/error`](https://www.npmjs.com/package/@canva/error) - Provides a `CanvaError` class for handling errors.
40
+ - [`@canva/platform`](https://www.npmjs.com/package/@canva/platform) - Provides utility methods, such as a method for opening external links.
41
+ - [`@canva/user`](https://www.npmjs.com/package/@canva/user) - Provides methods for accessing user data and authenticating users.
42
+
43
+ ## Contributing
44
+
45
+ We're actively developing this package but are not currently accepting third-party contributions. If you'd like to request any changes or additions to the package, submit a feature request via the [Canva Developers Community](https://community.canva.dev/).
46
+
47
+ ## License
48
+
49
+ See the `LICENSE.md` file.
package/index.d.ts CHANGED
@@ -61,6 +61,10 @@ export declare type ErrorCode =
61
61
  * The specified resource was not found
62
62
  */
63
63
  | "NOT_FOUND"
64
+ /**
65
+ * The specified operation was not allowed
66
+ */
67
+ | "NOT_ALLOWED"
64
68
  /**
65
69
  * The operation exceeded the maximum allowed time to complete.
66
70
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canva/error",
3
- "version": "0.0.1-rc.1",
3
+ "version": "1.1.0",
4
4
  "description": "The Canva Apps SDK error library",
5
5
  "author": "Canva Pty Ltd.",
6
6
  "license": "SEE LICENSE IN LICENSE.md FILE",