spitfirepm 23.9600.12 → 23.9600.14

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 CHANGED
@@ -25,6 +25,7 @@ apiResult.then( (a) => {
25
25
  ### Change Log
26
26
 
27
27
  ```
28
+ 23.9600.13 - ARR cleanup
28
29
  23.9600.12 - ARR endpoints
29
30
  23.9600.11 - Adds Admin and Manage Tool Data Models and Endpoints
30
31
  23.9600.10 - Adds csi-maintenance
@@ -27,8 +27,8 @@ export declare class AccountClient extends APIClientBase {
27
27
  private processGetAccessAllowsWithCallbacks;
28
28
  protected processGetAccessAllows(xhr: any): PermissionFlags | null;
29
29
  /**
30
- * Mint a short-lived download-session cookie
31
- * @return Download cookie set (or an sfSession cookie was already present)
30
+ * Mint a short-lived download-ticket cookie
31
+ * @return Download ticket cookie set
32
32
  */
33
33
  postDownloadSession(): Promise<string>;
34
34
  private postDownloadSessionWithCallbacks;
@@ -384,13 +384,13 @@ export declare class ARRClient extends APIClientBase {
384
384
  protected jsonParseReviver: ((key: string, value: any) => any) | undefined;
385
385
  constructor(baseUrl?: string);
386
386
  /**
387
- * Build the routed-content download package
387
+ * Queue the routed-content download package build
388
388
  * @param data download request {RouteID}
389
389
  */
390
- getContent(data: ArrResponseData): Promise<string | null>;
390
+ getContent(data: ArrResponseData): Promise<string>;
391
391
  private getContentWithCallbacks;
392
392
  private processGetContentWithCallbacks;
393
- protected processGetContent(xhr: any): string | null | null;
393
+ protected processGetContent(xhr: any): string | null;
394
394
  /**
395
395
  * Open a route-response link
396
396
  * @param request open request {StepKey, RouteID}
@@ -3389,6 +3389,17 @@ export declare class SystemClient extends APIClientBase {
3389
3389
  private getPublicResourceWithCallbacks;
3390
3390
  private processGetPublicResourceWithCallbacks;
3391
3391
  protected processGetPublicResource(xhr: any): string | null | null;
3392
+ /**
3393
+ * Returns the reCAPTCHA Enterprise site key
3394
+ */
3395
+ getRecaptchaConfig(): Promise<{
3396
+ [key: string]: string;
3397
+ } | null>;
3398
+ private getRecaptchaConfigWithCallbacks;
3399
+ private processGetRecaptchaConfigWithCallbacks;
3400
+ protected processGetRecaptchaConfig(xhr: any): {
3401
+ [key: string]: string;
3402
+ } | null | null;
3392
3403
  /**
3393
3404
  * Returns statistical data
3394
3405
  * @param withDetails (optional)
@@ -3776,6 +3787,8 @@ export interface ArrOpenRequest {
3776
3787
  StepKey?: string;
3777
3788
  /** RouteID from the link. */
3778
3789
  RouteID?: string;
3790
+ /** reCAPTCHA Enterprise token from the client, assessed before the route is resolved. */
3791
+ RecaptchaToken?: string | undefined;
3779
3792
  }
3780
3793
  /** Everything the Webix arr view needs to render, plus the (optional) ARR session token. */
3781
3794
  export interface ArrOpenResult {
@@ -233,8 +233,8 @@ class AccountClient extends APIClientBase_1.APIClientBase {
233
233
  return null;
234
234
  }
235
235
  /**
236
- * Mint a short-lived download-session cookie
237
- * @return Download cookie set (or an sfSession cookie was already present)
236
+ * Mint a short-lived download-ticket cookie
237
+ * @return Download ticket cookie set
238
238
  */
239
239
  postDownloadSession() {
240
240
  return new Promise((resolve, reject) => {
@@ -282,7 +282,7 @@ class AccountClient extends APIClientBase_1.APIClientBase {
282
282
  const _responseText = xhr.responseText;
283
283
  let result401 = null;
284
284
  result401 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
285
- return throwException("No recognized identity", status, _responseText, _headers, result401);
285
+ return throwException("No download-session token presented", status, _responseText, _headers, result401);
286
286
  }
287
287
  else if (status !== 200 && status !== 204) {
288
288
  const _responseText = xhr.responseText;
@@ -637,6 +637,12 @@ class AccountClient extends APIClientBase_1.APIClientBase {
637
637
  result403 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
638
638
  return throwException("Not allowed", status, _responseText, _headers, result403);
639
639
  }
640
+ else if (status === 500) {
641
+ const _responseText = xhr.responseText;
642
+ let result500 = null;
643
+ result500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
644
+ return throwException("Backend failure", status, _responseText, _headers, result500);
645
+ }
640
646
  else if (status !== 200 && status !== 204) {
641
647
  const _responseText = xhr.responseText;
642
648
  return throwException("An unexpected server error occurred.", status, _responseText, _headers);
@@ -2925,7 +2931,7 @@ class ARRClient extends APIClientBase_1.APIClientBase {
2925
2931
  this.baseUrl = baseUrl ?? this.getBaseUrl("https://dev.spitfirepm.com:8443/SFPMS");
2926
2932
  }
2927
2933
  /**
2928
- * Build the routed-content download package
2934
+ * Queue the routed-content download package build
2929
2935
  * @param data download request {RouteID}
2930
2936
  */
2931
2937
  getContent(data) {
@@ -2995,7 +3001,7 @@ class ARRClient extends APIClientBase_1.APIClientBase {
2995
3001
  const _responseText = xhr.responseText;
2996
3002
  let result500 = null;
2997
3003
  result500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2998
- return throwException("Could not build package; see response", status, _responseText, _headers, result500);
3004
+ return throwException("Could not queue package build; see response", status, _responseText, _headers, result500);
2999
3005
  }
3000
3006
  else if (status !== 200 && status !== 204) {
3001
3007
  const _responseText = xhr.responseText;
@@ -3058,6 +3064,12 @@ class ARRClient extends APIClientBase_1.APIClientBase {
3058
3064
  result400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3059
3065
  return throwException("Keys missing or malformed", status, _responseText, _headers, result400);
3060
3066
  }
3067
+ else if (status === 403) {
3068
+ const _responseText = xhr.responseText;
3069
+ let result403 = null;
3070
+ result403 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3071
+ return throwException("reCAPTCHA verification failed", status, _responseText, _headers, result403);
3072
+ }
3061
3073
  else if (status === 404) {
3062
3074
  const _responseText = xhr.responseText;
3063
3075
  let result404 = null;
@@ -30199,6 +30211,57 @@ class SystemClient extends APIClientBase_1.APIClientBase {
30199
30211
  }
30200
30212
  return null;
30201
30213
  }
30214
+ /**
30215
+ * Returns the reCAPTCHA Enterprise site key
30216
+ */
30217
+ getRecaptchaConfig() {
30218
+ return new Promise((resolve, reject) => {
30219
+ this.getRecaptchaConfigWithCallbacks((result) => resolve(result), (exception, _reason) => reject(exception));
30220
+ });
30221
+ }
30222
+ getRecaptchaConfigWithCallbacks(onSuccess, onFail) {
30223
+ let url_ = this.baseUrl + "/api/system/recaptcha";
30224
+ url_ = url_.replace(/[?&]$/, "");
30225
+ jQuery.ajax({
30226
+ url: url_,
30227
+ beforeSend: this.beforeSend,
30228
+ type: "get",
30229
+ dataType: "text",
30230
+ headers: {
30231
+ "Accept": "application/json"
30232
+ }
30233
+ }).done((_data, _textStatus, xhr) => {
30234
+ this.processGetRecaptchaConfigWithCallbacks(url_, xhr, onSuccess, onFail);
30235
+ }).fail((xhr) => {
30236
+ this.processGetRecaptchaConfigWithCallbacks(url_, xhr, onSuccess, onFail);
30237
+ });
30238
+ }
30239
+ processGetRecaptchaConfigWithCallbacks(_url, xhr, onSuccess, onFail) {
30240
+ try {
30241
+ let result = this.transformResult(_url, xhr, (xhr) => this.processGetRecaptchaConfig(xhr));
30242
+ if (onSuccess !== undefined)
30243
+ onSuccess(result);
30244
+ }
30245
+ catch (e) {
30246
+ if (onFail !== undefined)
30247
+ onFail(e, "http_service_exception");
30248
+ }
30249
+ }
30250
+ processGetRecaptchaConfig(xhr) {
30251
+ const status = xhr.status;
30252
+ let _headers = {};
30253
+ if (status === 200) {
30254
+ const _responseText = xhr.responseText;
30255
+ let result200 = null;
30256
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
30257
+ return result200;
30258
+ }
30259
+ else if (status !== 200 && status !== 204) {
30260
+ const _responseText = xhr.responseText;
30261
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
30262
+ }
30263
+ return null;
30264
+ }
30202
30265
  /**
30203
30266
  * Returns statistical data
30204
30267
  * @param withDetails (optional)