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