@stack-spot/portal-network 0.120.0 → 0.121.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.
@@ -8,11 +8,11 @@ import * as Oazapfts from "@oazapfts/runtime";
8
8
  import * as QS from "@oazapfts/runtime/query";
9
9
  export const defaults: Oazapfts.Defaults<Oazapfts.CustomHeaders> = {
10
10
  headers: {},
11
- baseUrl: "https://insights-insights-api.stg.stackspot.com",
11
+ baseUrl: "https://insights-insights-api.dev.stackspot.com",
12
12
  };
13
13
  const oazapfts = Oazapfts.runtime(defaults);
14
14
  export const servers = {
15
- generatedServerUrl: "https://insights-insights-api.stg.stackspot.com"
15
+ generatedServerUrl: "https://insights-insights-api.dev.stackspot.com"
16
16
  };
17
17
  export type NewPanelRequest = {
18
18
  panelType: string;
@@ -56,6 +56,14 @@ export type Panel = {
56
56
  data?: {
57
57
  [key: string]: object;
58
58
  }[];
59
+ /** The page number returned when paging through panel data. */
60
+ pageNumber?: number;
61
+ /** The page size returned when paging through panel data. */
62
+ pageSize?: number;
63
+ /** The total number of pages available to return paged panel data. */
64
+ totalPages?: number;
65
+ /** The total number of elements available to return paged panel data. */
66
+ totalElements?: number;
59
67
  };
60
68
  export type DashboardReadResponse = {
61
69
  /** Panels in a dashboard. */
@@ -245,11 +253,13 @@ export function downloadAccountData({ accountSlug, startDate, endDate, dataset,
245
253
  /**
246
254
  * Get Dashboard Account
247
255
  */
248
- export function getDashboardAccount({ accountSlug, startDate, endDate, panels, stackspotCustomerIp }: {
256
+ export function getDashboardAccount({ accountSlug, startDate, endDate, panels, page, size, stackspotCustomerIp }: {
249
257
  accountSlug: string;
250
258
  startDate?: string;
251
259
  endDate?: string;
252
260
  panels?: string[];
261
+ page?: number;
262
+ size?: number;
253
263
  stackspotCustomerIp?: string;
254
264
  }, opts?: Oazapfts.RequestOpts) {
255
265
  return oazapfts.ok(oazapfts.fetchJson<{
@@ -264,7 +274,9 @@ export function getDashboardAccount({ accountSlug, startDate, endDate, panels, s
264
274
  }>(`/v1/dashboards/account/${encodeURIComponent(accountSlug)}${QS.query(QS.explode({
265
275
  startDate,
266
276
  endDate,
267
- panels
277
+ panels,
278
+ page,
279
+ size
268
280
  }))}`, {
269
281
  ...opts,
270
282
  headers: oazapfts.mergeHeaders(opts?.headers, {
@@ -17,6 +17,7 @@ import {
17
17
  createUser,
18
18
  deactivateFidoCredentials,
19
19
  defaults,
20
+ delete1,
20
21
  deleteAccountRole,
21
22
  deleteExtension,
22
23
  deleteExtensionLink,
@@ -25,7 +26,8 @@ import {
25
26
  deleteMember,
26
27
  deleteMemberFavorite,
27
28
  deletePartner, deleteProfileImage,
28
- deleteResourceFromGroup, deleteRole, deleteSecret, deleteSso, deleteV1GroupsByGroupId, disablePersonalAccessTokenGeneration,
29
+ deleteResourceFromGroup, deleteRole, deleteSecret, deleteSso,
30
+ disablePersonalAccessTokenGeneration,
29
31
  disableSecret,
30
32
  disassociateGroupToServiceCredential, enableFidoCredentials,
31
33
  enableSecret,
@@ -41,7 +43,8 @@ import {
41
43
  getAllGroupMapping,
42
44
  getAllMemberFidoCredentials,
43
45
  getAllServiceCredentialRateLimit,
44
- getExtensionVersion, getFeatures,
46
+ getExtensionVersion,
47
+ getFeatures2,
45
48
  getGroupById,
46
49
  getGroupResources,
47
50
  getGroupResources1,
@@ -113,6 +116,7 @@ import {
113
116
  updateServiceCredentialScopes,
114
117
  updateSso,
115
118
  updateUser,
119
+ validateCampaignCode,
116
120
  validateNewPartnerData,
117
121
  validatePartnerAssociationLimit,
118
122
  } from '../api/account'
@@ -143,7 +147,7 @@ class AccountClient extends ReactQueryNetworkClient {
143
147
  /**
144
148
  * Lists all Feature Flags in an Account
145
149
  */
146
- featureFlags = this.query(getFeatures)
150
+ featureFlags = this.query(getFeatures2)
147
151
  /**
148
152
  * Gets Partners with whom it is allowed to share content.
149
153
  */
@@ -270,7 +274,7 @@ class AccountClient extends ReactQueryNetworkClient {
270
274
  /**
271
275
  * Deletes a group.
272
276
  */
273
- deleteGroup = this.mutation(deleteV1GroupsByGroupId)
277
+ deleteGroup = this.mutation(delete1)
274
278
  /**
275
279
  * Gets all members in a group (paginated).
276
280
  */
@@ -806,6 +810,11 @@ class AccountClient extends ReactQueryNetworkClient {
806
810
  * Revoke a service credential V2
807
811
  */
808
812
  revokeServiceCredentialV2 = this.mutation(revokeServiceCredential)
813
+
814
+ /**
815
+ * Validates a campaign code.
816
+ */
817
+ validateCampaignCode = this.query(validateCampaignCode)
809
818
  }
810
819
 
811
820
  export const accountClient = new AccountClient()