@mustafaaksoy41/sharepoint-kit 0.1.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/README.md +293 -0
- package/dist/bin/sp-generate-types.js +784 -0
- package/dist/bin/sp-generate-types.js.map +1 -0
- package/dist/chunk-2FU6XS6S.cjs +142 -0
- package/dist/chunk-2FU6XS6S.cjs.map +1 -0
- package/dist/chunk-MLY32NZB.js +131 -0
- package/dist/chunk-MLY32NZB.js.map +1 -0
- package/dist/chunk-V6K5IFVV.cjs +253 -0
- package/dist/chunk-V6K5IFVV.cjs.map +1 -0
- package/dist/chunk-VOGWZXJY.js +246 -0
- package/dist/chunk-VOGWZXJY.js.map +1 -0
- package/dist/cli/index.cjs +516 -0
- package/dist/cli/index.cjs.map +1 -0
- package/dist/cli/index.d.cts +117 -0
- package/dist/cli/index.d.ts +117 -0
- package/dist/cli/index.js +505 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/components/index.cjs +509 -0
- package/dist/components/index.cjs.map +1 -0
- package/dist/components/index.d.cts +118 -0
- package/dist/components/index.d.ts +118 -0
- package/dist/components/index.js +494 -0
- package/dist/components/index.js.map +1 -0
- package/dist/config-loader-Nbidwviq.d.cts +33 -0
- package/dist/config-loader-Nbidwviq.d.ts +33 -0
- package/dist/hooks/index.cjs +45 -0
- package/dist/hooks/index.cjs.map +1 -0
- package/dist/hooks/index.d.cts +51 -0
- package/dist/hooks/index.d.ts +51 -0
- package/dist/hooks/index.js +24 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/index.cjs +32 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +32 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/sp-client-A9dM9oYp.d.ts +31 -0
- package/dist/sp-client-DTChApOB.d.cts +31 -0
- package/dist/types-Dk0jbejG.d.cts +108 -0
- package/dist/types-Dk0jbejG.d.ts +108 -0
- package/package.json +123 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { L as ListSelectionStrategy, C as ContentTypeConfig } from '../config-loader-Nbidwviq.cjs';
|
|
2
|
+
export { a as SpKitConfig, S as SpLoginConfig, l as loadConfig } from '../config-loader-Nbidwviq.cjs';
|
|
3
|
+
import { b as SpColumn } from '../types-Dk0jbejG.cjs';
|
|
4
|
+
|
|
5
|
+
interface GenerateTypesOptions {
|
|
6
|
+
configPath: string;
|
|
7
|
+
nonInteractive?: boolean;
|
|
8
|
+
strategy?: ListSelectionStrategy;
|
|
9
|
+
clearCache?: boolean;
|
|
10
|
+
updateCache?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare function generateTypes(options: GenerateTypesOptions): Promise<void>;
|
|
13
|
+
|
|
14
|
+
interface CacheResolution {
|
|
15
|
+
listId: string;
|
|
16
|
+
listName: string;
|
|
17
|
+
resolvedAt: string;
|
|
18
|
+
}
|
|
19
|
+
interface CacheData {
|
|
20
|
+
siteId: string;
|
|
21
|
+
lastUpdated: string;
|
|
22
|
+
lists: Array<{
|
|
23
|
+
id: string;
|
|
24
|
+
displayName: string;
|
|
25
|
+
name: string;
|
|
26
|
+
contentTypes: string[];
|
|
27
|
+
}>;
|
|
28
|
+
resolutions: Record<string, CacheResolution>;
|
|
29
|
+
}
|
|
30
|
+
declare class CacheManager {
|
|
31
|
+
private cachePath;
|
|
32
|
+
constructor(outputDir?: string);
|
|
33
|
+
load(): CacheData | null;
|
|
34
|
+
save(data: CacheData): void;
|
|
35
|
+
getResolution(contentTypeName: string): CacheResolution | null;
|
|
36
|
+
saveResolution(siteId: string, contentTypeName: string, listId: string, listName: string): void;
|
|
37
|
+
saveLists(siteId: string, lists: Array<{
|
|
38
|
+
id: string;
|
|
39
|
+
displayName: string;
|
|
40
|
+
name: string;
|
|
41
|
+
contentTypes: string[];
|
|
42
|
+
}>): void;
|
|
43
|
+
clear(): void;
|
|
44
|
+
getCachePath(): string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
interface ResolvedContentType {
|
|
48
|
+
contentTypeName: string;
|
|
49
|
+
outputType: string;
|
|
50
|
+
listId: string;
|
|
51
|
+
listName: string;
|
|
52
|
+
}
|
|
53
|
+
interface GraphClient$1 {
|
|
54
|
+
getLists(): Promise<Array<{
|
|
55
|
+
id: string;
|
|
56
|
+
displayName: string;
|
|
57
|
+
name: string;
|
|
58
|
+
}>>;
|
|
59
|
+
getList(options: {
|
|
60
|
+
listId: string;
|
|
61
|
+
}): Promise<{
|
|
62
|
+
id: string;
|
|
63
|
+
displayName: string;
|
|
64
|
+
name: string;
|
|
65
|
+
}>;
|
|
66
|
+
getListContentTypes(options: {
|
|
67
|
+
listId: string;
|
|
68
|
+
}): Promise<Array<{
|
|
69
|
+
id: string;
|
|
70
|
+
name: string;
|
|
71
|
+
}>>;
|
|
72
|
+
}
|
|
73
|
+
declare function resolveContentType(config: ContentTypeConfig, siteId: string, graphClient: GraphClient$1, cacheManager: CacheManager, globalStrategy: ListSelectionStrategy, nonInteractive: boolean): Promise<ResolvedContentType[]>;
|
|
74
|
+
|
|
75
|
+
interface ListInfo {
|
|
76
|
+
id: string;
|
|
77
|
+
displayName: string;
|
|
78
|
+
name: string;
|
|
79
|
+
}
|
|
80
|
+
interface ListSelection {
|
|
81
|
+
listId: string;
|
|
82
|
+
listName: string;
|
|
83
|
+
}
|
|
84
|
+
declare function promptListSelection(contentTypeName: string, lists: ListInfo[], strategy?: ListSelectionStrategy): Promise<ListSelection[]>;
|
|
85
|
+
|
|
86
|
+
interface GraphClient {
|
|
87
|
+
getColumns(options: {
|
|
88
|
+
contentTypeId: string;
|
|
89
|
+
}): Promise<SpColumn[]>;
|
|
90
|
+
getListColumns(options: {
|
|
91
|
+
listId: string;
|
|
92
|
+
}): Promise<SpColumn[]>;
|
|
93
|
+
getContentTypes(options?: {
|
|
94
|
+
listId?: string;
|
|
95
|
+
}): Promise<Array<{
|
|
96
|
+
id: string;
|
|
97
|
+
name: string;
|
|
98
|
+
}>>;
|
|
99
|
+
getListContentTypes(options: {
|
|
100
|
+
listId: string;
|
|
101
|
+
}): Promise<Array<{
|
|
102
|
+
id: string;
|
|
103
|
+
name: string;
|
|
104
|
+
}>>;
|
|
105
|
+
}
|
|
106
|
+
interface TypeGenerationInput {
|
|
107
|
+
contentTypeName: string;
|
|
108
|
+
outputType: string;
|
|
109
|
+
listId: string;
|
|
110
|
+
listName: string;
|
|
111
|
+
}
|
|
112
|
+
interface TypeGenerationOptions {
|
|
113
|
+
fieldNameMapping?: Record<string, string>;
|
|
114
|
+
}
|
|
115
|
+
declare function generateTypeScript(inputs: TypeGenerationInput[], graphClient: GraphClient, options?: TypeGenerationOptions): Promise<string>;
|
|
116
|
+
|
|
117
|
+
export { CacheManager, ContentTypeConfig, ListSelectionStrategy, generateTypeScript, generateTypes, promptListSelection, resolveContentType };
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { L as ListSelectionStrategy, C as ContentTypeConfig } from '../config-loader-Nbidwviq.js';
|
|
2
|
+
export { a as SpKitConfig, S as SpLoginConfig, l as loadConfig } from '../config-loader-Nbidwviq.js';
|
|
3
|
+
import { b as SpColumn } from '../types-Dk0jbejG.js';
|
|
4
|
+
|
|
5
|
+
interface GenerateTypesOptions {
|
|
6
|
+
configPath: string;
|
|
7
|
+
nonInteractive?: boolean;
|
|
8
|
+
strategy?: ListSelectionStrategy;
|
|
9
|
+
clearCache?: boolean;
|
|
10
|
+
updateCache?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare function generateTypes(options: GenerateTypesOptions): Promise<void>;
|
|
13
|
+
|
|
14
|
+
interface CacheResolution {
|
|
15
|
+
listId: string;
|
|
16
|
+
listName: string;
|
|
17
|
+
resolvedAt: string;
|
|
18
|
+
}
|
|
19
|
+
interface CacheData {
|
|
20
|
+
siteId: string;
|
|
21
|
+
lastUpdated: string;
|
|
22
|
+
lists: Array<{
|
|
23
|
+
id: string;
|
|
24
|
+
displayName: string;
|
|
25
|
+
name: string;
|
|
26
|
+
contentTypes: string[];
|
|
27
|
+
}>;
|
|
28
|
+
resolutions: Record<string, CacheResolution>;
|
|
29
|
+
}
|
|
30
|
+
declare class CacheManager {
|
|
31
|
+
private cachePath;
|
|
32
|
+
constructor(outputDir?: string);
|
|
33
|
+
load(): CacheData | null;
|
|
34
|
+
save(data: CacheData): void;
|
|
35
|
+
getResolution(contentTypeName: string): CacheResolution | null;
|
|
36
|
+
saveResolution(siteId: string, contentTypeName: string, listId: string, listName: string): void;
|
|
37
|
+
saveLists(siteId: string, lists: Array<{
|
|
38
|
+
id: string;
|
|
39
|
+
displayName: string;
|
|
40
|
+
name: string;
|
|
41
|
+
contentTypes: string[];
|
|
42
|
+
}>): void;
|
|
43
|
+
clear(): void;
|
|
44
|
+
getCachePath(): string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
interface ResolvedContentType {
|
|
48
|
+
contentTypeName: string;
|
|
49
|
+
outputType: string;
|
|
50
|
+
listId: string;
|
|
51
|
+
listName: string;
|
|
52
|
+
}
|
|
53
|
+
interface GraphClient$1 {
|
|
54
|
+
getLists(): Promise<Array<{
|
|
55
|
+
id: string;
|
|
56
|
+
displayName: string;
|
|
57
|
+
name: string;
|
|
58
|
+
}>>;
|
|
59
|
+
getList(options: {
|
|
60
|
+
listId: string;
|
|
61
|
+
}): Promise<{
|
|
62
|
+
id: string;
|
|
63
|
+
displayName: string;
|
|
64
|
+
name: string;
|
|
65
|
+
}>;
|
|
66
|
+
getListContentTypes(options: {
|
|
67
|
+
listId: string;
|
|
68
|
+
}): Promise<Array<{
|
|
69
|
+
id: string;
|
|
70
|
+
name: string;
|
|
71
|
+
}>>;
|
|
72
|
+
}
|
|
73
|
+
declare function resolveContentType(config: ContentTypeConfig, siteId: string, graphClient: GraphClient$1, cacheManager: CacheManager, globalStrategy: ListSelectionStrategy, nonInteractive: boolean): Promise<ResolvedContentType[]>;
|
|
74
|
+
|
|
75
|
+
interface ListInfo {
|
|
76
|
+
id: string;
|
|
77
|
+
displayName: string;
|
|
78
|
+
name: string;
|
|
79
|
+
}
|
|
80
|
+
interface ListSelection {
|
|
81
|
+
listId: string;
|
|
82
|
+
listName: string;
|
|
83
|
+
}
|
|
84
|
+
declare function promptListSelection(contentTypeName: string, lists: ListInfo[], strategy?: ListSelectionStrategy): Promise<ListSelection[]>;
|
|
85
|
+
|
|
86
|
+
interface GraphClient {
|
|
87
|
+
getColumns(options: {
|
|
88
|
+
contentTypeId: string;
|
|
89
|
+
}): Promise<SpColumn[]>;
|
|
90
|
+
getListColumns(options: {
|
|
91
|
+
listId: string;
|
|
92
|
+
}): Promise<SpColumn[]>;
|
|
93
|
+
getContentTypes(options?: {
|
|
94
|
+
listId?: string;
|
|
95
|
+
}): Promise<Array<{
|
|
96
|
+
id: string;
|
|
97
|
+
name: string;
|
|
98
|
+
}>>;
|
|
99
|
+
getListContentTypes(options: {
|
|
100
|
+
listId: string;
|
|
101
|
+
}): Promise<Array<{
|
|
102
|
+
id: string;
|
|
103
|
+
name: string;
|
|
104
|
+
}>>;
|
|
105
|
+
}
|
|
106
|
+
interface TypeGenerationInput {
|
|
107
|
+
contentTypeName: string;
|
|
108
|
+
outputType: string;
|
|
109
|
+
listId: string;
|
|
110
|
+
listName: string;
|
|
111
|
+
}
|
|
112
|
+
interface TypeGenerationOptions {
|
|
113
|
+
fieldNameMapping?: Record<string, string>;
|
|
114
|
+
}
|
|
115
|
+
declare function generateTypeScript(inputs: TypeGenerationInput[], graphClient: GraphClient, options?: TypeGenerationOptions): Promise<string>;
|
|
116
|
+
|
|
117
|
+
export { CacheManager, ContentTypeConfig, ListSelectionStrategy, generateTypeScript, generateTypes, promptListSelection, resolveContentType };
|