@malevich-studio/strapi-sdk-typescript 1.1.2 → 1.2.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
@@ -128,8 +128,8 @@ type DynamiczonePopulate<T> = {
128
128
  };
129
129
  declare class Strapi {
130
130
  private readonly url;
131
- private readonly token;
132
- constructor(url: string, token: string);
131
+ private readonly token?;
132
+ constructor(url: string, token?: string | undefined);
133
133
  fetch<T>(endpoint: string, data?: object | FormData, params?: RequestInit): Promise<Response<T>>;
134
134
  getLocales(params: RequestInit): Promise<Locale[]>;
135
135
  getDocuments<T, Q extends object>(endpoint: string, data?: Q, params?: RequestInit): Promise<Response<T[]>>;
@@ -137,15 +137,6 @@ declare class Strapi {
137
137
  create<T, Q extends object>(endpoint: string, data: Q, params?: RequestInit): Promise<Response<T>>;
138
138
  update<T, Q extends object>(endpoint: string, id: string, data: Q, params?: RequestInit): Promise<Response<T>>;
139
139
  delete<T>(endpoint: string, id: string, params?: RequestInit): Promise<Response<T>>;
140
- /**
141
- * For Node.js
142
- *
143
- * @param files list of files names which will be uploaded, example: ['/app/data/cover.js']
144
- */
145
- upload(files: {
146
- path: string;
147
- filename?: string;
148
- }[]): Promise<File[]>;
149
140
  uploadForm(form: FormData): Promise<File[]>;
150
141
  private baseFetch;
151
142
  }