@webiny/api-file-manager 5.40.5 → 5.41.0-dbt.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.
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import { AssetContentsReader, AssetOutputStrategy } from "..";
3
- declare type Setter<T> = (arg: T | undefined) => T;
3
+ type Setter<T> = (arg: T | undefined) => T;
4
4
  export interface AssetData {
5
5
  id: string;
6
6
  tenant: string;
@@ -1,18 +1,18 @@
1
1
  import { Plugin } from "@webiny/plugins";
2
2
  import { AssetRequestResolver, AssetResolver, AssetProcessor, AssetOutputStrategy, AssetRequest, Asset, AssetTransformationStrategy, ResponseHeadersSetter } from "..";
3
3
  import { FileManagerContext } from "../../types";
4
- declare type Setter<TParams, TReturn> = (params: TParams) => TReturn;
5
- export declare type AssetRequestResolverDecorator = Setter<{
4
+ type Setter<TParams, TReturn> = (params: TParams) => TReturn;
5
+ export type AssetRequestResolverDecorator = Setter<{
6
6
  assetRequestResolver: AssetRequestResolver;
7
7
  }, AssetRequestResolver>;
8
- export declare type AssetResolverDecorator = Setter<{
8
+ export type AssetResolverDecorator = Setter<{
9
9
  assetResolver: AssetResolver;
10
10
  }, AssetResolver>;
11
- export declare type AssetProcessorDecorator = Setter<{
11
+ export type AssetProcessorDecorator = Setter<{
12
12
  context: FileManagerContext;
13
13
  assetProcessor: AssetProcessor;
14
14
  }, AssetProcessor>;
15
- export declare type AssetTransformationDecorator = Setter<{
15
+ export type AssetTransformationDecorator = Setter<{
16
16
  context: FileManagerContext;
17
17
  assetTransformationStrategy: AssetTransformationStrategy;
18
18
  }, AssetTransformationStrategy>;
@@ -22,7 +22,7 @@ export interface AssetOutputStrategyDecoratorParams {
22
22
  asset: Asset;
23
23
  assetOutputStrategy: AssetOutputStrategy;
24
24
  }
25
- export declare type AssetOutputStrategyDecorator = Setter<AssetOutputStrategyDecoratorParams, AssetOutputStrategy>;
25
+ export type AssetOutputStrategyDecorator = Setter<AssetOutputStrategyDecoratorParams, AssetOutputStrategy>;
26
26
  export declare class AssetDeliveryConfigBuilder {
27
27
  private assetRequestResolverDecorators;
28
28
  private assetResolverDecorators;
@@ -1,8 +1,9 @@
1
+ import { GenericRecord } from "@webiny/api/types";
1
2
  export interface AssetRequestOptions {
2
3
  original?: boolean;
3
4
  width?: number;
4
5
  }
5
- export declare type AssetRequestContext<T extends Record<string, any> = Record<string, any>> = T & {
6
+ export type AssetRequestContext<T extends GenericRecord = GenericRecord> = T & {
6
7
  /**
7
8
  * Asset request URL.
8
9
  */
@@ -19,6 +20,6 @@ export declare class AssetRequest<TOptions extends AssetRequestOptions = AssetRe
19
20
  getKey(): string;
20
21
  getOptions(): TOptions;
21
22
  setOptions(options: TOptions): void;
22
- getContext<T>(): AssetRequestContext<T>;
23
+ getContext<T extends GenericRecord = GenericRecord>(): AssetRequestContext<T>;
23
24
  getExtension(): string | undefined;
24
25
  }
@@ -1 +1 @@
1
- {"version":3,"names":["AssetRequest","constructor","data","getKey","key","getOptions","options","setOptions","getContext","context","getExtension","split","pop","exports"],"sources":["AssetRequest.ts"],"sourcesContent":["export interface AssetRequestOptions {\n original?: boolean;\n width?: number;\n}\n\nexport type AssetRequestContext<T extends Record<string, any> = Record<string, any>> = T & {\n /**\n * Asset request URL.\n */\n url: string;\n};\n\nexport interface AssetRequestData<TOptions> {\n key: string;\n context: AssetRequestContext;\n options: TOptions;\n}\n\nexport class AssetRequest<TOptions extends AssetRequestOptions = AssetRequestOptions> {\n private data: AssetRequestData<TOptions>;\n\n constructor(data: AssetRequestData<TOptions>) {\n this.data = data;\n }\n\n getKey() {\n return this.data.key;\n }\n\n getOptions(): TOptions {\n return this.data.options;\n }\n\n setOptions(options: TOptions) {\n this.data.options = options;\n }\n\n getContext<T>() {\n return this.data.context as AssetRequestContext<T>;\n }\n\n getExtension() {\n return this.data.key.split(\".\").pop();\n }\n}\n"],"mappings":";;;;;;AAkBO,MAAMA,YAAY,CAA6D;EAGlFC,WAAWA,CAACC,IAAgC,EAAE;IAC1C,IAAI,CAACA,IAAI,GAAGA,IAAI;EACpB;EAEAC,MAAMA,CAAA,EAAG;IACL,OAAO,IAAI,CAACD,IAAI,CAACE,GAAG;EACxB;EAEAC,UAAUA,CAAA,EAAa;IACnB,OAAO,IAAI,CAACH,IAAI,CAACI,OAAO;EAC5B;EAEAC,UAAUA,CAACD,OAAiB,EAAE;IAC1B,IAAI,CAACJ,IAAI,CAACI,OAAO,GAAGA,OAAO;EAC/B;EAEAE,UAAUA,CAAA,EAAM;IACZ,OAAO,IAAI,CAACN,IAAI,CAACO,OAAO;EAC5B;EAEAC,YAAYA,CAAA,EAAG;IACX,OAAO,IAAI,CAACR,IAAI,CAACE,GAAG,CAACO,KAAK,CAAC,GAAG,CAAC,CAACC,GAAG,CAAC,CAAC;EACzC;AACJ;AAACC,OAAA,CAAAb,YAAA,GAAAA,YAAA","ignoreList":[]}
1
+ {"version":3,"names":["AssetRequest","constructor","data","getKey","key","getOptions","options","setOptions","getContext","context","getExtension","split","pop","exports"],"sources":["AssetRequest.ts"],"sourcesContent":["import { GenericRecord } from \"@webiny/api/types\";\n\nexport interface AssetRequestOptions {\n original?: boolean;\n width?: number;\n}\n\nexport type AssetRequestContext<T extends GenericRecord = GenericRecord> = T & {\n /**\n * Asset request URL.\n */\n url: string;\n};\n\nexport interface AssetRequestData<TOptions> {\n key: string;\n context: AssetRequestContext;\n options: TOptions;\n}\n\nexport class AssetRequest<TOptions extends AssetRequestOptions = AssetRequestOptions> {\n private data: AssetRequestData<TOptions>;\n\n constructor(data: AssetRequestData<TOptions>) {\n this.data = data;\n }\n\n getKey() {\n return this.data.key;\n }\n\n getOptions(): TOptions {\n return this.data.options;\n }\n\n setOptions(options: TOptions) {\n this.data.options = options;\n }\n\n getContext<T extends GenericRecord = GenericRecord>() {\n return this.data.context as AssetRequestContext<T>;\n }\n\n getExtension() {\n return this.data.key.split(\".\").pop();\n }\n}\n"],"mappings":";;;;;;AAoBO,MAAMA,YAAY,CAA6D;EAGlFC,WAAWA,CAACC,IAAgC,EAAE;IAC1C,IAAI,CAACA,IAAI,GAAGA,IAAI;EACpB;EAEAC,MAAMA,CAAA,EAAG;IACL,OAAO,IAAI,CAACD,IAAI,CAACE,GAAG;EACxB;EAEAC,UAAUA,CAAA,EAAa;IACnB,OAAO,IAAI,CAACH,IAAI,CAACI,OAAO;EAC5B;EAEAC,UAAUA,CAACD,OAAiB,EAAE;IAC1B,IAAI,CAACJ,IAAI,CAACI,OAAO,GAAGA,OAAO;EAC/B;EAEAE,UAAUA,CAAA,EAA4C;IAClD,OAAO,IAAI,CAACN,IAAI,CAACO,OAAO;EAC5B;EAEAC,YAAYA,CAAA,EAAG;IACX,OAAO,IAAI,CAACR,IAAI,CAACE,GAAG,CAACO,KAAK,CAAC,GAAG,CAAC,CAACC,GAAG,CAAC,CAAC;EACzC;AACJ;AAACC,OAAA,CAAAb,YAAA,GAAAA,YAAA","ignoreList":[]}
@@ -3,4 +3,4 @@ import { AssetDeliveryConfigModifierPlugin } from "./index";
3
3
  export interface AssetDeliveryParams {
4
4
  documentClient: DynamoDBDocument;
5
5
  }
6
- export declare const setupAssetDelivery: (params: AssetDeliveryParams) => (AssetDeliveryConfigModifierPlugin | import("@webiny/handler").ModifyFastifyPlugin)[];
6
+ export declare const setupAssetDelivery: (params: AssetDeliveryParams) => (import("@webiny/handler").ModifyFastifyPlugin | AssetDeliveryConfigModifierPlugin)[];
@@ -7,5 +7,5 @@ export declare const emptyResolver: () => {};
7
7
  interface ResolveCallable {
8
8
  (): Promise<any>;
9
9
  }
10
- export declare const resolve: (fn: ResolveCallable) => Promise<Response<any> | ErrorResponse>;
10
+ export declare const resolve: (fn: ResolveCallable) => Promise<ErrorResponse | Response<any>>;
11
11
  export {};
package/index.d.ts CHANGED
@@ -7,4 +7,4 @@ export * from "./plugins";
7
7
  export * from "./delivery";
8
8
  export declare const createFileManagerContext: ({ storageOperations }: Pick<FileManagerConfig, "storageOperations">) => ContextPlugin<FileManagerContext>;
9
9
  export declare const createFileManagerGraphQL: () => (import("@webiny/handler-graphql").GraphQLSchemaPlugin<FileManagerContext> | ContextPlugin<FileManagerContext>)[];
10
- export declare const createAssetDelivery: (config: AssetDeliveryParams) => (import("./delivery").AssetDeliveryConfigModifierPlugin | import("@webiny/handler").ModifyFastifyPlugin)[];
10
+ export declare const createAssetDelivery: (config: AssetDeliveryParams) => (import("@webiny/handler").ModifyFastifyPlugin | import("./delivery").AssetDeliveryConfigModifierPlugin)[];
@@ -1,7 +1,7 @@
1
1
  import { Plugin } from "@webiny/plugins";
2
2
  import { CmsModelField as BaseModelField } from "@webiny/api-headless-cms/types";
3
3
  import { CmsPrivateModelFull } from "@webiny/api-headless-cms";
4
- declare type CmsModelField = Omit<BaseModelField, "storageId"> & {
4
+ type CmsModelField = Omit<BaseModelField, "storageId"> & {
5
5
  bulkEdit?: boolean;
6
6
  };
7
7
  declare class CmsModelFieldsModifier {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/api-file-manager",
3
- "version": "5.40.5",
3
+ "version": "5.41.0-dbt.0",
4
4
  "main": "index.js",
5
5
  "keywords": [
6
6
  "fm:base"
@@ -20,20 +20,20 @@
20
20
  "dependencies": {
21
21
  "@babel/runtime": "7.24.1",
22
22
  "@commodo/fields": "1.1.2-beta.20",
23
- "@webiny/api": "5.40.5",
24
- "@webiny/api-headless-cms": "5.40.5",
25
- "@webiny/api-security": "5.40.5",
26
- "@webiny/api-tenancy": "5.40.5",
27
- "@webiny/aws-sdk": "5.40.5",
28
- "@webiny/error": "5.40.5",
29
- "@webiny/handler": "5.40.5",
30
- "@webiny/handler-aws": "5.40.5",
31
- "@webiny/handler-graphql": "5.40.5",
32
- "@webiny/plugins": "5.40.5",
33
- "@webiny/project-utils": "5.40.5",
34
- "@webiny/pubsub": "5.40.5",
35
- "@webiny/tasks": "5.40.5",
36
- "@webiny/validation": "5.40.5",
23
+ "@webiny/api": "5.41.0-dbt.0",
24
+ "@webiny/api-headless-cms": "5.41.0-dbt.0",
25
+ "@webiny/api-security": "5.41.0-dbt.0",
26
+ "@webiny/api-tenancy": "5.41.0-dbt.0",
27
+ "@webiny/aws-sdk": "5.41.0-dbt.0",
28
+ "@webiny/error": "5.41.0-dbt.0",
29
+ "@webiny/handler": "5.41.0-dbt.0",
30
+ "@webiny/handler-aws": "5.41.0-dbt.0",
31
+ "@webiny/handler-graphql": "5.41.0-dbt.0",
32
+ "@webiny/plugins": "5.41.0-dbt.0",
33
+ "@webiny/project-utils": "5.41.0-dbt.0",
34
+ "@webiny/pubsub": "5.41.0-dbt.0",
35
+ "@webiny/tasks": "5.41.0-dbt.0",
36
+ "@webiny/validation": "5.41.0-dbt.0",
37
37
  "cache-control-parser": "2.0.6",
38
38
  "lodash": "4.17.21",
39
39
  "object-hash": "3.0.0"
@@ -46,13 +46,13 @@
46
46
  "@babel/preset-env": "7.24.3",
47
47
  "@babel/preset-typescript": "7.24.1",
48
48
  "@types/sharp": "0.32.0",
49
- "@webiny/api-i18n": "5.40.5",
50
- "@webiny/cli": "5.40.5",
51
- "@webiny/utils": "5.40.5",
49
+ "@webiny/api-i18n": "5.41.0-dbt.0",
50
+ "@webiny/cli": "5.41.0-dbt.0",
51
+ "@webiny/utils": "5.41.0-dbt.0",
52
52
  "jest": "29.7.0",
53
53
  "rimraf": "5.0.5",
54
54
  "ttypescript": "1.5.15",
55
- "typescript": "4.7.4"
55
+ "typescript": "4.9.5"
56
56
  },
57
57
  "publishConfig": {
58
58
  "access": "public",
@@ -72,5 +72,5 @@
72
72
  ]
73
73
  }
74
74
  },
75
- "gitHead": "f67778732392ed88f28da869ddacbf08a98cdec6"
75
+ "gitHead": "bbaec4dd1685579548c08bbde386aee5d96b80f8"
76
76
  }
@@ -1,7 +1,7 @@
1
1
  /// <reference types="node" />
2
2
  import { FileManagerContext } from "../types";
3
3
  import { FilePhysicalStoragePlugin } from "../plugins/FilePhysicalStoragePlugin";
4
- export declare type Result = Record<string, any>;
4
+ export type Result = Record<string, any>;
5
5
  export interface FileStorageUploadParams {
6
6
  buffer: Buffer;
7
7
  hideInFileManager: boolean | string;
package/types/file.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- declare type PublicAccess = {
1
+ type PublicAccess = {
2
2
  type: "public";
3
3
  };
4
- declare type PrivateAuthenticatedAccess = {
4
+ type PrivateAuthenticatedAccess = {
5
5
  type: "private-authenticated";
6
6
  };
7
7
  export interface File {
package/types.d.ts CHANGED
@@ -114,7 +114,7 @@ export interface OnSettingsAfterUpdateTopicParams {
114
114
  original: FileManagerSettings;
115
115
  settings: FileManagerSettings;
116
116
  }
117
- export declare type SettingsCRUD = {
117
+ export type SettingsCRUD = {
118
118
  getSettings(): Promise<FileManagerSettings | null>;
119
119
  createSettings(data?: Partial<FileManagerSettings>): Promise<FileManagerSettings>;
120
120
  updateSettings(data: Partial<FileManagerSettings>): Promise<FileManagerSettings>;
@@ -301,7 +301,7 @@ export interface FileManagerFilesStorageOperationsListResponseMeta {
301
301
  totalCount: number;
302
302
  cursor: string | null;
303
303
  }
304
- export declare type FileManagerFilesStorageOperationsListResponse = [
304
+ export type FileManagerFilesStorageOperationsListResponse = [
305
305
  File[],
306
306
  FileManagerFilesStorageOperationsListResponseMeta
307
307
  ];