Skip to content

Commit

Permalink
refactor: Migrate IdentityAPIClient to TypeScript
Browse files Browse the repository at this point in the history
  • Loading branch information
alexs-mparticle committed Nov 20, 2024
1 parent b6883b6 commit cc84d6f
Show file tree
Hide file tree
Showing 12 changed files with 768 additions and 402 deletions.
90 changes: 0 additions & 90 deletions src/aliasRequestApiClient.ts

This file was deleted.

4 changes: 2 additions & 2 deletions src/audienceManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
FetchUploader,
XHRUploader,
AsyncUploader,
fetchPayload
IFetchPayload
} from './uploaders';
import Audience from './audience';

Expand Down Expand Up @@ -38,7 +38,7 @@ export default class AudienceManager {
public async sendGetUserAudienceRequest(mpid: string, callback: (userAudiences: IAudienceMemberships) => void) {
this.logger.verbose('Fetching user audiences from server');

const fetchPayload: fetchPayload = {
const fetchPayload: IFetchPayload = {
method: 'GET',
headers: {
Accept: '*/*',
Expand Down
4 changes: 2 additions & 2 deletions src/batchUploader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
AsyncUploader,
FetchUploader,
XHRUploader,
fetchPayload,
IFetchPayload,
} from './uploaders';
import { IMParticleUser } from './identity-user-interfaces';

Expand Down Expand Up @@ -366,7 +366,7 @@ export class BatchUploader {
logger.verbose(`Batch count: ${uploads.length}`);

for (let i = 0; i < uploads.length; i++) {
const fetchPayload: fetchPayload = {
const fetchPayload: IFetchPayload = {
method: 'POST',
headers: {
Accept: BatchUploader.CONTENT_TYPE,
Expand Down
4 changes: 2 additions & 2 deletions src/configAPIClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
import { Dictionary } from './utils';
import {
AsyncUploader,
fetchPayload,
IFetchPayload,
FetchUploader,
XHRUploader,
} from './uploaders';
Expand Down Expand Up @@ -125,7 +125,7 @@ export default function ConfigAPIClient(

this.getSDKConfiguration = async (): Promise<IConfigResponse> => {
let configResponse: IConfigResponse;
const fetchPayload: fetchPayload = {
const fetchPayload: IFetchPayload = {
method: 'get',
headers: {
Accept: 'text/plain;charset=UTF-8',
Expand Down
44 changes: 0 additions & 44 deletions src/identityApiClient.interfaces.ts

This file was deleted.

131 changes: 0 additions & 131 deletions src/identityApiClient.js

This file was deleted.

Loading

0 comments on commit cc84d6f

Please sign in to comment.