@stack-spot/portal-network 0.132.0 → 0.133.0

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,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.133.0](https://github.com/stack-spot/portal-commons/compare/portal-network@v0.132.0...portal-network@v0.133.0) (2025-05-29)
4
+
5
+
6
+ ### Features
7
+
8
+ * 2667 freemium ([#1027](https://github.com/stack-spot/portal-commons/issues/1027)) ([a6596b6](https://github.com/stack-spot/portal-commons/commit/a6596b6322239bb98933665e10f331e73ab89644))
9
+
3
10
  ## [0.132.0](https://github.com/stack-spot/portal-commons/compare/portal-network@v0.131.0...portal-network@v0.132.0) (2025-05-29)
4
11
 
5
12
 
@@ -53,16 +53,43 @@ export type ServiceCredentialRateLimitRequest = {
53
53
  /** List of service credential IDs */
54
54
  serviceCredentialIds: string[];
55
55
  };
56
+ export type ResourcesTypeResponse = {
57
+ /** The resource type */
58
+ resourceType: string;
59
+ /** The feature flag mode */
60
+ mode: "ALL" | "NONE" | "SPECIFIC";
61
+ /** The resource identifiers */
62
+ identifiers?: string[];
63
+ };
64
+ export type FeatureFlagsAccountResponse = {
65
+ /** The feature flag id */
66
+ id: number;
67
+ /** The feature flag name */
68
+ name: string;
69
+ /** The feature flag slug */
70
+ slug: string;
71
+ /** The feature flag description */
72
+ description: string;
73
+ /** If the feature flag is auto create or not in the current account */
74
+ autoCreate: boolean;
75
+ /** If the feature flag is enabled or not in the current account */
76
+ enabled?: boolean;
77
+ /** If the feature flag is system or not in the current account */
78
+ system: boolean;
79
+ /** The the resources in the feature flag */
80
+ resources?: ResourcesTypeResponse[];
81
+ };
56
82
  export type UpdateResourcesTypeRequest = {
57
83
  /** The resource type */
58
84
  resourceType: string;
59
85
  /** The feature flag mode */
60
86
  mode: "ALL" | "NONE" | "SPECIFIC";
61
- /** The resource slugs */
62
- slugs?: string[];
87
+ /** The resource identifiers */
88
+ identifiers?: string[];
63
89
  };
64
90
  export type UpdateFeatureFlagAccountRequest = {
65
- resources: UpdateResourcesTypeRequest;
91
+ /** List of the resources */
92
+ resources?: UpdateResourcesTypeRequest[];
66
93
  /** The feature flag is enabled */
67
94
  enabled: boolean;
68
95
  };
@@ -77,6 +104,8 @@ export type UpdateFeatureFlagRequest = {
77
104
  autoCreate: boolean;
78
105
  /** The feature flag system */
79
106
  system: boolean;
107
+ /** List of the resources */
108
+ resources?: string[];
80
109
  };
81
110
  export type UpdateFeatureFlagsResponse = {
82
111
  /** The feature flag id */
@@ -91,17 +120,20 @@ export type UpdateFeatureFlagsResponse = {
91
120
  autoCreate: boolean;
92
121
  /** If the feature flag is system or not in the current account */
93
122
  system: boolean;
123
+ /** The list of resources associate in feature flag */
124
+ resources?: string[];
94
125
  };
95
126
  export type ResourcesTypeRequest = {
96
127
  /** The resource type */
97
128
  resourceType: string;
98
129
  /** The feature flag mode */
99
130
  mode: "ALL" | "NONE" | "SPECIFIC";
100
- /** The resource slugs */
101
- slugs?: string[];
131
+ /** The resource identifiers */
132
+ identifiers?: string[];
102
133
  };
103
134
  export type CreateFeatureFlagAccountRequest = {
104
- resources: ResourcesTypeRequest;
135
+ /** List of the resources */
136
+ resources?: ResourcesTypeRequest[];
105
137
  /** The feature flag is enabled */
106
138
  enabled: boolean;
107
139
  };
@@ -593,15 +625,29 @@ export type ServiceCredentialCreateResponseV2 = {
593
625
  /** Account tenant */
594
626
  tenant: string;
595
627
  };
628
+ export type FeatureFlagPageRequest = {
629
+ size?: number;
630
+ page: number;
631
+ sort?: string;
632
+ direction: "ASC" | "DESC";
633
+ search?: string;
634
+ filterByName?: string;
635
+ filterByApplications?: string[];
636
+ filterByStudios?: string[];
637
+ filterByWorkflows?: string[];
638
+ filterByWorkspaces?: string[];
639
+ filterByStatus?: boolean;
640
+ filterByAvailable?: ("APPLICATION" | "ACCOUNT" | "STUDIO" | "WORKFLOW" | "WORKSPACE")[];
641
+ };
596
642
  export type FeatureFlagsResourceCountResponse = {
597
643
  /** The Feature Flag Resource Mode */
598
644
  mode?: "ALL" | "NONE" | "SPECIFIC";
599
645
  /** The Resource's Slug */
600
- slug?: string;
646
+ resourceType?: string;
601
647
  /** The Quantity of Resources in The Feature FLag */
602
648
  resourceCount: number;
603
649
  };
604
- export type FeatureFlagsResponseV2 = {
650
+ export type FeatureFlagsResponsePagedV2 = {
605
651
  /** The feature flag id */
606
652
  id: number;
607
653
  /** The feature flag name */
@@ -613,12 +659,42 @@ export type FeatureFlagsResponseV2 = {
613
659
  /** If the feature flag is auto create or not in the current account */
614
660
  autoCreate: boolean;
615
661
  /** If the feature flag is enabled or not in the current account */
616
- status?: boolean;
662
+ enabled?: boolean;
617
663
  /** If the feature flag is system or not in the current account */
618
664
  system: boolean;
619
665
  /** The count of the resources in the feature flag */
620
666
  resourceType?: FeatureFlagsResourceCountResponse[];
621
667
  };
668
+ export type PageResponseFeatureFlagsResponsePagedV2 = {
669
+ /** Current page content */
670
+ items?: FeatureFlagsResponsePagedV2[];
671
+ /** Total elements found */
672
+ totalElements: number;
673
+ /** Current page number */
674
+ page: number;
675
+ /** Length of current page items */
676
+ size: number;
677
+ /** Total pages found */
678
+ totalPages: number;
679
+ };
680
+ export type FeatureFlagsResponseV2 = {
681
+ /** The feature flag id */
682
+ id: number;
683
+ /** The feature flag name */
684
+ name: string;
685
+ /** The feature flag slug */
686
+ slug: string;
687
+ /** The feature flag description */
688
+ description: string;
689
+ /** If the feature flag is auto create or not in the current account */
690
+ autoCreate: boolean;
691
+ /** If the feature flag is enabled or not in the current account */
692
+ enabled?: boolean;
693
+ /** If the feature flag is system or not in the current account */
694
+ system: boolean;
695
+ /** The the resources in the feature flag */
696
+ resources?: string[];
697
+ };
622
698
  export type CreateFeatureFlagRequest = {
623
699
  /** The feature flag name */
624
700
  name: string;
@@ -630,6 +706,8 @@ export type CreateFeatureFlagRequest = {
630
706
  autoCreate: boolean;
631
707
  /** The feature flag system */
632
708
  system: boolean;
709
+ /** List of the resources */
710
+ resources?: string[];
633
711
  };
634
712
  export type CreateFeatureFlagsResponse = {
635
713
  /** The feature flag id */
@@ -640,10 +718,41 @@ export type CreateFeatureFlagsResponse = {
640
718
  slug: string;
641
719
  /** The feature flag description */
642
720
  description: string;
643
- /** If the feature flag is autoCreate or not in the current account */
721
+ /** If the feature flag is autoCreate or not */
644
722
  autoCreate: boolean;
645
- /** If the feature flag is system or not in the current account */
723
+ /** If the feature flag is system or not */
646
724
  system: boolean;
725
+ /** The list of resources associate in feature flag */
726
+ resources?: string[];
727
+ };
728
+ export type ExternalLinkResponse = {
729
+ /** External link identifier */
730
+ externalLinkId: string;
731
+ /** External link redirection URL */
732
+ link: string;
733
+ /** Type of external link */
734
+ "type"?: string;
735
+ /** Date of external link creation */
736
+ createdAt: string;
737
+ /** Date of external link latest update */
738
+ updatedAt?: string;
739
+ };
740
+ export type PageResponseExternalLinkResponse = {
741
+ /** Current page content */
742
+ items?: ExternalLinkResponse[];
743
+ /** Total elements found */
744
+ totalElements: number;
745
+ /** Current page number */
746
+ page: number;
747
+ /** Length of current page items */
748
+ size: number;
749
+ /** Total pages found */
750
+ totalPages: number;
751
+ };
752
+ export type ExternalLinkRequest = {
753
+ link: string;
754
+ /** Type of external link */
755
+ "type"?: string;
647
756
  };
648
757
  export type StatementRequest = {
649
758
  /** Resource id */
@@ -987,6 +1096,16 @@ export type GroupReadResponse = {
987
1096
  /** Creation time of group */
988
1097
  createdAt?: string;
989
1098
  };
1099
+ export type MagicLinkRequest = {
1100
+ /** Client ID */
1101
+ clientId: string;
1102
+ /** Redirect URL */
1103
+ redirectUrl: string;
1104
+ };
1105
+ export type MagicLinkResponse = {
1106
+ /** Magic link */
1107
+ link: string;
1108
+ };
990
1109
  export type FavoriteResourcesResponse = {
991
1110
  /** The type of the resource flag name */
992
1111
  resourceType: string;
@@ -1892,18 +2011,6 @@ export type PageResponseReadGroupMembersResponse = {
1892
2011
  /** Total pages found */
1893
2012
  totalPages: number;
1894
2013
  };
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
2014
  export type FeatureFlagReadResourceResponse = {
1908
2015
  /** Enum representing the mode of a feature flag */
1909
2016
  mode: "ALL" | "NONE" | "SPECIFIC";
@@ -2086,6 +2193,11 @@ export type TrialSsoSettingsResponse = {
2086
2193
  /** Is google SSO enabled */
2087
2194
  google: boolean;
2088
2195
  };
2196
+ export type Campaign = {
2197
+ id: string;
2198
+ rewardType: "DAYS" | "TOKENS";
2199
+ rewardAmount: number;
2200
+ };
2089
2201
  export type PersonalAccountDetailsResponse = {
2090
2202
  /** Unique identifier of the personal account. */
2091
2203
  id: number;
@@ -2107,6 +2219,9 @@ export type PersonalAccountDetailsResponse = {
2107
2219
  customReachedBy?: string | null;
2108
2220
  /** Date and time until the account is valid. */
2109
2221
  validUntil: string;
2222
+ /** Date and time that the account was created. */
2223
+ createdAt: string;
2224
+ campaign?: Campaign;
2110
2225
  };
2111
2226
  export type AccountSsoResponse = {
2112
2227
  /** SSO configuration name */
@@ -2171,6 +2286,12 @@ export declare function getAllServiceCredentialRateLimit({ size, page, sort, dir
2171
2286
  export declare function updateServiceCredentialRateLimit({ serviceCredentialRateLimitRequest }: {
2172
2287
  serviceCredentialRateLimitRequest: ServiceCredentialRateLimitRequest;
2173
2288
  }, opts?: Oazapfts.RequestOpts): Promise<unknown>;
2289
+ /**
2290
+ * Returns the Feature Flag.
2291
+ */
2292
+ export declare function getFeatureFlag({ id }: {
2293
+ id: number;
2294
+ }, opts?: Oazapfts.RequestOpts): Promise<FeatureFlagsAccountResponse>;
2174
2295
  /**
2175
2296
  * Update a feature flag by id directly assigned to an account holder
2176
2297
  */
@@ -2196,7 +2317,7 @@ export declare function deleteV2AdminFeatureFlagsById({ id }: {
2196
2317
  */
2197
2318
  export declare function updateAccountAssociation({ featureFlagId, accountId, updateFeatureFlagAccountRequest }: {
2198
2319
  featureFlagId: number;
2199
- accountId: number;
2320
+ accountId: string;
2200
2321
  updateFeatureFlagAccountRequest: UpdateFeatureFlagAccountRequest;
2201
2322
  }, opts?: Oazapfts.RequestOpts): Promise<unknown>;
2202
2323
  /**
@@ -2204,7 +2325,7 @@ export declare function updateAccountAssociation({ featureFlagId, accountId, upd
2204
2325
  */
2205
2326
  export declare function createAccountAssociation({ featureFlagId, accountId, createFeatureFlagAccountRequest }: {
2206
2327
  featureFlagId: number;
2207
- accountId: number;
2328
+ accountId: string;
2208
2329
  createFeatureFlagAccountRequest: CreateFeatureFlagAccountRequest;
2209
2330
  }, opts?: Oazapfts.RequestOpts): Promise<unknown>;
2210
2331
  /**
@@ -2212,7 +2333,7 @@ export declare function createAccountAssociation({ featureFlagId, accountId, cre
2212
2333
  */
2213
2334
  export declare function deleteAccountAssociation({ featureFlagId, accountId }: {
2214
2335
  featureFlagId: number;
2215
- accountId: number;
2336
+ accountId: string;
2216
2337
  }, opts?: Oazapfts.RequestOpts): Promise<unknown>;
2217
2338
  /**
2218
2339
  * Retrieves a list of SCM credentials associated with the current user's account, including secret names and provider details.
@@ -2443,16 +2564,51 @@ export declare function getServiceCredentials({ size, page, sort, direction, sea
2443
2564
  export declare function createServiceCredential({ serviceCredentialCreateRequestV2 }: {
2444
2565
  serviceCredentialCreateRequestV2: ServiceCredentialCreateRequestV2;
2445
2566
  }, opts?: Oazapfts.RequestOpts): Promise<ServiceCredentialCreateResponseV2>;
2567
+ /**
2568
+ * Returns a paged list of Feature Flags associated with the current user's account.
2569
+ */
2570
+ export declare function getFeatures({ featureFlagPageRequest }: {
2571
+ featureFlagPageRequest?: FeatureFlagPageRequest;
2572
+ }, opts?: Oazapfts.RequestOpts): Promise<PageResponseFeatureFlagsResponsePagedV2>;
2446
2573
  /**
2447
2574
  * Returns a list of Feature Flags associated with the current user's account.
2448
2575
  */
2449
- export declare function getFeatures1(opts?: Oazapfts.RequestOpts): Promise<FeatureFlagsResponseV2[]>;
2576
+ export declare function getFeatures2(opts?: Oazapfts.RequestOpts): Promise<FeatureFlagsResponseV2[]>;
2450
2577
  /**
2451
2578
  * Creates a new Feature Flag and returns its unique identifier.
2452
2579
  */
2453
2580
  export declare function create({ createFeatureFlagRequest }: {
2454
2581
  createFeatureFlagRequest: CreateFeatureFlagRequest;
2455
2582
  }, opts?: Oazapfts.RequestOpts): Promise<CreateFeatureFlagsResponse>;
2583
+ /**
2584
+ * Returns a paged list of Feature Flags associated with the current user's account.
2585
+ */
2586
+ export declare function getFeatures1({ featureFlagPageRequest }: {
2587
+ featureFlagPageRequest?: FeatureFlagPageRequest;
2588
+ }, opts?: Oazapfts.RequestOpts): Promise<PageResponseFeatureFlagsResponsePagedV2>;
2589
+ /**
2590
+ * Retrieves a page of external links for a specified account.
2591
+ */
2592
+ export declare function getExternalLinks({ accountId, size, page, sort, direction, search, filterMode, filterBy, filterValue, multiFilterMode, filterIn }: {
2593
+ accountId: string;
2594
+ size?: any;
2595
+ page?: any;
2596
+ sort?: string;
2597
+ direction?: "ASC" | "DESC";
2598
+ search?: string;
2599
+ filterMode?: "MATCH" | "CONTAINS" | "IN";
2600
+ filterBy?: string;
2601
+ filterValue?: string;
2602
+ multiFilterMode?: string;
2603
+ filterIn?: any;
2604
+ }, opts?: Oazapfts.RequestOpts): Promise<PageResponseExternalLinkResponse>;
2605
+ /**
2606
+ * Creates a new external link.
2607
+ */
2608
+ export declare function createExternalLink({ accountId, externalLinkRequest }: {
2609
+ accountId: string;
2610
+ externalLinkRequest: ExternalLinkRequest;
2611
+ }, opts?: Oazapfts.RequestOpts): Promise<ExternalLinkResponse>;
2456
2612
  /**
2457
2613
  * Retrieves a list of service credentials with their associated owner information if available.
2458
2614
  */
@@ -2674,6 +2830,13 @@ export declare function bindToGroups({ memberId, memberIdsCommonRequest }: {
2674
2830
  memberId: string;
2675
2831
  memberIdsCommonRequest: MemberIdsCommonRequest;
2676
2832
  }, opts?: Oazapfts.RequestOpts): Promise<unknown>;
2833
+ /**
2834
+ * Retrieves a magic link to create a new FIDO key.
2835
+ */
2836
+ export declare function createFidoMagicLink({ memberId, magicLinkRequest }: {
2837
+ memberId: string;
2838
+ magicLinkRequest: MagicLinkRequest;
2839
+ }, opts?: Oazapfts.RequestOpts): Promise<MagicLinkResponse>;
2677
2840
  /**
2678
2841
  * Lists all favorite resources associated with a specific member.
2679
2842
  */
@@ -3066,6 +3229,28 @@ export declare function updateGroupPermissions({ groupId, body }: {
3066
3229
  groupId: string;
3067
3230
  body: UpdateGroupPermissionsRequest[];
3068
3231
  }, opts?: Oazapfts.RequestOpts): Promise<unknown>;
3232
+ /**
3233
+ * Retrieves an external link by account.
3234
+ */
3235
+ export declare function getExternalLinkByIdAndAccountId({ externalLinkId, accountId }: {
3236
+ externalLinkId: string;
3237
+ accountId: string;
3238
+ }, opts?: Oazapfts.RequestOpts): Promise<ExternalLinkResponse>;
3239
+ /**
3240
+ * Deletes an external link by its unique identifier.
3241
+ */
3242
+ export declare function deleteExternalLink({ accountId, externalLinkId }: {
3243
+ accountId: string;
3244
+ externalLinkId: string;
3245
+ }, opts?: Oazapfts.RequestOpts): Promise<unknown>;
3246
+ /**
3247
+ * Updates an external link by its unique identifier.
3248
+ */
3249
+ export declare function updateExternalLink({ externalLinkId, accountId, externalLinkRequest }: {
3250
+ externalLinkId: string;
3251
+ accountId: string;
3252
+ externalLinkRequest: ExternalLinkRequest;
3253
+ }, opts?: Oazapfts.RequestOpts): Promise<ExternalLinkResponse>;
3069
3254
  /**
3070
3255
  * Associate Group to Service Credential
3071
3256
  */
@@ -3534,19 +3719,6 @@ export declare function getMembers({ groupId, size, page, sort, direction, searc
3534
3719
  multiFilterMode?: string;
3535
3720
  filterIn?: any;
3536
3721
  }, 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
3722
  /**
3551
3723
  * Get enabled feature flags for an account
3552
3724
  */
@@ -3555,6 +3727,12 @@ export declare function getEnabledFeatureFlagsForAccount({ queryParams }: {
3555
3727
  [key: string]: string;
3556
3728
  };
3557
3729
  }, opts?: Oazapfts.RequestOpts): Promise<FeatureFlagReadResponse[]>;
3730
+ /**
3731
+ * Retries a external link by type.
3732
+ */
3733
+ export declare function getExternalLinksByType({ externalLinkType }: {
3734
+ externalLinkType: string;
3735
+ }, opts?: Oazapfts.RequestOpts): Promise<ExternalLinkResponse>;
3558
3736
  /**
3559
3737
  * Verifies if SCM credentials exist for the current user's account and email, throwing an error if not found.
3560
3738
  */
@@ -3703,12 +3881,6 @@ export declare function getAccess({ resourceType, resource, action, attribute }:
3703
3881
  export declare function getResources2({ memberId }: {
3704
3882
  memberId: string;
3705
3883
  }, opts?: Oazapfts.RequestOpts): Promise<ResourceDto[]>;
3706
- /**
3707
- * Retrieves a magic link to create a new FIDO key.
3708
- */
3709
- export declare function createFidoMagicLink({ memberId }: {
3710
- memberId: string;
3711
- }, opts?: Oazapfts.RequestOpts): Promise<string>;
3712
3884
  /**
3713
3885
  * Lists the IDs of a member's favorite resources of a specified type.
3714
3886
  */
@@ -3734,7 +3906,7 @@ export declare function getAccountMembersToCollaborators({ size, page, sort, dir
3734
3906
  /**
3735
3907
  * Returns a list of Feature Flags associated with the current user's account.
3736
3908
  */
3737
- export declare function getFeatures2(opts?: Oazapfts.RequestOpts): Promise<FeatureFlagsResponse[]>;
3909
+ export declare function getFeatures3(opts?: Oazapfts.RequestOpts): Promise<FeatureFlagsResponse[]>;
3738
3910
  /**
3739
3911
  * Retrieves the details of a specific extension version.
3740
3912
  */