Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DEV-1983][DEV-1986] Add function to subscribe and unsubscribe contact from active campaign list #1257

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tommaso1
Copy link
Collaborator

@tommaso1 tommaso1 commented Nov 26, 2024

List of Changes

Add function to subscribe and unsubscribe contact from active campaign list

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Screenshot 2024-11-26 at 11 26 46

Types of changes

  • Chore (nothing changes by a user perspective)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Copy link

changeset-bot bot commented Nov 26, 2024

🦋 Changeset detected

Latest commit: 3d530c3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
active-campaign-client Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@marcobottaro marcobottaro changed the title [DEV-1983][DEV-1986] Add function to subscribe and upsubscribe contact from active campaign [DEV-1983][DEV-1986] Add function to subscribe and unsubscribe contact from active campaign list Nov 26, 2024
Copy link
Contributor

github-actions bot commented Nov 26, 2024

Jira Pull Request Link

This Pull Request refers to the following Jira issue DEV-1983

Comment on lines +3 to +4
// remove .skip to run the test, be aware it does real API calls
describe('manage list subscription', () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What skip?

Suggested change
// remove .skip to run the test, be aware it does real API calls
describe('manage list subscription', () => {
// remove .skip to run the test, be aware it does real API calls
describe.skip('manage list subscription', () => {

const cognitoUserId = '66ae52a0-f051-7080-04a1-465b3a4f44cc';
const listName = 'test-webinar-1732097286071';

it('should subscriber the contact to the list', async () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
it('should subscriber the contact to the list', async () => {
it('should subscribe the contact to the list', async () => {

};
}

const listId = await acClient.getListIdByName(listName);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if the listId does not exist?

import { acClient } from '../utils/activeCampaignClient';

export async function manageListSubscription(
username: string,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the proper name of this attribute cognitoId, cognitoUserId or username?


// remove .skip to run the test, be aware it does real API calls
describe('manage list subscription', () => {
const cognitoUserId = '66ae52a0-f051-7080-04a1-465b3a4f44cc';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the proper name of this constant cognitoId, cognitoUserId or username?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants