@websolutespa/test 3.0.0 → 3.0.2

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/CHANGELOG.md CHANGED
@@ -1,62 +1,74 @@
1
- # @websolutespa/test
2
-
3
- ## 3.0.0
4
-
5
- ### Major Changes
6
-
7
- - Release: Bom 3.0
8
-
9
- ## 1.7.3
10
-
11
- ### Patch Changes
12
-
13
- - Updating: jest dependencies
14
-
15
- ## 1.7.2
16
-
17
- ### Patch Changes
18
-
19
- - Fixing: downgrading eslint to v8.56.0
20
-
21
- ## 1.7.1
22
-
23
- ### Patch Changes
24
-
25
- - Updating: dependencies
26
-
27
- ## 1.7.0
28
-
29
- ### Minor Changes
30
-
31
- - 28e86bd: Updating: dependencies
32
-
33
- ## 0.1.1
34
-
35
- ### Patch Changes
36
-
37
- - 11b63e3b: Fixed test config
38
- - c7a99a2b: Updated test config
39
-
40
- ## 0.1.0
41
-
42
- ### Minor Changes
43
-
44
- - Updating: next 13.
45
-
46
- ## 0.0.4
47
-
48
- ### Patch Changes
49
-
50
- - Added: js, jsx support.
51
-
52
- ## 0.0.3
53
-
54
- ### Patch Changes
55
-
56
- - Fixing: package.json.
57
-
58
- ## 0.0.2
59
-
60
- ### Patch Changes
61
-
62
- - Added: first release.
1
+ # @websolutespa/test
2
+
3
+ ## 3.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixing: payload exports
8
+
9
+ ## 3.0.1
10
+
11
+ ### Patch Changes
12
+
13
+ - Updating: dependencies
14
+
15
+ ## 3.0.0
16
+
17
+ ### Major Changes
18
+
19
+ - Release: Bom 3.0
20
+
21
+ ## 1.7.3
22
+
23
+ ### Patch Changes
24
+
25
+ - Updating: jest dependencies
26
+
27
+ ## 1.7.2
28
+
29
+ ### Patch Changes
30
+
31
+ - Fixing: downgrading eslint to v8.56.0
32
+
33
+ ## 1.7.1
34
+
35
+ ### Patch Changes
36
+
37
+ - Updating: dependencies
38
+
39
+ ## 1.7.0
40
+
41
+ ### Minor Changes
42
+
43
+ - 28e86bd: Updating: dependencies
44
+
45
+ ## 0.1.1
46
+
47
+ ### Patch Changes
48
+
49
+ - 11b63e3b: Fixed test config
50
+ - c7a99a2b: Updated test config
51
+
52
+ ## 0.1.0
53
+
54
+ ### Minor Changes
55
+
56
+ - Updating: next 13.
57
+
58
+ ## 0.0.4
59
+
60
+ ### Patch Changes
61
+
62
+ - Added: js, jsx support.
63
+
64
+ ## 0.0.3
65
+
66
+ ### Patch Changes
67
+
68
+ - Fixing: package.json.
69
+
70
+ ## 0.0.2
71
+
72
+ ### Patch Changes
73
+
74
+ - Added: first release.
@@ -0,0 +1,40 @@
1
+ import { createRequire } from "node:module";
2
+
3
+ //#region rolldown:runtime
4
+ var __create = Object.create;
5
+ var __defProp = Object.defineProperty;
6
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getProtoOf = Object.getPrototypeOf;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __esm = (fn, res) => function() {
11
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
12
+ };
13
+ var __commonJS = (cb, mod) => function() {
14
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
15
+ };
16
+ var __export = (target, all) => {
17
+ for (var name in all) __defProp(target, name, {
18
+ get: all[name],
19
+ enumerable: true
20
+ });
21
+ };
22
+ var __copyProps = (to, from, except, desc) => {
23
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
24
+ key = keys[i];
25
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
26
+ get: ((k) => from[k]).bind(null, key),
27
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
28
+ });
29
+ }
30
+ return to;
31
+ };
32
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
33
+ value: mod,
34
+ enumerable: true
35
+ }) : target, mod));
36
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
37
+ var __require = /* @__PURE__ */ createRequire(import.meta.url);
38
+
39
+ //#endregion
40
+ export { __commonJS, __esm, __export, __require, __toCommonJS, __toESM };
@@ -0,0 +1,147 @@
1
+ import { CollectionSlug, Config, JoinQuery, Payload, PopulateType, SanitizedConfig, SelectType, Where } from "payload";
2
+
3
+ //#region src/payload/client.d.ts
4
+ type ValidPath = `/${string}`;
5
+ type FileArg = {
6
+ file?: Omit<File, 'webkitRelativePath'>;
7
+ };
8
+ type RequestQuery = {
9
+ [key: string]: unknown;
10
+ } & {
11
+ depth?: number;
12
+ fallbackLocale?: string;
13
+ joins?: JoinQuery;
14
+ limit?: number;
15
+ locale?: string;
16
+ page?: number;
17
+ populate?: PopulateType;
18
+ select?: SelectType;
19
+ sort?: string;
20
+ where?: Where;
21
+ };
22
+ type RequestOptions = {
23
+ auth?: boolean;
24
+ query?: RequestQuery;
25
+ };
26
+ type ClientRequestOptions = FileArg & RequestInit & RequestOptions;
27
+ type NextRoute = (request: Request, args: {
28
+ params: Promise<{
29
+ slug: string[];
30
+ }>;
31
+ }) => Promise<Response>;
32
+ declare class RestClient {
33
+ private readonly config;
34
+ serverURL: string;
35
+ private token;
36
+ private getRest_;
37
+ private postRest_;
38
+ private putRest_;
39
+ private patchRest_;
40
+ private deleteRest_;
41
+ private postGraphql_;
42
+ constructor(config: SanitizedConfig);
43
+ private getHeaders;
44
+ private getPathParts;
45
+ GET(path: ValidPath, options?: Omit<ClientRequestOptions, 'body' | 'file'>): Promise<Response>;
46
+ POST(path: ValidPath, options?: ClientRequestOptions): Promise<Response>;
47
+ PUT(path: ValidPath, options?: ClientRequestOptions): Promise<Response>;
48
+ PATCH(path: ValidPath, options?: ClientRequestOptions): Promise<Response>;
49
+ DELETE(path: ValidPath, options?: Omit<ClientRequestOptions, 'file'>): Promise<Response>;
50
+ GRAPHQL_POST(options?: Omit<ClientRequestOptions, 'file'>): Promise<Response>;
51
+ get(path: string, options?: Omit<ClientRequestOptions, 'body' | 'file'>): Promise<{
52
+ [key: string]: any;
53
+ }>;
54
+ post(path: string, body: any, options?: ClientRequestOptions): Promise<{
55
+ [key: string]: any;
56
+ }>;
57
+ patch(path: string, body: any, options?: ClientRequestOptions): Promise<{
58
+ [key: string]: any;
59
+ }>;
60
+ delete(path: string, options?: Omit<ClientRequestOptions, 'body' | 'file'>): Promise<{
61
+ [key: string]: any;
62
+ }>;
63
+ getToken(slug?: CollectionSlug, credentials?: {
64
+ email: string;
65
+ password: string;
66
+ }): Promise<string>;
67
+ login({
68
+ slug,
69
+ credentials
70
+ }: {
71
+ slug: string;
72
+ credentials?: {
73
+ email: string;
74
+ password: string;
75
+ };
76
+ }): Promise<{
77
+ [key: string]: any;
78
+ }>;
79
+ }
80
+ //# sourceMappingURL=client.d.ts.map
81
+ //#endregion
82
+ //#region src/payload/config.d.ts
83
+ declare function getConfig(config: Partial<Config>): Promise<SanitizedConfig>;
84
+ //# sourceMappingURL=config.d.ts.map
85
+ //#endregion
86
+ //#region src/payload/context.d.ts
87
+ type TestContext = {
88
+ payload: Payload;
89
+ client: RestClient;
90
+ };
91
+ declare function getContext(userConfig: Partial<Config>): Promise<TestContext>;
92
+ declare function clearContext(context?: TestContext): Promise<void>;
93
+ //# sourceMappingURL=context.d.ts.map
94
+
95
+ //#endregion
96
+ //#region src/payload/seed.d.ts
97
+ /**
98
+ * Defaults user roles and endUser roles available on the bowl plugin configuration:
99
+ *
100
+ * admin: user role with super powers.
101
+ * contributor: user role with minor powers.
102
+ * editor: user role with content editing powers.
103
+ * guest: endUser role with application reading capabilities.
104
+ * user: endUser authenticated role with reserved data.
105
+ *
106
+ */
107
+ declare const roles: {
108
+ readonly Admin: "admin";
109
+ readonly Contributor: "contributor";
110
+ readonly Editor: "editor";
111
+ readonly Guest: "guest";
112
+ readonly User: "user";
113
+ };
114
+ declare const users: {
115
+ admin: {
116
+ email: string;
117
+ password: string;
118
+ roles: "admin"[];
119
+ };
120
+ editor: {
121
+ email: string;
122
+ password: string;
123
+ roles: "editor"[];
124
+ };
125
+ api: {
126
+ email: string;
127
+ password: string;
128
+ roles: "guest"[];
129
+ enableAPIKey: boolean;
130
+ apiKey: string;
131
+ };
132
+ };
133
+ declare const endUsers: {
134
+ user: {
135
+ email: string;
136
+ password: string;
137
+ roles: ("guest" | "user")[];
138
+ };
139
+ };
140
+ declare const seedUsers: (payload: Payload) => Promise<void>;
141
+ declare const seedEndUsers: (payload: Payload) => Promise<void>;
142
+ declare const seed: (payload: Payload) => Promise<void>;
143
+ //# sourceMappingURL=seed.d.ts.map
144
+
145
+ //#endregion
146
+ export { ClientRequestOptions, FileArg, NextRoute, RequestOptions, RequestQuery, RestClient, TestContext, ValidPath, clearContext, endUsers, getConfig, getContext, roles, seed, seedEndUsers, seedUsers, users };
147
+ //# sourceMappingURL=payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","names":[],"sources":["../../src/payload/client.ts","../../src/payload/config.ts","../../src/payload/context.ts","../../src/payload/seed.ts"],"sourcesContent":[],"mappings":";;;KAMY,SAAA;KAEA,OAAA;EAFA,IAAA,CAAA,EAGH,IAHG,CAGE,IAHO,EAAA,oBAAA,CAAA;AAErB,CAAA;AAAmB,KAIP,YAAA,GAJO;EAAA,CAAA,GACL,EAAA,MAAA,CAAA,EAAA,OAAA;CAAI,GAAA;EAAL,KAAA,CAAA,EAAA,MAAA;EAGD,cAAA,CAAY,EAAA,MAAA;EAAA,KAAA,CAAA,EAKd,SALc;EAAA,KAKd,CAAA,EAAA,MAAA;EAAS,MAIN,CAAA,EAAA,MAAA;EAAY,IACd,CAAA,EAAA,MAAA;EAAU,QAEX,CAAA,EAHG,YAGH;EAAK,MAAA,CAAA,EAFJ,UAE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