@localazy/strapi-plugin 1.0.0-beta.1 → 1.0.0-beta.3

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 (39) hide show
  1. package/dist/_chunks/{App-BSFfgZKU.mjs → App-1cXVSnL0.mjs} +59 -32
  2. package/dist/_chunks/{App-D1QaIMHX.js → App-CU_T8iLT.js} +66 -39
  3. package/dist/_chunks/{ContentTransferSetup-DtjcF_jM.mjs → ContentTransferSetup-D2R15gJS.mjs} +27 -8
  4. package/dist/_chunks/{ContentTransferSetup-DHXJIxAp.js → ContentTransferSetup-DTcnul1w.js} +27 -8
  5. package/dist/_chunks/{GlobalSettings-BcdibqNS.mjs → GlobalSettings-7pI5vIna.mjs} +8 -5
  6. package/dist/_chunks/{GlobalSettings-BON3kjHK.js → GlobalSettings-D_jeqPWF.js} +8 -5
  7. package/dist/_chunks/{LanguagesSelector-fyAIUp7M.mjs → LanguagesSelector-D2AP7FE0.mjs} +2 -2
  8. package/dist/_chunks/{LanguagesSelector-BeijBEjg.js → LanguagesSelector-DU5YJVQa.js} +2 -2
  9. package/dist/_chunks/{has-model-changed-BMCQX2Dd.js → has-model-changed-9PCipZvK.js} +2 -2
  10. package/dist/_chunks/{has-model-changed-Dvtzpc9v.mjs → has-model-changed-wAFZY5Ma.mjs} +2 -2
  11. package/dist/_chunks/{index-CN3Gyh5F.mjs → index-CT0CH6N8.mjs} +19 -43
  12. package/dist/_chunks/{index-BQw2qi2G.js → index-Ca5_8RSo.js} +18 -42
  13. package/dist/_chunks/{isEqual-B-YVnzrp.js → isEqual--zmPN5yr.js} +1 -1
  14. package/dist/_chunks/{isEqual-CEyT97-3.mjs → isEqual-DPUlu6B0.mjs} +1 -1
  15. package/dist/_chunks/{set-DulHAQhq.mjs → set-BkLLlpnD.mjs} +4 -1
  16. package/dist/_chunks/{set-DUdH3vE5.js → set-DDy9ZASU.js} +4 -1
  17. package/dist/admin/index.js +1 -1
  18. package/dist/admin/index.mjs +1 -1
  19. package/dist/admin/src/modules/@common/utils/iso-locales-utils.d.ts +3 -3
  20. package/dist/admin/src/modules/plugin-settings/locale/en.d.ts +3 -0
  21. package/dist/admin/src/modules/plugin-settings/models/admin-panel-user.d.ts +11 -0
  22. package/dist/admin/src/modules/plugin-settings/services/strapi-users-service.d.ts +2 -1
  23. package/dist/admin/src/state/localazy-identity.d.ts +2 -0
  24. package/dist/server/index.js +236 -159
  25. package/dist/server/index.mjs +236 -159
  26. package/dist/server/src/core/index.d.ts +3 -3
  27. package/dist/server/src/index.d.ts +20 -5
  28. package/dist/server/src/lifecycles/deprecate-event-entry-in-localazy-hook.d.ts +2 -1
  29. package/dist/server/src/lifecycles/upload-event-entry-to-localazy-hook.d.ts +2 -1
  30. package/dist/server/src/middlewares/index.d.ts +5 -1
  31. package/dist/server/src/middlewares/verify-webhook.d.ts +5 -0
  32. package/dist/server/src/models/plugin/hook-params.d.ts +6 -0
  33. package/dist/server/src/routes/index.d.ts +12 -1
  34. package/dist/server/src/routes/localazy-public-transfer-routes.d.ts +11 -0
  35. package/dist/server/src/services/index.d.ts +3 -3
  36. package/dist/server/src/services/localazy-pubapi-service.d.ts +6 -5
  37. package/dist/server/src/utils/get-picked-flatten-keys-for-hook-entry.d.ts +4 -2
  38. package/package.json +1 -1
  39. package/dist/admin/src/modules/@common/utils/is-plugin-route.d.ts +0 -2
@@ -4,11 +4,11 @@ export declare const getLocalazyUserService: () => {
4
4
  deleteUser(): Promise<import("../db/model/localazy-user").Identity>;
5
5
  };
6
6
  export declare const getLocalazyPubAPIService: () => {
7
- listFiles(projectId: any): Promise<import("@localazy/api-client").File[]>;
8
- getStrapiFile(projectId: any): Promise<import("@localazy/api-client").File>;
7
+ listFiles(projectId: string): Promise<import("@localazy/api-client").File[]>;
8
+ getStrapiFile(projectId: string): Promise<import("@localazy/api-client").File>;
9
9
  listProjects(addOrganization?: boolean, addLanguages?: boolean): Promise<import("@localazy/api-client").Project[]>;
10
10
  getProject(projectId: string, addOrganization?: boolean, addLanguages?: boolean): Promise<import("@localazy/api-client").Project>;
11
- getWebhooksSecret(projectId: any): Promise<string>;
11
+ getWebhooksSecret(projectId: string): Promise<string>;
12
12
  };
13
13
  export declare const getLocalazyTransferUploadService: () => {
14
14
  upload({ notificationService }: {
@@ -69,7 +69,6 @@ declare const _default: {
69
69
  };
70
70
  routes: {
71
71
  'content-api': {
72
- type: string;
73
72
  routes: {
74
73
  method: string;
75
74
  path: string;
@@ -90,6 +89,18 @@ declare const _default: {
90
89
  };
91
90
  }[];
92
91
  };
92
+ LocalazyPublicTransferRoutes: {
93
+ routes: {
94
+ method: string;
95
+ path: string;
96
+ handler: string;
97
+ config: {
98
+ policies: any[];
99
+ auth: boolean;
100
+ middlewares: string[];
101
+ };
102
+ }[];
103
+ };
93
104
  };
94
105
  services: {
95
106
  LocalazyUserService: ({ strapi }: {
@@ -109,11 +120,11 @@ declare const _default: {
109
120
  LocalazyPubAPIService: ({ strapi }: {
110
121
  strapi: import("@strapi/types/dist/core").Strapi;
111
122
  }) => {
112
- listFiles(projectId: any): Promise<import("@localazy/api-client").File[]>;
113
- getStrapiFile(projectId: any): Promise<import("@localazy/api-client").File>;
123
+ listFiles(projectId: string): Promise<import("@localazy/api-client").File[]>;
124
+ getStrapiFile(projectId: string): Promise<import("@localazy/api-client").File>;
114
125
  listProjects(addOrganization?: boolean, addLanguages?: boolean): Promise<import("@localazy/api-client").Project[]>;
115
126
  getProject(projectId: string, addOrganization?: boolean, addLanguages?: boolean): Promise<import("@localazy/api-client").Project>;
116
- getWebhooksSecret(projectId: any): Promise<string>;
127
+ getWebhooksSecret(projectId: string): Promise<string>;
117
128
  };
118
129
  PluginSettingsService: ({ strapi }: {
119
130
  strapi: import("@strapi/types/dist/core").Strapi;
@@ -184,6 +195,10 @@ declare const _default: {
184
195
  };
185
196
  contentTypes: {};
186
197
  policies: {};
187
- middlewares: {};
198
+ middlewares: {
199
+ verifyWebhook: (config: any, { strapi }: {
200
+ strapi: import("@strapi/types/dist/core").Strapi;
201
+ }) => (ctx: any, next: any) => Promise<void>;
202
+ };
188
203
  };
189
204
  export default _default;
@@ -1,4 +1,5 @@
1
- declare const _default: (event: any) => Promise<{
1
+ import type { HookParams } from '../models/plugin/hook-params';
2
+ declare const _default: (params: HookParams) => Promise<{
2
3
  success: boolean;
3
4
  }>;
4
5
  export default _default;
@@ -1,4 +1,5 @@
1
- declare const _default: (event: any) => Promise<{
1
+ import type { HookParams } from '../models/plugin/hook-params';
2
+ declare const _default: (params: HookParams) => Promise<{
2
3
  success: boolean;
3
4
  result: import("@localazy/api-client").File & {
4
5
  importBatch: string;
@@ -1,2 +1,6 @@
1
- declare const _default: {};
1
+ declare const _default: {
2
+ verifyWebhook: (config: any, { strapi }: {
3
+ strapi: import("@strapi/types/dist/core").Strapi;
4
+ }) => (ctx: any, next: any) => Promise<void>;
5
+ };
2
6
  export default _default;
@@ -0,0 +1,5 @@
1
+ import type { Core } from '@strapi/strapi';
2
+ declare const _default: (config: any, { strapi }: {
3
+ strapi: Core.Strapi;
4
+ }) => (ctx: any, next: any) => Promise<void>;
5
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import type { Context } from '@strapi/types/dist/modules/documents/middleware';
2
+ export type HookParams = {
3
+ context: Context;
4
+ documentId: string;
5
+ locale: string;
6
+ };
@@ -1,6 +1,5 @@
1
1
  declare const _default: {
2
2
  'content-api': {
3
- type: string;
4
3
  routes: {
5
4
  method: string;
6
5
  path: string;
@@ -21,5 +20,17 @@ declare const _default: {
21
20
  };
22
21
  }[];
23
22
  };
23
+ LocalazyPublicTransferRoutes: {
24
+ routes: {
25
+ method: string;
26
+ path: string;
27
+ handler: string;
28
+ config: {
29
+ policies: any[];
30
+ auth: boolean;
31
+ middlewares: string[];
32
+ };
33
+ }[];
34
+ };
24
35
  };
25
36
  export default _default;
@@ -0,0 +1,11 @@
1
+ declare const LocalazyPublicTransferRoutes: {
2
+ method: string;
3
+ path: string;
4
+ handler: string;
5
+ config: {
6
+ policies: any[];
7
+ auth: boolean;
8
+ middlewares: string[];
9
+ };
10
+ }[];
11
+ export default LocalazyPublicTransferRoutes;
@@ -16,11 +16,11 @@ declare const _default: {
16
16
  LocalazyPubAPIService: ({ strapi }: {
17
17
  strapi: import("@strapi/types/dist/core").Strapi;
18
18
  }) => {
19
- listFiles(projectId: any): Promise<import("@localazy/api-client").File[]>;
20
- getStrapiFile(projectId: any): Promise<import("@localazy/api-client").File>;
19
+ listFiles(projectId: string): Promise<import("@localazy/api-client").File[]>;
20
+ getStrapiFile(projectId: string): Promise<import("@localazy/api-client").File>;
21
21
  listProjects(addOrganization?: boolean, addLanguages?: boolean): Promise<import("@localazy/api-client").Project[]>;
22
22
  getProject(projectId: string, addOrganization?: boolean, addLanguages?: boolean): Promise<import("@localazy/api-client").Project>;
23
- getWebhooksSecret(projectId: any): Promise<string>;
23
+ getWebhooksSecret(projectId: string): Promise<string>;
24
24
  };
25
25
  PluginSettingsService: ({ strapi }: {
26
26
  strapi: import("@strapi/types/dist/core").Strapi;
@@ -1,12 +1,13 @@
1
1
  import { Core } from '@strapi/strapi';
2
+ import { Project } from '@localazy/api-client';
2
3
  declare const LocalazyPubAPIService: ({ strapi }: {
3
4
  strapi: Core.Strapi;
4
5
  }) => {
5
- listFiles(projectId: any): Promise<import("@localazy/api-client").File[]>;
6
- getStrapiFile(projectId: any): Promise<import("@localazy/api-client").File>;
7
- listProjects(addOrganization?: boolean, addLanguages?: boolean): Promise<import("@localazy/api-client").Project[]>;
8
- getProject(projectId: string, addOrganization?: boolean, addLanguages?: boolean): Promise<import("@localazy/api-client").Project>;
9
- getWebhooksSecret(projectId: any): Promise<string>;
6
+ listFiles(projectId: string): Promise<import("@localazy/api-client").File[]>;
7
+ getStrapiFile(projectId: string): Promise<import("@localazy/api-client").File>;
8
+ listProjects(addOrganization?: boolean, addLanguages?: boolean): Promise<Project[]>;
9
+ getProject(projectId: string, addOrganization?: boolean, addLanguages?: boolean): Promise<Project | null>;
10
+ getWebhooksSecret(projectId: string): Promise<string>;
10
11
  };
11
12
  export type LocalazyPubAPIServiceReturnType = ReturnType<typeof LocalazyPubAPIService>;
12
13
  export default LocalazyPubAPIService;
@@ -1,5 +1,7 @@
1
- declare const _default: (event: any) => Promise<{
1
+ import type { HookParams } from '../models/plugin/hook-params';
2
+ declare const _default: (params: HookParams) => Promise<{
2
3
  pickedFlatten: Record<string, any>;
3
- eventEntryLocale: any;
4
+ eventEntryLocale: string;
5
+ projectSourceLanguageCode: string;
4
6
  }>;
5
7
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@localazy/strapi-plugin",
3
- "version": "1.0.0-beta.1",
3
+ "version": "1.0.0-beta.3",
4
4
  "description": "The official Strapi Plugin by Localazy.",
5
5
  "keywords": [
6
6
  "strapi",
@@ -1,2 +0,0 @@
1
- declare const _default: (location: Pick<Location, 'pathname'>, path?: string) => boolean;
2
- export default _default;