@powerportalspro/core 5.0.0-beta.3 → 5.0.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.
- package/dist/index.cjs +334 -39
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +943 -182
- package/dist/index.d.ts +943 -182
- package/dist/index.js +333 -40
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -92,8 +92,8 @@ var auth = {
|
|
|
92
92
|
confirmEmail: `${authRoot}/confirm-email`,
|
|
93
93
|
/** POST — send a fresh confirmation email. */
|
|
94
94
|
resendEmailConfirmation: `${authRoot}/resend-email-confirmation`,
|
|
95
|
-
/** GET —
|
|
96
|
-
|
|
95
|
+
/** GET — anonymous auth options for the sign-in UI: the local-accounts flag plus the configured external (OAuth) providers. */
|
|
96
|
+
options: `${authRoot}/options`,
|
|
97
97
|
/** GET — kicks off the OAuth flow for the named external provider. Full-page navigate, do not fetch. */
|
|
98
98
|
externalLogin: `${authRoot}/external-login`,
|
|
99
99
|
/** GET — snapshot the in-flight external-login cookie set by the OAuth callback. */
|
|
@@ -131,14 +131,39 @@ var api = {
|
|
|
131
131
|
retrieveLocalizedStrings: `${apiRoot}/localizedStrings/{culture}`,
|
|
132
132
|
/** Template — POST a batch of OrganizationRequest payloads. */
|
|
133
133
|
executeMultiple: `${apiRoot}/executeMultiple`,
|
|
134
|
-
/**
|
|
135
|
-
|
|
134
|
+
/**
|
|
135
|
+
* GET — organization-wide settings sourced from the Dataverse `organization` record:
|
|
136
|
+
* default currency plus file-upload constraints (blocked extensions, max upload size).
|
|
137
|
+
* Replaces the legacy `/api/environmentFileSettings` endpoint.
|
|
138
|
+
*/
|
|
139
|
+
organizationSettings: `${apiRoot}/organizationSettings`,
|
|
136
140
|
/** POST — clear all server-side caches. SystemAdmin-only. */
|
|
137
141
|
clearAllCaches: `${apiRoot}/caches/clear`,
|
|
138
142
|
/** GET — every server-side cache name. SystemAdmin-only. */
|
|
139
143
|
cacheNames: `${apiRoot}/caches`,
|
|
140
144
|
/** Template — POST to clear a single named cache. SystemAdmin-only. */
|
|
141
145
|
clearCache: `${apiRoot}/caches/{cacheName}/clear`,
|
|
146
|
+
/**
|
|
147
|
+
* GET — admin localization overview: configured sources plus the per-source
|
|
148
|
+
* load records produced by the most recent warmup. SystemAdmin-only. Backs
|
|
149
|
+
* the LocalizationAdmin component (Blazor-only today; React mirror TBD).
|
|
150
|
+
*/
|
|
151
|
+
localizationOverview: `${apiRoot}/localizations/overview`,
|
|
152
|
+
/**
|
|
153
|
+
* GET — JSON of the keys one source contributed to one culture during the most
|
|
154
|
+
* recent warmup. `sourceId` + `culture` are query-string parameters (a sourceId
|
|
155
|
+
* can contain colons/slashes, so they're not path segments). SystemAdmin-only.
|
|
156
|
+
*/
|
|
157
|
+
localizationSourceDownload: `${apiRoot}/localizations/sources/download`,
|
|
158
|
+
/**
|
|
159
|
+
* GET — JSON of every key the cache will serve for a culture (post-merge winning
|
|
160
|
+
* values across all sources). `culture` is a query-string parameter. SystemAdmin-only.
|
|
161
|
+
*/
|
|
162
|
+
localizationMergedDownload: `${apiRoot}/localizations/merged/download`,
|
|
163
|
+
/** GET — whether translation is configured, the managed solution is installed, and the candidate target languages. SystemAdmin-only. */
|
|
164
|
+
localizationTranslationAvailability: `${apiRoot}/localizations/translation/availability`,
|
|
165
|
+
/** POST — translate an uploaded localization file into one or more target languages. SystemAdmin-only. */
|
|
166
|
+
localizationTranslate: `${apiRoot}/localizations/translation`,
|
|
142
167
|
/** Template — GET file metadata + (optionally) content for one record/column. */
|
|
143
168
|
retrieveFileInfo: `${apiRoot}/files/{tableLogicalName}/{recordId}/{columnName}`,
|
|
144
169
|
/** Template — POST record ids; returns file info + content for many records of one column. */
|
|
@@ -174,10 +199,10 @@ var api = {
|
|
|
174
199
|
getRetrieveTableMetadataRoute: (tableLogicalName) => `${apiRoot}/tableMetadata/${tableLogicalName}`,
|
|
175
200
|
/**
|
|
176
201
|
* Resolved URL for retrieving the current user's combined
|
|
177
|
-
* `TableSecurityPermission` mask for a single table.
|
|
178
|
-
* server-side `ITablePermissionCache.GetPermissionForUserAsync`
|
|
179
|
-
*
|
|
180
|
-
*
|
|
202
|
+
* `TableSecurityPermission` mask for a single table. Routes through
|
|
203
|
+
* the server-side `ITablePermissionCache.GetPermissionForUserAsync`
|
|
204
|
+
* lookup so the client can read the table-level answer without firing
|
|
205
|
+
* a grid query.
|
|
181
206
|
* `GridDataResponse.tablePermissions` carries the same value when a
|
|
182
207
|
* grid query happens to be in flight; this endpoint covers the other
|
|
183
208
|
* cases (custom toolbars, conditional UI elsewhere on the page).
|
|
@@ -459,11 +484,16 @@ var AuthClient = class {
|
|
|
459
484
|
getCurrentUserAsync(signal) {
|
|
460
485
|
return this.transport.sendJson("GET", Routes.api.auth.me, bodyAndSignal(void 0, signal));
|
|
461
486
|
}
|
|
462
|
-
/**
|
|
463
|
-
|
|
487
|
+
/**
|
|
488
|
+
* Anonymous auth options for the sign-in UI: whether the portal accepts local
|
|
489
|
+
* username/password accounts (`localAccountsEnabled`) plus the configured external
|
|
490
|
+
* providers — one round-trip the login page uses to decide whether to render the
|
|
491
|
+
* local form / register + reset links and which provider buttons to show.
|
|
492
|
+
*/
|
|
493
|
+
getAuthOptionsAsync(signal) {
|
|
464
494
|
return this.transport.sendJson(
|
|
465
495
|
"GET",
|
|
466
|
-
Routes.api.auth.
|
|
496
|
+
Routes.api.auth.options,
|
|
467
497
|
bodyAndSignal(void 0, signal)
|
|
468
498
|
);
|
|
469
499
|
}
|
|
@@ -678,10 +708,9 @@ var PowerPortalsProClient = class {
|
|
|
678
708
|
}
|
|
679
709
|
// --- Records (CRUD + FetchXML) ---------------------------------------------------
|
|
680
710
|
/**
|
|
681
|
-
* Creates a new record. URL is derived from `record.tableName`.
|
|
682
|
-
*
|
|
683
|
-
* (which carry no dirty flags) round-trip
|
|
684
|
-
* dirty-tracked records.
|
|
711
|
+
* Creates a new record. URL is derived from `record.tableName`. The server
|
|
712
|
+
* marks every property as modified before applying so column values
|
|
713
|
+
* arriving from JSON (which carry no dirty flags) round-trip correctly.
|
|
685
714
|
*/
|
|
686
715
|
createRecordAsync(record, signal) {
|
|
687
716
|
return this.transport.sendJson(
|
|
@@ -701,6 +730,137 @@ var PowerPortalsProClient = class {
|
|
|
701
730
|
signal ? { signal } : {}
|
|
702
731
|
);
|
|
703
732
|
}
|
|
733
|
+
// --- Localization translation (admin) --------------------------------------------
|
|
734
|
+
/**
|
|
735
|
+
* Probes whether the localization-translation feature is usable: whether a translation
|
|
736
|
+
* provider is configured, whether the managed solution is installed, and the candidate
|
|
737
|
+
* target languages (the portal's cultures annotated with provider-translatability).
|
|
738
|
+
* SystemAdmin-gated.
|
|
739
|
+
*/
|
|
740
|
+
getTranslationAvailabilityAsync(signal) {
|
|
741
|
+
return this.transport.sendJson(
|
|
742
|
+
"GET",
|
|
743
|
+
Routes.api.localizationTranslationAvailability,
|
|
744
|
+
signal ? { signal } : {}
|
|
745
|
+
);
|
|
746
|
+
}
|
|
747
|
+
/**
|
|
748
|
+
* Translates an uploaded localization file into one or more target languages, reusing the
|
|
749
|
+
* Dataverse translation memory. Returns one file per language (base64 `content`) plus a zip
|
|
750
|
+
* of all and translated-vs-reused counts. SystemAdmin-gated.
|
|
751
|
+
*/
|
|
752
|
+
translateLocalizationFileAsync(request, signal) {
|
|
753
|
+
return this.transport.sendJson(
|
|
754
|
+
"POST",
|
|
755
|
+
Routes.api.localizationTranslate,
|
|
756
|
+
{ body: request, ...signal ? { signal } : {} }
|
|
757
|
+
);
|
|
758
|
+
}
|
|
759
|
+
// --- Localization admin overview (admin) -----------------------------------------
|
|
760
|
+
/**
|
|
761
|
+
* Reads the admin localization overview: the configured warmup pipeline plus the
|
|
762
|
+
* per-source load records (load order, source kind, cultures touched, key counts,
|
|
763
|
+
* how many keys overrode an earlier source, duration, status) from the most recent
|
|
764
|
+
* warmup. Backs the `<LocalizationAdmin />` panel. SystemAdmin-gated.
|
|
765
|
+
*/
|
|
766
|
+
getLocalizationOverviewAsync(signal) {
|
|
767
|
+
return this.transport.sendJson(
|
|
768
|
+
"GET",
|
|
769
|
+
Routes.api.localizationOverview,
|
|
770
|
+
signal ? { signal } : {}
|
|
771
|
+
);
|
|
772
|
+
}
|
|
773
|
+
/**
|
|
774
|
+
* Downloads the JSON one source contributed to one culture during the most recent
|
|
775
|
+
* warmup — a translation-handoff snapshot. Returns `null` when the source/culture
|
|
776
|
+
* pair isn't tracked (the server answers 404 — cache cleared, source removed, or
|
|
777
|
+
* the culture has no entries for that source). SystemAdmin-gated.
|
|
778
|
+
*/
|
|
779
|
+
downloadLocalizationSourceAsync(sourceId, culture, signal) {
|
|
780
|
+
const query = new URLSearchParams({ sourceId, culture }).toString();
|
|
781
|
+
return this.downloadLocalizationFile(
|
|
782
|
+
`${Routes.api.localizationSourceDownload}?${query}`,
|
|
783
|
+
signal
|
|
784
|
+
);
|
|
785
|
+
}
|
|
786
|
+
/**
|
|
787
|
+
* Downloads the merged JSON of every key the cache will serve for a culture (the
|
|
788
|
+
* post-merge winning value across all sources) — a complete-snapshot reference.
|
|
789
|
+
* Returns `null` when the culture has no entries (404). SystemAdmin-gated.
|
|
790
|
+
*/
|
|
791
|
+
downloadMergedLocalizationsAsync(culture, signal) {
|
|
792
|
+
const query = new URLSearchParams({ culture }).toString();
|
|
793
|
+
return this.downloadLocalizationFile(
|
|
794
|
+
`${Routes.api.localizationMergedDownload}?${query}`,
|
|
795
|
+
signal
|
|
796
|
+
);
|
|
797
|
+
}
|
|
798
|
+
/**
|
|
799
|
+
* Shared binary-download path for the two localization download endpoints. Reads
|
|
800
|
+
* the raw bytes via `response.arrayBuffer()` and derives the filename from the
|
|
801
|
+
* `Content-Disposition` header (matching {@link createFileArchiveAsync}). Maps a
|
|
802
|
+
* 404 to `null` so callers can show a "nothing to download" message instead of
|
|
803
|
+
* surfacing it as an error.
|
|
804
|
+
*/
|
|
805
|
+
async downloadLocalizationFile(path, signal) {
|
|
806
|
+
try {
|
|
807
|
+
const response = await this.transport.send("GET", path, signal ? { signal } : {});
|
|
808
|
+
const fileName = parseContentDispositionFileName(response.headers.get("Content-Disposition")) ?? "localization.json";
|
|
809
|
+
const buffer = await response.arrayBuffer();
|
|
810
|
+
return { fileName, data: new Uint8Array(buffer) };
|
|
811
|
+
} catch (error) {
|
|
812
|
+
if (error instanceof PowerPortalsProError && error.status === 404) return null;
|
|
813
|
+
throw error;
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
// --- Cache administration (admin) ------------------------------------------------
|
|
817
|
+
/**
|
|
818
|
+
* Lists every registered server-side cache by name — the values that
|
|
819
|
+
* {@link clearCacheAsync} accepts. Backs the per-cache buttons on an admin
|
|
820
|
+
* "clear caches" page; render them sorted client-side for a stable order.
|
|
821
|
+
* SystemAdmin-gated.
|
|
822
|
+
*/
|
|
823
|
+
getCacheNamesAsync(signal) {
|
|
824
|
+
return this.transport.sendJson(
|
|
825
|
+
"GET",
|
|
826
|
+
Routes.api.cacheNames,
|
|
827
|
+
signal ? { signal } : {}
|
|
828
|
+
);
|
|
829
|
+
}
|
|
830
|
+
/**
|
|
831
|
+
* Clears every registered server-side cache and returns one
|
|
832
|
+
* {@link CacheClearResult} per cache (name, success flag, error, elapsed ms).
|
|
833
|
+
* Per-cache failures are reported in the result rows rather than thrown, so a
|
|
834
|
+
* single misbehaving cache doesn't abort the rest — inspect `succeeded` on each
|
|
835
|
+
* row. SystemAdmin-gated.
|
|
836
|
+
*/
|
|
837
|
+
clearAllCachesAsync(signal) {
|
|
838
|
+
return this.transport.sendJson(
|
|
839
|
+
"POST",
|
|
840
|
+
Routes.api.clearAllCaches,
|
|
841
|
+
signal ? { signal } : {}
|
|
842
|
+
);
|
|
843
|
+
}
|
|
844
|
+
/**
|
|
845
|
+
* Clears a single named cache (case-insensitive match against
|
|
846
|
+
* {@link getCacheNamesAsync}). Returns the {@link CacheClearResult}, or `null`
|
|
847
|
+
* when no cache by that name is registered (the server answers 404). A clear
|
|
848
|
+
* that runs but throws internally comes back as a result row with
|
|
849
|
+
* `succeeded: false` — that's distinct from the not-found `null`.
|
|
850
|
+
* SystemAdmin-gated.
|
|
851
|
+
*/
|
|
852
|
+
async clearCacheAsync(name, signal) {
|
|
853
|
+
try {
|
|
854
|
+
return await this.transport.sendJson(
|
|
855
|
+
"POST",
|
|
856
|
+
Routes.api.getClearCacheRoute(name),
|
|
857
|
+
signal ? { signal } : {}
|
|
858
|
+
);
|
|
859
|
+
} catch (error) {
|
|
860
|
+
if (error instanceof PowerPortalsProError && error.status === 404) return null;
|
|
861
|
+
throw error;
|
|
862
|
+
}
|
|
863
|
+
}
|
|
704
864
|
/**
|
|
705
865
|
* Runs a FetchXML query and returns the matching records plus paging info.
|
|
706
866
|
* The query is the FetchXML XML literal — the same format Dataverse natively accepts.
|
|
@@ -724,10 +884,12 @@ var PowerPortalsProClient = class {
|
|
|
724
884
|
* client can render headers + dispatch cells without a separate
|
|
725
885
|
* metadata round-trip.
|
|
726
886
|
*
|
|
727
|
-
*
|
|
728
|
-
* be supplied
|
|
887
|
+
* At least one of <c>request.viewId</c> or <c>request.fetchXml</c> must
|
|
888
|
+
* be supplied (neither returns a 400). Both may be supplied together — the
|
|
889
|
+
* <c>fetchXml</c> is the query and the <c>viewId</c> names the view for
|
|
890
|
+
* localized column-title resolution.
|
|
729
891
|
*
|
|
730
|
-
* Mirrors how the
|
|
892
|
+
* Mirrors how the is consumed
|
|
731
893
|
* `@powerportalspro/react`'s `useGridData` hook calls this method
|
|
732
894
|
* internally, so most consumers don't invoke it directly.
|
|
733
895
|
*/
|
|
@@ -739,7 +901,7 @@ var PowerPortalsProClient = class {
|
|
|
739
901
|
);
|
|
740
902
|
}
|
|
741
903
|
/**
|
|
742
|
-
* Updates an existing record. URL is derived from `record.tableName` and `record.id`
|
|
904
|
+
* Updates an existing record. URL is derived from `record.tableName` and `record.id`
|
|
743
905
|
* `record.id` must be set. For a new record, use {@link createRecordAsync} instead.
|
|
744
906
|
*/
|
|
745
907
|
updateRecordAsync(record, signal) {
|
|
@@ -755,9 +917,8 @@ var PowerPortalsProClient = class {
|
|
|
755
917
|
);
|
|
756
918
|
}
|
|
757
919
|
/**
|
|
758
|
-
* Executes a batch of {@link OrganizationRequest}s as a single round-trip
|
|
759
|
-
*
|
|
760
|
-
* MainContext save flow uses this to ship every dirty descendant's
|
|
920
|
+
* Executes a batch of {@link OrganizationRequest}s as a single round-trip.
|
|
921
|
+
* The MainContext save flow uses this to ship every dirty descendant's
|
|
761
922
|
* requests in one shot so a multi-record save lands transactionally
|
|
762
923
|
* server-side.
|
|
763
924
|
*
|
|
@@ -794,7 +955,7 @@ var PowerPortalsProClient = class {
|
|
|
794
955
|
* query, performs the multi-series pivot, and applies combined
|
|
795
956
|
* date-label formatting using the request culture.
|
|
796
957
|
*
|
|
797
|
-
* Mirrors how the
|
|
958
|
+
* Mirrors how the is consumed
|
|
798
959
|
* `@powerportalspro/react-charts`'s `DataverseChartDataSource` family
|
|
799
960
|
* calls this method internally, so most consumers don't invoke it
|
|
800
961
|
* directly.
|
|
@@ -819,12 +980,13 @@ var PowerPortalsProClient = class {
|
|
|
819
980
|
* Returns the current user's combined table-level `TableSecurityPermission`
|
|
820
981
|
* bitmask for `tableLogicalName` — the bitwise union of Read / Create /
|
|
821
982
|
* Write / Delete / Append / AppendTo flags any registered
|
|
822
|
-
* `ITablePermissionHandler` allows for that user on that table.
|
|
823
|
-
* the cached `ITablePermissionCache
|
|
824
|
-
*
|
|
825
|
-
* by the `useTablePermissions(tableName)` React hook with
|
|
826
|
-
* dedup; reach for the raw client only when you're
|
|
827
|
-
* a
|
|
983
|
+
* `ITablePermissionHandler` allows for that user on that table. Routed
|
|
984
|
+
* server-side through the cached `ITablePermissionCache` lookup.
|
|
985
|
+
*
|
|
986
|
+
* Wrapped by the `useTablePermissions(tableName)` React hook with
|
|
987
|
+
* in-flight-promise dedup; reach for the raw client only when you're
|
|
988
|
+
* outside React (e.g. a stand-alone script) or need an imperative
|
|
989
|
+
* one-off check.
|
|
828
990
|
*
|
|
829
991
|
* Returns `0` (`TableSecurityPermission.None`) when the user has no
|
|
830
992
|
* permissions on the table; consumers compare via bit math (e.g.
|
|
@@ -959,14 +1121,14 @@ var PowerPortalsProClient = class {
|
|
|
959
1121
|
* override files (last-wins). Use this to seed the React-side localizer
|
|
960
1122
|
* with one round-trip.
|
|
961
1123
|
*
|
|
962
|
-
* Returned shape is a nested object that mirrors the source JSON files
|
|
1124
|
+
* Returned shape is a nested object that mirrors the source JSON files
|
|
963
1125
|
* `{ app: { buttons: { save: { label: "Save" } } }, tables: { contact: ... } }`.
|
|
964
1126
|
* The client typically flattens this to dotted-key form for `t()` lookup
|
|
965
1127
|
* (see {@link flattenStrings} in `@powerportalspro/react`).
|
|
966
1128
|
*
|
|
967
1129
|
* @param culture culture code matching what server-side ASP.NET request
|
|
968
|
-
*
|
|
969
|
-
*
|
|
1130
|
+
* localization recognizes — e.g. `"en"`, `"es"`, `"fr-CA"`. Falls back
|
|
1131
|
+
* to the default culture server-side when the value isn't supported.
|
|
970
1132
|
*/
|
|
971
1133
|
retrieveLocalizedStringsAsync(culture, signal) {
|
|
972
1134
|
return this.transport.sendJson(
|
|
@@ -1010,12 +1172,12 @@ var PowerPortalsProClient = class {
|
|
|
1010
1172
|
* Two response shapes, selected by `request.responseFormat`:
|
|
1011
1173
|
*
|
|
1012
1174
|
* - **BinaryStream** (default): the server returns the raw archive bytes; this
|
|
1013
|
-
*
|
|
1014
|
-
*
|
|
1015
|
-
*
|
|
1175
|
+
* method reads them via `response.arrayBuffer()` and wraps the result in a
|
|
1176
|
+
* {@link FileArchiveResult}, deriving `fileName` from the `Content-Disposition`
|
|
1177
|
+
* header and `contentType` from `Content-Type`. Most consumers want this path.
|
|
1016
1178
|
* - **Json**: the server returns a {@link FileArchiveJsonResponse} envelope with
|
|
1017
|
-
*
|
|
1018
|
-
*
|
|
1179
|
+
* the archive bytes base64-encoded. Useful for test harnesses, service workers,
|
|
1180
|
+
* or callers that need to inspect filename/size before triggering a download.
|
|
1019
1181
|
*
|
|
1020
1182
|
* Either way, the returned `data` is empty (`Uint8Array(0)`) when none of the
|
|
1021
1183
|
* supplied records produced a usable file — the caller can surface a "nothing to
|
|
@@ -1049,10 +1211,24 @@ var PowerPortalsProClient = class {
|
|
|
1049
1211
|
* upload size in KB). UI consumers use this to validate uploads client-side before
|
|
1050
1212
|
* the round-trip, mirroring what the server enforces.
|
|
1051
1213
|
*/
|
|
1052
|
-
|
|
1214
|
+
/**
|
|
1215
|
+
* Reads the org-wide settings sourced from the Dataverse `organization`
|
|
1216
|
+
* record: default currency plus file-upload constraints
|
|
1217
|
+
* (`blockedFileExtensions`, `maxUploadFileSizeInBytes`). Replaces the legacy
|
|
1218
|
+
* `getEnvironmentFileSettingsAsync` — file fields now live on this combined
|
|
1219
|
+
* response.
|
|
1220
|
+
* <para>
|
|
1221
|
+
* Primary consumers:
|
|
1222
|
+
* </para>
|
|
1223
|
+
* - Create-mode `<MoneyEdit>` reads `defaultCurrency` to render the right
|
|
1224
|
+
* symbol on brand-new records before save.
|
|
1225
|
+
* - File editors / FileGrid read the two file fields to reject invalid
|
|
1226
|
+
* uploads client-side before the round-trip.
|
|
1227
|
+
*/
|
|
1228
|
+
getOrganizationSettingsAsync(signal) {
|
|
1053
1229
|
return this.transport.sendJson(
|
|
1054
1230
|
"GET",
|
|
1055
|
-
Routes.api.
|
|
1231
|
+
Routes.api.organizationSettings,
|
|
1056
1232
|
signal ? { signal } : {}
|
|
1057
1233
|
);
|
|
1058
1234
|
}
|
|
@@ -1078,142 +1254,259 @@ function parseContentDispositionFileName(header) {
|
|
|
1078
1254
|
|
|
1079
1255
|
// src/generated/result-codes.ts
|
|
1080
1256
|
var AggregateType = {
|
|
1257
|
+
/** No aggregation. */
|
|
1081
1258
|
None: 0,
|
|
1259
|
+
/** Count of rows (including nulls). */
|
|
1082
1260
|
Count: 1,
|
|
1261
|
+
/** Count of rows where the column is not null. */
|
|
1083
1262
|
CountColumn: 2,
|
|
1263
|
+
/** Sum of values. */
|
|
1084
1264
|
Sum: 3,
|
|
1265
|
+
/** Arithmetic mean of values. */
|
|
1085
1266
|
Avg: 4,
|
|
1267
|
+
/** Minimum value. */
|
|
1086
1268
|
Min: 5,
|
|
1269
|
+
/** Maximum value. */
|
|
1087
1270
|
Max: 6
|
|
1088
1271
|
};
|
|
1089
1272
|
var ArchiveFormat = {
|
|
1273
|
+
/** Standard ZIP archive (application/zip, .zip extension). Built via ZipArchive with Optimal. */
|
|
1090
1274
|
Zip: 0
|
|
1091
1275
|
};
|
|
1092
1276
|
var ChangeEmailResult = {
|
|
1277
|
+
/** A confirmation email was sent to the new address. The change does not take effect until the user clicks the link. */
|
|
1093
1278
|
ConfirmationEmailSent: 0,
|
|
1279
|
+
/** The submitted email matches the user's current email. Nothing was sent. The client should show a "this is already your email" message. */
|
|
1094
1280
|
SameAsCurrentEmail: 1
|
|
1095
1281
|
};
|
|
1096
1282
|
var ChangePasswordResult = {
|
|
1283
|
+
/** The password was changed. The auth cookie has been refreshed to pick up the new security stamp so other sessions are invalidated. */
|
|
1097
1284
|
Success: 0,
|
|
1285
|
+
/** The supplied old password did not match the current password. The client should show an "incorrect current password" error and allow retry. */
|
|
1098
1286
|
IncorrectOldPassword: 1,
|
|
1287
|
+
/** The new password did not satisfy the host's IdentityOptions.Password rules. Errors carries the per-rule messages so the client can show actionable feedback. */
|
|
1099
1288
|
InvalidPassword: 2
|
|
1100
1289
|
};
|
|
1101
1290
|
var ChartDateGrouping = {
|
|
1291
|
+
/** No date grouping — the column is grouped by its raw value. */
|
|
1102
1292
|
None: 0,
|
|
1293
|
+
/** Group by day (dategrouping="day"). Label: day number. */
|
|
1103
1294
|
Day: 1,
|
|
1295
|
+
/** Group by ISO week (dategrouping="week"). Label: week number. */
|
|
1104
1296
|
Week: 2,
|
|
1297
|
+
/** Group by calendar month (dategrouping="month"). Label: abbreviated month name (Jan, Feb, …) in the current culture. */
|
|
1105
1298
|
Month: 3,
|
|
1299
|
+
/** Group by calendar quarter (dategrouping="quarter"). Label: quarter number. */
|
|
1106
1300
|
Quarter: 4,
|
|
1301
|
+
/** Group by calendar year (dategrouping="year"). Label: year. */
|
|
1107
1302
|
Year: 5,
|
|
1303
|
+
/** Group by month + year. Label: "Jan 2024". */
|
|
1108
1304
|
MonthAndYear: 6,
|
|
1305
|
+
/** Group by day + month. Label: "15 Jan". */
|
|
1109
1306
|
DayAndMonth: 7,
|
|
1307
|
+
/** Group by day + month + year. Label: "15 Jan 2024". */
|
|
1110
1308
|
DayAndMonthAndYear: 8,
|
|
1309
|
+
/** Group by ISO week + year. Label: "W15 2024". */
|
|
1111
1310
|
WeekAndYear: 9,
|
|
1311
|
+
/** Group by quarter + year. Label: "Q1 2024". */
|
|
1112
1312
|
QuarterAndYear: 10
|
|
1113
1313
|
};
|
|
1114
1314
|
var ColumnType = {
|
|
1315
|
+
/** A Boolean attribute. Value = 0. */
|
|
1115
1316
|
Boolean: 0,
|
|
1317
|
+
/** An attribute that represents a customer. Value = 1. */
|
|
1116
1318
|
Customer: 1,
|
|
1319
|
+
/** A date/time attribute. Value = 2. */
|
|
1117
1320
|
DateTime: 2,
|
|
1321
|
+
/** A decimal attribute. Value = 3. */
|
|
1118
1322
|
Decimal: 3,
|
|
1323
|
+
/** A double attribute. Value = 4. */
|
|
1119
1324
|
Double: 4,
|
|
1325
|
+
/** An integer attribute. Value = 5. */
|
|
1120
1326
|
Integer: 5,
|
|
1327
|
+
/** A lookup attribute. Value = 6. */
|
|
1121
1328
|
Lookup: 6,
|
|
1329
|
+
/** A memo attribute. Value = 7. */
|
|
1122
1330
|
Memo: 7,
|
|
1331
|
+
/** A money attribute. Value = 8. */
|
|
1123
1332
|
Money: 8,
|
|
1333
|
+
/** An owner attribute. Value = 9. */
|
|
1124
1334
|
Owner: 9,
|
|
1335
|
+
/** A partylist attribute. Value = 10. */
|
|
1125
1336
|
PartyList: 10,
|
|
1337
|
+
/** A picklist (single-select choice) attribute. Value = 11. */
|
|
1126
1338
|
Choice: 11,
|
|
1339
|
+
/** A state attribute. Value = 12. */
|
|
1127
1340
|
State: 12,
|
|
1341
|
+
/** A status attribute. Value = 13. */
|
|
1128
1342
|
Status: 13,
|
|
1343
|
+
/** A string attribute. Value = 14. */
|
|
1129
1344
|
String: 14,
|
|
1345
|
+
/** A unique identifier (GUID) attribute. Value = 15. */
|
|
1130
1346
|
Uniqueidentifier: 15,
|
|
1347
|
+
/** An attribute that contains calendar rules. Value = 16. */
|
|
1131
1348
|
CalendarRules: 16,
|
|
1349
|
+
/** An attribute that is created by the system at run time. Value = 17. */
|
|
1132
1350
|
Virtual: 17,
|
|
1351
|
+
/** A big integer (long) attribute. Value = 18. */
|
|
1133
1352
|
BigInt: 18,
|
|
1353
|
+
/** A managed property attribute. Value = 19. */
|
|
1134
1354
|
ManagedProperty: 19,
|
|
1355
|
+
/** An entity name attribute. Value = 20. */
|
|
1135
1356
|
EntityName: 20,
|
|
1357
|
+
/** A multi-select choice attribute. Value = 40. PowerPortalsPro-specific (not present in Dataverse AttributeTypeCode). */
|
|
1136
1358
|
MultiSelectChoice: 40,
|
|
1359
|
+
/** A file attachment attribute. Value = 41. PowerPortalsPro-specific (not present in Dataverse AttributeTypeCode). */
|
|
1137
1360
|
File: 41,
|
|
1361
|
+
/** An image attribute. Value = 42. PowerPortalsPro-specific (not present in Dataverse AttributeTypeCode). */
|
|
1138
1362
|
Image: 42
|
|
1139
1363
|
};
|
|
1140
1364
|
var ConfirmExternalLoginResult = {
|
|
1365
|
+
/** The external login was linked (creating a new local account if needed) and the user has been signed in. The auth cookie is set on the response. */
|
|
1141
1366
|
SignedIn: 0,
|
|
1367
|
+
/** The account was created but the host requires email confirmation. A confirmation link has been sent; the user is NOT signed in yet. */
|
|
1142
1368
|
ConfirmationEmailSent: 1,
|
|
1369
|
+
/** No external-login cookie was found — the user landed on the confirm endpoint without a fresh OAuth callback. The client should redirect back to the login page. */
|
|
1143
1370
|
NoPendingExternalLogin: 2,
|
|
1371
|
+
/** Identity rejected the create / add-login operation (e.g. duplicate email already linked to a different account). Errors carries the per-rule messages. */
|
|
1144
1372
|
Failure: 3
|
|
1145
1373
|
};
|
|
1146
1374
|
var DateTimeBehavior = {
|
|
1375
|
+
/** Only the date portion is stored; no time component. */
|
|
1147
1376
|
DateOnly: 1,
|
|
1377
|
+
/** The value is stored in UTC and converted to the user's local time zone for display. */
|
|
1148
1378
|
UserLocal: 2,
|
|
1379
|
+
/** The value is stored and displayed exactly as entered, without time zone conversion. */
|
|
1149
1380
|
TimeZoneIndependent: 3
|
|
1150
1381
|
};
|
|
1151
1382
|
var DeletePersonalDataResult = {
|
|
1383
|
+
/** The account was deleted and the auth cookie has been cleared. */
|
|
1152
1384
|
Success: 0,
|
|
1385
|
+
/** The user has a local password set, and one was supplied, but it did not match. The client should show an "incorrect password" error and allow retry. */
|
|
1153
1386
|
IncorrectPassword: 1,
|
|
1387
|
+
/** The user has a local password set but the request body's password field was empty. The client should prompt for the password and resubmit. Distinct from IncorrectPassword so the UI can choose between "please enter your password" and "that password is wrong." */
|
|
1154
1388
|
RequireLocalPassword: 2
|
|
1155
1389
|
};
|
|
1156
1390
|
var ExternalLoginCandidateKind = {
|
|
1391
|
+
/** The candidate is a Dataverse contact record. */
|
|
1157
1392
|
Contact: 0,
|
|
1393
|
+
/** The candidate is a Dataverse systemuser record. */
|
|
1158
1394
|
SystemUser: 1
|
|
1159
1395
|
};
|
|
1160
1396
|
var FileArchiveResponseFormat = {
|
|
1397
|
+
/** Returns the raw archive bytes as the response body, with Content-Type: application/zip (or the matching MIME for the chosen ArchiveFormat) and a Content-Disposition: attachment; filename=… header. The caller hands the response directly to the browser's download path — no base64 round-trip. Default mode. */
|
|
1161
1398
|
BinaryStream: 0,
|
|
1399
|
+
/** Returns a JSON envelope (FileArchiveJsonResponse) that wraps the archive's bytes as base64. Useful when the consumer wants to inspect headers / filename / size programmatically before triggering a download, or when the host environment can't stream binary responses (some test harnesses, some service workers). Trades ~33% wire-size overhead for the JSON wrapper. */
|
|
1162
1400
|
Json: 1
|
|
1163
1401
|
};
|
|
1164
1402
|
var JoinOperator = {
|
|
1403
|
+
/** Inner join — only matching rows are returned. */
|
|
1165
1404
|
Inner: 0,
|
|
1405
|
+
/** Left outer join — unmatched parent rows are returned with null link columns. */
|
|
1166
1406
|
LeftOuter: 1,
|
|
1407
|
+
/** Natural join. */
|
|
1167
1408
|
Natural: 2,
|
|
1409
|
+
/** Match first row using cross apply. */
|
|
1168
1410
|
MatchFirstRowUsingCrossApply: 3,
|
|
1411
|
+
/** In join — semi-join used for subqueries. */
|
|
1169
1412
|
In: 4,
|
|
1413
|
+
/** Exists join — semi-join evaluating existence. */
|
|
1170
1414
|
Exists: 5,
|
|
1415
|
+
/** Any-match semi-join. */
|
|
1171
1416
|
Any: 6,
|
|
1417
|
+
/** Inverse of Any. */
|
|
1172
1418
|
NotAny: 7,
|
|
1419
|
+
/** All-match semi-join. */
|
|
1173
1420
|
All: 8,
|
|
1421
|
+
/** Inverse of All. */
|
|
1174
1422
|
NotAll: 9
|
|
1175
1423
|
};
|
|
1424
|
+
var LocalizationSourceKind = {
|
|
1425
|
+
/** Strings derived from Dataverse table metadata — display names, descriptions, choice option labels, and view names, drawn from whatever language packs are installed in the environment. Loads first in the warmup. */
|
|
1426
|
+
TableMetadata: 0,
|
|
1427
|
+
/** JSON files stored in Dataverse as web resources under the /PowerPortalsPro/Localization/ path prefix. Loads after table metadata. */
|
|
1428
|
+
WebResource: 1,
|
|
1429
|
+
/** JSON or HTML files loaded from a directory or explicit path registered via String) / String). Loads LAST, so its values override anything an earlier source supplied for the same key. */
|
|
1430
|
+
FolderFile: 2
|
|
1431
|
+
};
|
|
1432
|
+
var LocalizationSourceStatus = {
|
|
1433
|
+
/** Load completed successfully; key counts and cultures are populated. */
|
|
1434
|
+
Loaded: 0,
|
|
1435
|
+
/** Load threw an exception; Error captures the message. */
|
|
1436
|
+
Failed: 1,
|
|
1437
|
+
/** Source was discovered but produced no strings (empty file, no matching metadata, etc.). */
|
|
1438
|
+
Skipped: 2
|
|
1439
|
+
};
|
|
1176
1440
|
var LoginResult = {
|
|
1441
|
+
/** Credentials were accepted and the auth cookie has been set. The client should navigate to the post-login destination (typically ReturnUrl). */
|
|
1177
1442
|
Success: 0,
|
|
1443
|
+
/** Credentials were accepted but the account requires a second factor. The server has sent the 2FA code (e.g., via email) and is waiting for a follow-up call to POST /api/auth/login/2fa. No auth cookie is set yet. */
|
|
1178
1444
|
RequiresTwoFactor: 1,
|
|
1445
|
+
/** The email/password pair did not match any account, or the password was wrong. The client should show a generic "invalid credentials" message — the server deliberately does not distinguish between "no such email" and "wrong password" to avoid account-enumeration attacks. */
|
|
1179
1446
|
InvalidCredentials: 2,
|
|
1447
|
+
/** The account exists and the password matched, but the email address has not been confirmed and the host configured SignIn.RequireConfirmedAccount. The client should redirect to the registration-confirmation flow. */
|
|
1180
1448
|
EmailNotConfirmed: 3,
|
|
1449
|
+
/** The account is locked out (too many failed attempts, manual lockout, etc.). The client should show the lockout page. */
|
|
1181
1450
|
LockedOut: 4
|
|
1182
1451
|
};
|
|
1183
1452
|
var RegisterResult = {
|
|
1453
|
+
/** The account was created and a confirmation email has been sent. The user is NOT signed in yet — they must click the confirmation link first. */
|
|
1184
1454
|
ConfirmationEmailSent: 0,
|
|
1455
|
+
/** The account was created and the user has been signed in directly (the host did not configure SignIn.RequireConfirmedAccount). */
|
|
1185
1456
|
SignedIn: 1,
|
|
1457
|
+
/** An account with the same email already exists. The server returns this rather than silently succeeding to give the client an opportunity to surface a clear error, at the cost of allowing email enumeration. Hosts that prefer the enumeration- resistant path should treat this as success client-side. */
|
|
1186
1458
|
EmailAlreadyInUse: 2
|
|
1187
1459
|
};
|
|
1188
1460
|
var RelationshipFilterMode = {
|
|
1461
|
+
/** Return records currently associated with ParentRecord via the named relationship. For one-to-many, AND-merges a referencingColumn == parentRecord.Id condition. For many-to-many, AND-merges an intersect link-entity plus a condition on the parent-side intersect column. */
|
|
1189
1462
|
IncludeExistingRecords: 0,
|
|
1463
|
+
/** Return records that are NOT currently associated with ParentRecord. Many-to-many only — AND-merges a LEFT OUTER intersect link-entity (filtered to the parent's intersect rows) and an outer null-check on the parent-side intersect column, so unrelated records survive but related records get filtered out. */
|
|
1190
1464
|
ExcludeExistingRecords: 1
|
|
1191
1465
|
};
|
|
1192
1466
|
var RequiredLevel = {
|
|
1467
|
+
/** No requirements are specified. */
|
|
1193
1468
|
None: 0,
|
|
1469
|
+
/** The column is required by the system and cannot be null. */
|
|
1194
1470
|
SystemRequired: 1,
|
|
1471
|
+
/** The column is required by the application and should have a value. */
|
|
1195
1472
|
ApplicationRequired: 2,
|
|
1473
|
+
/** It is recommended that the column has a value, but it is not enforced. */
|
|
1196
1474
|
Recommended: 3
|
|
1197
1475
|
};
|
|
1198
1476
|
var ResetPasswordResult = {
|
|
1477
|
+
/** The password was reset and the user can now sign in with the new password. */
|
|
1199
1478
|
Success: 0,
|
|
1479
|
+
/** The token was missing, malformed, expired, or already used. The client should redirect the user to the "request a new reset link" flow. */
|
|
1200
1480
|
InvalidOrExpiredToken: 1,
|
|
1481
|
+
/** The new password did not satisfy the host's password rules. The accompanying ProblemDetails (in the failed-validation HTTP 400) carries the per-rule error messages from IdentityResult.Errors. */
|
|
1201
1482
|
InvalidPassword: 2
|
|
1202
1483
|
};
|
|
1203
1484
|
var SwitchIdentityResult = {
|
|
1485
|
+
/** The alt identity was signed in and the auth cookie has been swapped. */
|
|
1204
1486
|
Switched: 0,
|
|
1487
|
+
/** The current principal has no alt-identity claim — there is nothing to switch to. */
|
|
1205
1488
|
NoAltIdentity: 1,
|
|
1489
|
+
/** The alt identity referenced by the claim no longer exists in Dataverse (or is disabled). */
|
|
1206
1490
|
AltIdentityNotFound: 2,
|
|
1491
|
+
/** The current request is unauthenticated. */
|
|
1207
1492
|
NotAuthenticated: 3
|
|
1208
1493
|
};
|
|
1209
1494
|
var TableSecurityPermission = {
|
|
1495
|
+
/** No permissions. */
|
|
1210
1496
|
None: 0,
|
|
1497
|
+
/** The record can be read. */
|
|
1211
1498
|
Read: 1,
|
|
1499
|
+
/** The record (or table) can have new records created. */
|
|
1212
1500
|
Create: 2,
|
|
1501
|
+
/** The record can be modified. */
|
|
1213
1502
|
Write: 4,
|
|
1503
|
+
/** The record can be deleted. */
|
|
1214
1504
|
Delete: 8,
|
|
1505
|
+
/** The record can be appended to other records (used as the child of a relationship). */
|
|
1215
1506
|
Append: 16,
|
|
1507
|
+
/** Other records can be appended to this record (used as the parent of a relationship). */
|
|
1216
1508
|
AppendTo: 32,
|
|
1509
|
+
/** All permissions except Create. */
|
|
1217
1510
|
All: 63
|
|
1218
1511
|
};
|
|
1219
1512
|
|
|
@@ -1244,6 +1537,8 @@ exports.ExternalLoginCandidateKind = ExternalLoginCandidateKind;
|
|
|
1244
1537
|
exports.FileArchiveResponseFormat = FileArchiveResponseFormat;
|
|
1245
1538
|
exports.InvalidOperationError = InvalidOperationError;
|
|
1246
1539
|
exports.JoinOperator = JoinOperator;
|
|
1540
|
+
exports.LocalizationSourceKind = LocalizationSourceKind;
|
|
1541
|
+
exports.LocalizationSourceStatus = LocalizationSourceStatus;
|
|
1247
1542
|
exports.LoginResult = LoginResult;
|
|
1248
1543
|
exports.PowerPortalsProClient = PowerPortalsProClient;
|
|
1249
1544
|
exports.PowerPortalsProError = PowerPortalsProError;
|