@botpress/api 0.4.0 → 0.5.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/src/gen/state.ts CHANGED
@@ -2681,6 +2681,116 @@ export const state = {
2681
2681
  },
2682
2682
  },
2683
2683
  },
2684
+ getAuditRecords: {
2685
+ name: "getAuditRecords",
2686
+ description:
2687
+ "Get the audit records of a workspace, sorted from most recent to oldest.",
2688
+ method: "get",
2689
+ path: "/v1/admin/workspaces/{id}/audit-records",
2690
+ parameters: {
2691
+ nextToken: {
2692
+ in: "query",
2693
+ description:
2694
+ "Provide the `meta.nextToken` value provided in the last API response to retrieve the next page of results",
2695
+ type: "string",
2696
+ },
2697
+ id: {
2698
+ type: "string",
2699
+ description: "Workspace ID",
2700
+ in: "path",
2701
+ },
2702
+ },
2703
+ disableDefaultParameters: {
2704
+ "x-workspace-id": true,
2705
+ },
2706
+ response: {
2707
+ description: "List of audit records",
2708
+ schema: {
2709
+ type: "object",
2710
+ properties: {
2711
+ records: {
2712
+ type: "array",
2713
+ items: {
2714
+ type: "object",
2715
+ properties: {
2716
+ id: {
2717
+ type: "string",
2718
+ format: "uuid",
2719
+ },
2720
+ recordedAt: {
2721
+ type: "string",
2722
+ format: "date-time",
2723
+ },
2724
+ userId: {
2725
+ type: "string",
2726
+ format: "uuid",
2727
+ nullable: true,
2728
+ },
2729
+ userEmail: {
2730
+ type: "string",
2731
+ nullable: true,
2732
+ },
2733
+ resourceId: {
2734
+ type: "string",
2735
+ format: "uuid",
2736
+ nullable: true,
2737
+ },
2738
+ resourceName: {
2739
+ type: "string",
2740
+ nullable: true,
2741
+ },
2742
+ action: {
2743
+ type: "string",
2744
+ enum: [
2745
+ "UNKNOWN",
2746
+ "ADD_COLLABORATOR",
2747
+ "REMOVE_COLLABORATOR",
2748
+ "UPDATE_WORKSPACE_MEMBER",
2749
+ "CLOSE_WORKSPACE",
2750
+ "CREATE_BOT",
2751
+ "CREATE_WORKSPACE",
2752
+ "DELETE_BOT",
2753
+ "DEPLOY_BOT",
2754
+ "TRANSFER_BOT",
2755
+ "DOWNGRADE_WORKSPACE_PLAN",
2756
+ "DOWNLOAD_BOT_ARCHIVE",
2757
+ "UPDATE_BOT",
2758
+ "UPDATE_BOT_CHANNEL",
2759
+ "UPDATE_BOT_CONFIG",
2760
+ "UPDATE_PAYMENT_METHOD",
2761
+ "UPDATE_WORKSPACE",
2762
+ "UPGRADE_WORKSPACE_PLAN",
2763
+ "SET_SPENDING_LIMIT",
2764
+ ],
2765
+ },
2766
+ },
2767
+ required: [
2768
+ "id",
2769
+ "recordedAt",
2770
+ "userId",
2771
+ "resourceId",
2772
+ "action",
2773
+ ],
2774
+ },
2775
+ },
2776
+ meta: {
2777
+ type: "object",
2778
+ properties: {
2779
+ nextToken: {
2780
+ type: "string",
2781
+ description:
2782
+ "The token to use to retrieve the next page of results, passed as a query string parameter (value should be URL-encoded) to this API endpoint.",
2783
+ },
2784
+ },
2785
+ additionalProperties: false,
2786
+ },
2787
+ },
2788
+ required: ["records", "meta"],
2789
+ title: "getAuditRecordsResponse",
2790
+ additionalProperties: false,
2791
+ },
2792
+ },
2793
+ },
2684
2794
  createIntegration: {
2685
2795
  name: "createIntegration",
2686
2796
  description: "Create integration",
@@ -4038,7 +4148,7 @@ export const state = {
4038
4148
  title: "Botpress API",
4039
4149
  description: "API for Botpress Cloud",
4040
4150
  server: "https://api.botpress.cloud",
4041
- version: "0.4.0",
4151
+ version: "0.5.1",
4042
4152
  prefix: "v1",
4043
4153
  },
4044
4154
  errors: [
@@ -4139,6 +4249,11 @@ export const state = {
4139
4249
  type: "RateLimited",
4140
4250
  description: "The request has been rate limited.",
4141
4251
  },
4252
+ {
4253
+ status: 402,
4254
+ type: "PaymentRequired",
4255
+ description: "A payment is required to perform this request.",
4256
+ },
4142
4257
  ],
4143
4258
  refs: {
4144
4259
  parameters: {},
@@ -4215,6 +4330,7 @@ export const state = {
4215
4330
  listWorkspacesResponse: true,
4216
4331
  changeWorkspacePlanResponse: true,
4217
4332
  deleteWorkspaceResponse: true,
4333
+ getAuditRecordsResponse: true,
4218
4334
  createIntegrationResponse: true,
4219
4335
  updateIntegrationResponse: true,
4220
4336
  listIntegrationsResponse: true,