@bzbs/react-api-client 1.1.2 → 1.2.1

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.mjs CHANGED
@@ -352,6 +352,44 @@ var AuthenticateApi = class extends BaseService {
352
352
  );
353
353
  });
354
354
  }
355
+ /**
356
+ * Request apple refresh token from the server
357
+ *
358
+ * @param params - The parameters.
359
+ * @param params.authorizationCode - Apple authorization code
360
+ * @param params.idToken - Apple identity token
361
+ * @param params.appId - Your application id. See in Backoffice on Application
362
+ * @param params.os - Your device operation system + version. Ex. ios 11.2.1 , android 9.0
363
+ * @param params.platform - Your platform. Ex. iPhone , Android
364
+ * @param params.macAddress - Unique device identifier
365
+ * @param params.clientVersion - Number of version (App Prefix + Your application version , Ex. ios_buzzebeesdemo1.0.1)
366
+ * @param params.options - (Optional) Additional params for the request.
367
+ * @param requestOptions - Optional request options.
368
+ * @returns A promise that resolves to a ServiceResponse containing the Apple token response.
369
+ */
370
+ appleToken(params, requestOptions) {
371
+ return __async(this, null, function* () {
372
+ return yield this.post(
373
+ "auth/apple_token",
374
+ __spreadValues({
375
+ authorization_code: params.authorizationCode,
376
+ id_token: params.idToken,
377
+ app_id: params.appId,
378
+ os: params.os,
379
+ platform: params.platform,
380
+ mac_address: params.macAddress,
381
+ client_version: params.clientVersion
382
+ }, params.options),
383
+ {
384
+ headers: __spreadValues({
385
+ "Content-Type": "application/x-www-form-urlencoded"
386
+ }, requestOptions == null ? void 0 : requestOptions.headers),
387
+ data: requestOptions == null ? void 0 : requestOptions.data,
388
+ params: requestOptions == null ? void 0 : requestOptions.params
389
+ }
390
+ );
391
+ });
392
+ }
355
393
  /**
356
394
  * Performs a username and password login using the provided username and password.
357
395
  *