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

add --expunge option to event-type delete #100

Merged
merged 3 commits into from
Sep 27, 2023

Conversation

svix-onelson
Copy link
Contributor

@svix-onelson svix-onelson commented Sep 25, 2023

Some small fixups were required to update the version of the svix client lib. Specifically, endpoint version is now optional.


Verification for expunge:

$ ./svix-cli event-type list
{
  "data": [
    {
      "archived": false,
      "createdAt": "2023-09-27T00:47:39.841665Z",
      "description": "",
      "featureFlag": null,
      "name": "bar",
      "updatedAt": "2023-09-27T00:47:39.841678Z"
    },
    {
      "archived": false,
      "createdAt": "2023-09-27T00:47:35.572796Z",
      "description": "",
      "featureFlag": null,
      "name": "foo",
      "updatedAt": "2023-09-27T00:47:35.57282Z"
    }
  ],
  "done": true,
  "iterator": "foo",
  "prevIterator": "-bar"
}

$ ./svix-cli event-type delete foo
Are you sure you want to delete the event with id: foo: y
Event Type "foo" Deleted!

$ ./svix-cli event-type delete --expunge bar
Are you sure you want to delete the event with id: bar: y
Event Type "bar" Deleted!

$ ./svix-cli event-type list
{
  "data": [],
  "done": true,
  "iterator": null
}

$ ./svix-cli event-type list --include-archived
{
  "data": [
    {
      "archived": true,
      "createdAt": "2023-09-27T00:47:35.572796Z",
      "description": "",
      "featureFlag": null,
      "name": "foo",
      "updatedAt": "2023-09-27T00:48:10.556405Z"
    }
  ],
  "done": true,
  "iterator": "foo",
  "prevIterator": "-foo"
}

Verification for the endpoint version being optional now:

$ ./svix-cli endpoint create demo --data-url https://example.com/1
{
  "createdAt": "2023-09-27T01:05:42.270296Z",
  "description": "",
  "disabled": false,
  "id": "ep_2VxTTtr068YYOUNEzRTTCtzqhQk",
  "metadata": {},
  "rateLimit": null,
  "uid": null,
  "updatedAt": "2023-09-27T01:05:42.27031Z",
  "url": "https://example.com/1",
  "version": 1
}

$ ./svix-cli endpoint create demo --data-url https://example.com/22 --data-version 22
{
  "createdAt": "2023-09-27T01:07:32.855187Z",
  "description": "",
  "disabled": false,
  "id": "ep_2VxThnLAdOyT9RvlspOhHjoR8Cm",
  "metadata": {},
  "rateLimit": null,
  "uid": null,
  "updatedAt": "2023-09-27T01:07:32.8552Z",
  "url": "https://example.com/22",
  "version": 22
}

@svix-onelson svix-onelson marked this pull request as ready for review September 27, 2023 01:16
@svix-onelson svix-onelson requested a review from a team September 27, 2023 01:17
@svix-onelson svix-onelson merged commit ed3dbf6 into main Sep 27, 2023
1 check passed
@svix-onelson svix-onelson deleted the onelson/expunge-event-type branch September 27, 2023 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants