@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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.121.1](https://github.com/stack-spot/portal-commons/compare/portal-network@v0.121.0...portal-network@v0.121.1) (2025-04-30)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * update insights ([#978](https://github.com/stack-spot/portal-commons/issues/978)) ([e0a0f5b](https://github.com/stack-spot/portal-commons/commit/e0a0f5b3b089741ac7c50feaa061232a9192285c))
9
+
10
+ ## [0.121.0](https://github.com/stack-spot/portal-commons/compare/portal-network@v0.120.0...portal-network@v0.121.0) (2025-04-30)
11
+
12
+
13
+ ### Features
14
+
15
+ * campaign code services ([#975](https://github.com/stack-spot/portal-commons/issues/975)) ([07f29ce](https://github.com/stack-spot/portal-commons/commit/07f29ceb05f65b2f8525bf6dcc4d21d373e71e25))
16
+
3
17
  ## [0.120.0](https://github.com/stack-spot/portal-commons/compare/portal-network@v0.119.1...portal-network@v0.120.0) (2025-04-30)
4
18
 
5
19
 
@@ -53,6 +53,58 @@ export type ServiceCredentialRateLimitRequest = {
53
53
  /** List of service credential IDs */
54
54
  serviceCredentialIds: string[];
55
55
  };
56
+ export type UpdateResourcesTypeRequest = {
57
+ /** The resource type */
58
+ resourceType: string;
59
+ /** The feature flag mode */
60
+ mode: "ALL" | "NONE" | "SPECIFIC";
61
+ /** The resource slugs */
62
+ slugs?: string[];
63
+ };
64
+ export type UpdateFeatureFlagAccountRequest = {
65
+ resources: UpdateResourcesTypeRequest;
66
+ /** The feature flag is enabled */
67
+ enabled: boolean;
68
+ };
69
+ export type UpdateFeatureFlagRequest = {
70
+ /** The feature flag name */
71
+ name: string;
72
+ /** The feature flag slug */
73
+ slug: string;
74
+ /** The feature flag description */
75
+ description: string;
76
+ /** The feature flag auto create */
77
+ autoCreate: boolean;
78
+ /** The feature flag system */
79
+ system: boolean;
80
+ };
81
+ export type UpdateFeatureFlagsResponse = {
82
+ /** The feature flag id */
83
+ id: number;
84
+ /** The feature flag name */
85
+ name: string;
86
+ /** The feature flag slug */
87
+ slug: string;
88
+ /** The feature flag description */
89
+ description: string;
90
+ /** If the feature flag is autoCreate or not in the current account */
91
+ autoCreate: boolean;
92
+ /** If the feature flag is system or not in the current account */
93
+ system: boolean;
94
+ };
95
+ export type ResourcesTypeRequest = {
96
+ /** The resource type */
97
+ resourceType: string;
98
+ /** The feature flag mode */
99
+ mode: "ALL" | "NONE" | "SPECIFIC";
100
+ /** The resource slugs */
101
+ slugs?: string[];
102
+ };
103
+ export type CreateFeatureFlagAccountRequest = {
104
+ resources: ResourcesTypeRequest;
105
+ /** The feature flag is enabled */
106
+ enabled: boolean;
107
+ };
56
108
  export type UserScmInfoResponse = {
57
109
  /** Secrets name */
58
110
  secretName: string;
@@ -350,14 +402,6 @@ export type UserInvitationResponse = {
350
402
  /** Current status of the invitation */
351
403
  status: "ACCEPTED" | "PENDING" | "CANCELLED";
352
404
  };
353
- export type UpdateFeatureFlagRequest = {
354
- /** The feature flag name */
355
- name: string;
356
- /** The feature flag slug */
357
- slug: string;
358
- /** The feature flag description */
359
- description: string;
360
- };
361
405
  export type UpdateSalesRepresentativesRequest = {
362
406
  /** List of emails from sales representatives responsible for the account. */
363
407
  salesRepresentatives: string[];
@@ -549,6 +593,58 @@ export type ServiceCredentialCreateResponseV2 = {
549
593
  /** Account tenant */
550
594
  tenant: string;
551
595
  };
596
+ export type FeatureFlagsResourceCountResponse = {
597
+ /** The Feature Flag Resource Mode */
598
+ mode?: "ALL" | "NONE" | "SPECIFIC";
599
+ /** The Resource's Slug */
600
+ slug?: string;
601
+ /** The Quantity of Resources in The Feature FLag */
602
+ resourceCount: number;
603
+ };
604
+ export type FeatureFlagsResponseV2 = {
605
+ /** The feature flag id */
606
+ id: number;
607
+ /** The feature flag name */
608
+ name: string;
609
+ /** The feature flag slug */
610
+ slug: string;
611
+ /** The feature flag description */
612
+ description: string;
613
+ /** If the feature flag is auto create or not in the current account */
614
+ autoCreate: boolean;
615
+ /** If the feature flag is enabled or not in the current account */
616
+ status?: boolean;
617
+ /** If the feature flag is system or not in the current account */
618
+ system: boolean;
619
+ /** The count of the resources in the feature flag */
620
+ resourceType?: FeatureFlagsResourceCountResponse[];
621
+ };
622
+ export type CreateFeatureFlagRequest = {
623
+ /** The feature flag name */
624
+ name: string;
625
+ /** The feature flag slug */
626
+ slug: string;
627
+ /** The feature flag description */
628
+ description: string;
629
+ /** The feature flag auto create */
630
+ autoCreate: boolean;
631
+ /** The feature flag system */
632
+ system: boolean;
633
+ };
634
+ export type CreateFeatureFlagsResponse = {
635
+ /** The feature flag id */
636
+ id: number;
637
+ /** The feature flag name */
638
+ name: string;
639
+ /** The feature flag slug */
640
+ slug: string;
641
+ /** The feature flag description */
642
+ description: string;
643
+ /** If the feature flag is autoCreate or not in the current account */
644
+ autoCreate: boolean;
645
+ /** If the feature flag is system or not in the current account */
646
+ system: boolean;
647
+ };
552
648
  export type StatementRequest = {
553
649
  /** Resource id */
554
650
  resource: string;
@@ -1029,24 +1125,6 @@ export type ReadGroupMembersResponse = {
1029
1125
  export type GroupMemberIdsRequest = {
1030
1126
  ids: string[];
1031
1127
  };
1032
- export type FeatureFlagsResponse = {
1033
- /** The feature flag id */
1034
- id: number;
1035
- /** The feature flag name */
1036
- name: string;
1037
- /** The feature flag slug */
1038
- slug: string;
1039
- /** If the feature flag is enabled or not in the current account */
1040
- enabled: boolean;
1041
- };
1042
- export type CreateFeatureFlagRequest = {
1043
- /** The feature flag name */
1044
- name: string;
1045
- /** The feature flag slug */
1046
- slug: string;
1047
- /** The feature flag description */
1048
- description: string;
1049
- };
1050
1128
  export type ExtensionInfoByLanguageResponse = {
1051
1129
  pt?: string;
1052
1130
  en?: string;
@@ -1158,6 +1236,10 @@ export type ContactEmailRequest = {
1158
1236
  /** Telephone of the contact requester */
1159
1237
  telephone?: string;
1160
1238
  };
1239
+ export type CampaignAvailableResponse = {
1240
+ /** Campaign Status */
1241
+ isAvailable: boolean;
1242
+ };
1161
1243
  export type SwitchAccountRequest = {
1162
1244
  /** Account slug to switch to */
1163
1245
  accountId: string;
@@ -1295,6 +1377,8 @@ export type AccountTrialCreateRequest = {
1295
1377
  reachedBy?: ("GOOGLE_SEARCH" | "REFERRAL" | "SOCIAL_MEDIA" | "ONLINE_AD" | "EVENT_CONFERENCE" | "EMAIL_CAMPAIGN" | "FRIEND_COLLEAGUE" | "BLOG_ARTICLE" | "YOUTUBE_VIDEO_CONTENT" | "ZUP_OFFICIAL_CHANNELS" | "OTHER")[];
1296
1378
  /** The custom channel used for the trial user to reach Stackspot */
1297
1379
  customReachedBy?: string;
1380
+ /** The campaign code */
1381
+ campaignCode?: string;
1298
1382
  };
1299
1383
  export type PersonalAccountExpirationDataResponse = {
1300
1384
  /** Account id */
@@ -1808,6 +1892,32 @@ export type PageResponseReadGroupMembersResponse = {
1808
1892
  /** Total pages found */
1809
1893
  totalPages: number;
1810
1894
  };
1895
+ export type PageResponseFeatureFlagsResponseV2 = {
1896
+ /** Current page content */
1897
+ items?: FeatureFlagsResponseV2[];
1898
+ /** Total elements found */
1899
+ totalElements: number;
1900
+ /** Current page number */
1901
+ page: number;
1902
+ /** Length of current page items */
1903
+ size: number;
1904
+ /** Total pages found */
1905
+ totalPages: number;
1906
+ };
1907
+ export type FeatureFlagReadResourceResponse = {
1908
+ /** Enum representing the mode of a feature flag */
1909
+ mode: "ALL" | "NONE" | "SPECIFIC";
1910
+ /** A list of resource slugs the feature flag applies to */
1911
+ slugs: string[];
1912
+ };
1913
+ export type FeatureFlagReadResponse = {
1914
+ /** The slug of the feature flag */
1915
+ slug: string;
1916
+ /** A map of resources associated with the feature flag */
1917
+ resources: {
1918
+ [key: string]: FeatureFlagReadResourceResponse;
1919
+ };
1920
+ };
1811
1921
  export type AccountCollaborationInfoResponse = {
1812
1922
  /** Account ID */
1813
1923
  id: string;
@@ -1917,6 +2027,16 @@ export type ResourceDto = {
1917
2027
  description?: string;
1918
2028
  "type"?: ResourceTypeDto;
1919
2029
  };
2030
+ export type FeatureFlagsResponse = {
2031
+ /** The feature flag id */
2032
+ id: number;
2033
+ /** The feature flag name */
2034
+ name: string;
2035
+ /** The feature flag slug */
2036
+ slug: string;
2037
+ /** If the feature flag is enabled or not in the current account */
2038
+ enabled: boolean;
2039
+ };
1920
2040
  export type ExtensionVersionInfoByLanguageResponse = {
1921
2041
  pt?: string;
1922
2042
  en?: string;
@@ -2051,10 +2171,53 @@ export declare function getAllServiceCredentialRateLimit({ size, page, sort, dir
2051
2171
  export declare function updateServiceCredentialRateLimit({ serviceCredentialRateLimitRequest }: {
2052
2172
  serviceCredentialRateLimitRequest: ServiceCredentialRateLimitRequest;
2053
2173
  }, opts?: Oazapfts.RequestOpts): Promise<unknown>;
2174
+ /**
2175
+ * Update a feature flag by id directly assigned to an account holder
2176
+ */
2177
+ export declare function updateFeatureFlag({ id, updateFeatureFlagAccountRequest }: {
2178
+ id: number;
2179
+ updateFeatureFlagAccountRequest: UpdateFeatureFlagAccountRequest;
2180
+ }, opts?: Oazapfts.RequestOpts): Promise<unknown>;
2181
+ /**
2182
+ * Updates an existing Feature Flag with the provided details.
2183
+ */
2184
+ export declare function update({ id, updateFeatureFlagRequest }: {
2185
+ id: number;
2186
+ updateFeatureFlagRequest: UpdateFeatureFlagRequest;
2187
+ }, opts?: Oazapfts.RequestOpts): Promise<UpdateFeatureFlagsResponse>;
2188
+ /**
2189
+ * Deletes an existing Feature Flag with the provided id.
2190
+ */
2191
+ export declare function deleteV2AdminFeatureFlagsById({ id }: {
2192
+ id: number;
2193
+ }, opts?: Oazapfts.RequestOpts): Promise<unknown>;
2194
+ /**
2195
+ * Updates an existing Feature Flag resources with the provided details.
2196
+ */
2197
+ export declare function updateAccountAssociation({ featureFlagId, accountId, updateFeatureFlagAccountRequest }: {
2198
+ featureFlagId: number;
2199
+ accountId: number;
2200
+ updateFeatureFlagAccountRequest: UpdateFeatureFlagAccountRequest;
2201
+ }, opts?: Oazapfts.RequestOpts): Promise<unknown>;
2202
+ /**
2203
+ * Creates a new Feature Flag resource for the given account.
2204
+ */
2205
+ export declare function createAccountAssociation({ featureFlagId, accountId, createFeatureFlagAccountRequest }: {
2206
+ featureFlagId: number;
2207
+ accountId: number;
2208
+ createFeatureFlagAccountRequest: CreateFeatureFlagAccountRequest;
2209
+ }, opts?: Oazapfts.RequestOpts): Promise<unknown>;
2210
+ /**
2211
+ * Deletes Feature Flag resource for the given account.
2212
+ */
2213
+ export declare function deleteAccountAssociation({ featureFlagId, accountId }: {
2214
+ featureFlagId: number;
2215
+ accountId: number;
2216
+ }, opts?: Oazapfts.RequestOpts): Promise<unknown>;
2054
2217
  /**
2055
2218
  * Retrieves a list of SCM credentials associated with the current user's account, including secret names and provider details.
2056
2219
  */
2057
- export declare function listScmCredentials(opts?: Oazapfts.RequestOpts): Promise<UserScmInfoResponse[]>;
2220
+ export declare function listScmCredentials1(opts?: Oazapfts.RequestOpts): Promise<UserScmInfoResponse[]>;
2058
2221
  /**
2059
2222
  * Updates the SCM credentials for a user by saving the new secret information and triggering an update event.
2060
2223
  */
@@ -2112,7 +2275,7 @@ export declare function deleteScope({ scopeId }: {
2112
2275
  /**
2113
2276
  * Retrieves a list of SCM credentials associated with the current user's account.
2114
2277
  */
2115
- export declare function listScmCredentials1(opts?: Oazapfts.RequestOpts): Promise<AccountScmInfoResponse[]>;
2278
+ export declare function listScmCredentials2(opts?: Oazapfts.RequestOpts): Promise<AccountScmInfoResponse[]>;
2116
2279
  /**
2117
2280
  * Updates the SCM credentials for the current user's account, saving the changes and triggering an update event.
2118
2281
  */
@@ -2195,13 +2358,6 @@ export declare function updateUserPassword({ memberId, updatePasswordRequest }:
2195
2358
  export declare function accept({ id }: {
2196
2359
  id: string;
2197
2360
  }, opts?: Oazapfts.RequestOpts): Promise<UserInvitationResponse>;
2198
- /**
2199
- * Updates an existing Feature Flag with the provided details.
2200
- */
2201
- export declare function update({ id, updateFeatureFlagRequest }: {
2202
- id: number;
2203
- updateFeatureFlagRequest: UpdateFeatureFlagRequest;
2204
- }, opts?: Oazapfts.RequestOpts): Promise<unknown>;
2205
2361
  /**
2206
2362
  * Updates the sales representatives associated with an active account.
2207
2363
  */
@@ -2287,6 +2443,16 @@ export declare function getServiceCredentials({ size, page, sort, direction, sea
2287
2443
  export declare function createServiceCredential({ serviceCredentialCreateRequestV2 }: {
2288
2444
  serviceCredentialCreateRequestV2: ServiceCredentialCreateRequestV2;
2289
2445
  }, opts?: Oazapfts.RequestOpts): Promise<ServiceCredentialCreateResponseV2>;
2446
+ /**
2447
+ * Returns a list of Feature Flags associated with the current user's account.
2448
+ */
2449
+ export declare function getFeatures1(opts?: Oazapfts.RequestOpts): Promise<FeatureFlagsResponseV2[]>;
2450
+ /**
2451
+ * Creates a new Feature Flag and returns its unique identifier.
2452
+ */
2453
+ export declare function create({ createFeatureFlagRequest }: {
2454
+ createFeatureFlagRequest: CreateFeatureFlagRequest;
2455
+ }, opts?: Oazapfts.RequestOpts): Promise<CreateFeatureFlagsResponse>;
2290
2456
  /**
2291
2457
  * Retrieves a list of service credentials with their associated owner information if available.
2292
2458
  */
@@ -2651,16 +2817,6 @@ export declare function bindGroupMembers({ groupId, groupMemberIdsRequest }: {
2651
2817
  groupId: string;
2652
2818
  groupMemberIdsRequest: GroupMemberIdsRequest;
2653
2819
  }, opts?: Oazapfts.RequestOpts): Promise<unknown>;
2654
- /**
2655
- * Returns a list of Feature Flags associated with the current user's account.
2656
- */
2657
- export declare function getFeatures(opts?: Oazapfts.RequestOpts): Promise<FeatureFlagsResponse[]>;
2658
- /**
2659
- * Creates a new Feature Flag and returns its unique identifier.
2660
- */
2661
- export declare function create({ createFeatureFlagRequest }: {
2662
- createFeatureFlagRequest: CreateFeatureFlagRequest;
2663
- }, opts?: Oazapfts.RequestOpts): Promise<unknown>;
2664
2820
  /**
2665
2821
  * Retrieves a list of extensions associated with the current user's account.
2666
2822
  */
@@ -2718,6 +2874,12 @@ export declare function sendDownloadEmail(opts?: Oazapfts.RequestOpts): Promise<
2718
2874
  export declare function sendContactEmail({ contactEmailRequest }: {
2719
2875
  contactEmailRequest: ContactEmailRequest;
2720
2876
  }, opts?: Oazapfts.RequestOpts): Promise<unknown>;
2877
+ /**
2878
+ * Validates a campaign code and returns true if exists and its enabled
2879
+ */
2880
+ export declare function validateCampaignCode({ code }: {
2881
+ code: string;
2882
+ }, opts?: Oazapfts.RequestOpts): Promise<CampaignAvailableResponse>;
2721
2883
  /**
2722
2884
  * Switches the user to the account specified in the body.
2723
2885
  */
@@ -3005,7 +3167,7 @@ export declare function getGroupById({ groupId }: {
3005
3167
  /**
3006
3168
  * Deletes a group by its ID.
3007
3169
  */
3008
- export declare function deleteV1GroupsByGroupId({ groupId }: {
3170
+ export declare function delete1({ groupId }: {
3009
3171
  groupId: string;
3010
3172
  }, opts?: Oazapfts.RequestOpts): Promise<unknown>;
3011
3173
  /**
@@ -3029,18 +3191,6 @@ export declare function updateGroupPermissions1({ groupId, updateGroupPermission
3029
3191
  groupId: string;
3030
3192
  updateGroupPermissionsRequest: UpdateGroupPermissionsRequest;
3031
3193
  }, opts?: Oazapfts.RequestOpts): Promise<unknown>;
3032
- /**
3033
- * Enables a Feature Flag in an account.
3034
- */
3035
- export declare function enable({ id }: {
3036
- id: number;
3037
- }, opts?: Oazapfts.RequestOpts): Promise<unknown>;
3038
- /**
3039
- * Disables a Feature Flag in an account.
3040
- */
3041
- export declare function disable({ id }: {
3042
- id: number;
3043
- }, opts?: Oazapfts.RequestOpts): Promise<unknown>;
3044
3194
  /**
3045
3195
  * Deletes an account's extension.
3046
3196
  */
@@ -3130,6 +3280,12 @@ export declare function updatePartnerAccountAdminData({ id, accountPartnerAdminD
3130
3280
  id: string;
3131
3281
  accountPartnerAdminDataUpdateRequest: AccountPartnerAdminDataUpdateRequest;
3132
3282
  }, opts?: Oazapfts.RequestOpts): Promise<unknown>;
3283
+ /**
3284
+ * Retrieves a list of SCM credentials associated with the current user's account, including secret names and provider details.
3285
+ */
3286
+ export declare function listScmCredentials({ userId }: {
3287
+ userId: string;
3288
+ }, opts?: Oazapfts.RequestOpts): Promise<UserScmInfoResponse[]>;
3133
3289
  /**
3134
3290
  * Retrieves a paginated list of groups associated with a service credential for a given client ID.
3135
3291
  */
@@ -3378,6 +3534,27 @@ export declare function getMembers({ groupId, size, page, sort, direction, searc
3378
3534
  multiFilterMode?: string;
3379
3535
  filterIn?: any;
3380
3536
  }, opts?: Oazapfts.RequestOpts): Promise<PageResponseReadGroupMembersResponse>;
3537
+ /**
3538
+ * Returns a paged list of Feature Flags associated with the current user's account.
3539
+ */
3540
+ export declare function getFeatures({ size, page, sort, direction, search, filterByName, filterByStatus, filterByWorkspace }: {
3541
+ size?: any;
3542
+ page?: any;
3543
+ sort?: string;
3544
+ direction?: "ASC" | "DESC";
3545
+ search?: string;
3546
+ filterByName?: string;
3547
+ filterByStatus?: boolean;
3548
+ filterByWorkspace?: string;
3549
+ }, opts?: Oazapfts.RequestOpts): Promise<PageResponseFeatureFlagsResponseV2>;
3550
+ /**
3551
+ * Get enabled feature flags for an account
3552
+ */
3553
+ export declare function getEnabledFeatureFlagsForAccount({ queryParams }: {
3554
+ queryParams: {
3555
+ [key: string]: string;
3556
+ };
3557
+ }, opts?: Oazapfts.RequestOpts): Promise<FeatureFlagReadResponse[]>;
3381
3558
  /**
3382
3559
  * Verifies if SCM credentials exist for the current user's account and email, throwing an error if not found.
3383
3560
  */
@@ -3554,6 +3731,10 @@ export declare function getAccountMembersToCollaborators({ size, page, sort, dir
3554
3731
  multiFilterMode?: string;
3555
3732
  filterIn?: any;
3556
3733
  }, opts?: Oazapfts.RequestOpts): Promise<AccountMemberResponse[]>;
3734
+ /**
3735
+ * Returns a list of Feature Flags associated with the current user's account.
3736
+ */
3737
+ export declare function getFeatures2(opts?: Oazapfts.RequestOpts): Promise<FeatureFlagsResponse[]>;
3557
3738
  /**
3558
3739
  * Retrieves the details of a specific extension version.
3559
3740
  */