@animaapp/anima-sdk-react 0.7.3 → 0.9.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/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ import { AnimaFiles } from '@animaapp/anima-sdk';
2
2
  import { AnimaSDKResult } from '@animaapp/anima-sdk';
3
3
  import { CodegenError } from '@animaapp/anima-sdk';
4
4
  import { Context } from 'react';
5
+ import { FigmaRestApi } from '@animaapp/anima-sdk';
5
6
  import { GetCodeFromWebsiteParams } from '@animaapp/anima-sdk';
6
7
  import { GetCodeParams } from '@animaapp/anima-sdk';
7
8
  import { GetFileResponse } from '@figma/rest-api-spec';
@@ -15,9 +16,10 @@ export declare const AnimaSdkContext: Context<AnimaSdkContextType | null>;
15
16
  declare type AnimaSdkContextType = {
16
17
  createJob: <T extends UseAnimaParams = UseAnimaParams>(type: JobType, params: T) => Promise<void>;
17
18
  job: Job;
19
+ figmaRestApi: FigmaRestApi;
18
20
  };
19
21
 
20
- export declare function AnimaSdkProvider({ f2cUrl, l2cUrl, p2cUrl, children }: Props): JSX.Element;
22
+ export declare function AnimaSdkProvider({ figmaRestApi, f2cUrl, l2cUrl, p2cUrl, children }: Props): JSX.Element;
21
23
 
22
24
  export declare class CreateJobError extends Error {
23
25
  constructor(message: string, cause: unknown);
@@ -66,6 +68,7 @@ declare type LocalAssetsStorage = {
66
68
  };
67
69
 
68
70
  declare type Props = {
71
+ figmaRestApi: FigmaRestApi;
69
72
  f2cUrl: string;
70
73
  l2cUrl: string;
71
74
  p2cUrl: string;
@@ -122,7 +125,7 @@ export declare function useAnimaSDK(): AnimaSdkContextType;
122
125
 
123
126
  export declare const useFigmaFile: ({ fileKey, authToken, enabled, params, }: {
124
127
  fileKey: string;
125
- authToken: string;
128
+ authToken?: string;
126
129
  enabled?: boolean;
127
130
  params?: {
128
131
  depth?: number;