@lindle/sharepoint_requests 0.1.17 → 0.1.18
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/root/index.d.ts +2 -2
- package/dist/root/internal/listRequests/createListItem.d.ts +1 -1
- package/dist/root/internal/listRequests/normalizePayload.d.ts +4 -0
- package/dist/root/internal/listRequests/updateListItem.d.ts +1 -1
- package/dist/sharepoint_requests.cjs.development.js +179 -8
- package/dist/sharepoint_requests.cjs.development.js.map +1 -1
- package/dist/sharepoint_requests.cjs.production.min.js +1 -1
- package/dist/sharepoint_requests.cjs.production.min.js.map +1 -1
- package/dist/sharepoint_requests.esm.js +179 -8
- package/dist/sharepoint_requests.esm.js.map +1 -1
- package/dist/types.d.ts +22 -7
- package/package.json +1 -1
- package/src/root/index.ts +7 -3
- package/src/root/internal/listRequests/createListItem.ts +10 -5
- package/src/root/internal/listRequests/normalizePayload.ts +165 -0
- package/src/root/internal/listRequests/updateListItem.ts +11 -3
- package/src/types.ts +53 -24
package/src/types.ts
CHANGED
|
@@ -108,20 +108,11 @@ export type DeleteFileProps = {
|
|
|
108
108
|
folderPath?: string | string[];
|
|
109
109
|
};
|
|
110
110
|
|
|
111
|
-
export type
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
| any;
|
|
119
|
-
|
|
120
|
-
export type EmailProps = {
|
|
121
|
-
From: string;
|
|
122
|
-
To: string[] | string;
|
|
123
|
-
Subject?: string;
|
|
124
|
-
Body: string;
|
|
111
|
+
export type EmailProps = {
|
|
112
|
+
From: string;
|
|
113
|
+
To: string[] | string;
|
|
114
|
+
Subject?: string;
|
|
115
|
+
Body: string;
|
|
125
116
|
};
|
|
126
117
|
|
|
127
118
|
export type _Deferred = {
|
|
@@ -130,16 +121,54 @@ export type _Deferred = {
|
|
|
130
121
|
};
|
|
131
122
|
};
|
|
132
123
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
export type
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
124
|
+
declare const LOOKUP_FIELD_TAG: unique symbol;
|
|
125
|
+
type LookupFieldMarker = {
|
|
126
|
+
[LOOKUP_FIELD_TAG]?: true;
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
export type LookupField<T> = _Deferred & T & LookupFieldMarker;
|
|
130
|
+
export type ChoiceField<T> = _Deferred & {
|
|
131
|
+
Value: T;
|
|
132
|
+
__metadata: Metadata;
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
type MetadataEnvelope = {
|
|
136
|
+
__metadata?: {
|
|
137
|
+
type: string;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
type EnsureRecord<T> = T extends Record<string, unknown>
|
|
142
|
+
? T
|
|
143
|
+
: Record<string, unknown>;
|
|
144
|
+
|
|
145
|
+
type LookupCreateValue =
|
|
146
|
+
| number
|
|
147
|
+
| string
|
|
148
|
+
| null
|
|
149
|
+
| {
|
|
150
|
+
lookupId: number | string;
|
|
151
|
+
}
|
|
152
|
+
| {
|
|
153
|
+
LookupId: number | string;
|
|
154
|
+
}
|
|
155
|
+
| {
|
|
156
|
+
results: (number | string)[];
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
type NormalizeField<T> = T extends LookupField<unknown>
|
|
160
|
+
? LookupCreateValue | LookupField<unknown>
|
|
161
|
+
: T;
|
|
162
|
+
|
|
163
|
+
export type ListData<T = Record<string, unknown>> = Partial<{
|
|
164
|
+
[K in keyof EnsureRecord<T>]: NormalizeField<EnsureRecord<T>[K]>;
|
|
165
|
+
}> &
|
|
166
|
+
MetadataEnvelope;
|
|
167
|
+
|
|
168
|
+
export type PersonField = {
|
|
169
|
+
AboutMe?: string;
|
|
170
|
+
Account: string;
|
|
171
|
+
AccountName: string;
|
|
143
172
|
AdministrativeSupervisor: string;
|
|
144
173
|
AskMeAbout?: string;
|
|
145
174
|
AskMeAbout0?: string;
|