@cdot65/prisma-airs-sdk 0.6.7 → 0.6.8

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/dist/index.d.cts CHANGED
@@ -56697,8 +56697,8 @@ declare const MAX_NUMBER_OF_BATCH_SCAN_OBJECTS = 5;
56697
56697
  declare const MAX_CONNECTION_POOL_SIZE = 100;
56698
56698
  declare const MAX_NUMBER_OF_RETRIES = 5;
56699
56699
  declare const HTTP_FORCE_RETRY_STATUS_CODES: number[];
56700
- declare const SDK_VERSION = "0.6.7";
56701
- declare const USER_AGENT = "PAN-AIRS/0.6.7-typescript-sdk";
56700
+ declare const SDK_VERSION = "0.6.8";
56701
+ declare const USER_AGENT = "PAN-AIRS/0.6.8-typescript-sdk";
56702
56702
  declare const DEFAULT_MGMT_ENDPOINT = "https://api.sase.paloaltonetworks.com/aisec";
56703
56703
  declare const DEFAULT_TOKEN_ENDPOINT = "https://auth.apps.paloaltonetworks.com/oauth2/access_token";
56704
56704
  declare const MGMT_CLIENT_ID = "PANW_MGMT_CLIENT_ID";
@@ -56867,6 +56867,20 @@ declare class ProfilesClient {
56867
56867
  * @returns Paginated list of security profiles.
56868
56868
  */
56869
56869
  list(opts?: PaginationOptions): Promise<SecurityProfileListResponse>;
56870
+ /**
56871
+ * Get a security profile by UUID.
56872
+ * Fetches all profiles and filters — no dedicated API endpoint exists.
56873
+ * @param profileId - UUID of the profile to retrieve.
56874
+ * @returns The matching security profile.
56875
+ */
56876
+ get(profileId: string): Promise<SecurityProfile>;
56877
+ /**
56878
+ * Get a security profile by name.
56879
+ * Returns the highest-revision match (latest version).
56880
+ * @param profileName - Name of the profile to retrieve.
56881
+ * @returns The matching security profile with the highest revision.
56882
+ */
56883
+ getByName(profileName: string): Promise<SecurityProfile>;
56870
56884
  /**
56871
56885
  * Update an existing security profile.
56872
56886
  * @param profileId - UUID of the profile to update.
package/dist/index.d.ts CHANGED
@@ -56697,8 +56697,8 @@ declare const MAX_NUMBER_OF_BATCH_SCAN_OBJECTS = 5;
56697
56697
  declare const MAX_CONNECTION_POOL_SIZE = 100;
56698
56698
  declare const MAX_NUMBER_OF_RETRIES = 5;
56699
56699
  declare const HTTP_FORCE_RETRY_STATUS_CODES: number[];
56700
- declare const SDK_VERSION = "0.6.7";
56701
- declare const USER_AGENT = "PAN-AIRS/0.6.7-typescript-sdk";
56700
+ declare const SDK_VERSION = "0.6.8";
56701
+ declare const USER_AGENT = "PAN-AIRS/0.6.8-typescript-sdk";
56702
56702
  declare const DEFAULT_MGMT_ENDPOINT = "https://api.sase.paloaltonetworks.com/aisec";
56703
56703
  declare const DEFAULT_TOKEN_ENDPOINT = "https://auth.apps.paloaltonetworks.com/oauth2/access_token";
56704
56704
  declare const MGMT_CLIENT_ID = "PANW_MGMT_CLIENT_ID";
@@ -56867,6 +56867,20 @@ declare class ProfilesClient {
56867
56867
  * @returns Paginated list of security profiles.
56868
56868
  */
56869
56869
  list(opts?: PaginationOptions): Promise<SecurityProfileListResponse>;
56870
+ /**
56871
+ * Get a security profile by UUID.
56872
+ * Fetches all profiles and filters — no dedicated API endpoint exists.
56873
+ * @param profileId - UUID of the profile to retrieve.
56874
+ * @returns The matching security profile.
56875
+ */
56876
+ get(profileId: string): Promise<SecurityProfile>;
56877
+ /**
56878
+ * Get a security profile by name.
56879
+ * Returns the highest-revision match (latest version).
56880
+ * @param profileName - Name of the profile to retrieve.
56881
+ * @returns The matching security profile with the highest revision.
56882
+ */
56883
+ getByName(profileName: string): Promise<SecurityProfile>;
56870
56884
  /**
56871
56885
  * Update an existing security profile.
56872
56886
  * @param profileId - UUID of the profile to update.
package/dist/index.js CHANGED
@@ -29,7 +29,7 @@ var MAX_NUMBER_OF_BATCH_SCAN_OBJECTS = 5;
29
29
  var MAX_CONNECTION_POOL_SIZE = 100;
30
30
  var MAX_NUMBER_OF_RETRIES = 5;
31
31
  var HTTP_FORCE_RETRY_STATUS_CODES = [500, 502, 503, 504];
32
- var SDK_VERSION = "0.6.7";
32
+ var SDK_VERSION = "0.6.8";
33
33
  var USER_AGENT = `PAN-AIRS/${SDK_VERSION}-typescript-sdk`;
34
34
  var DEFAULT_MGMT_ENDPOINT = "https://api.sase.paloaltonetworks.com/aisec";
35
35
  var DEFAULT_TOKEN_ENDPOINT = "https://auth.apps.paloaltonetworks.com/oauth2/access_token";
@@ -2984,6 +2984,40 @@ var ProfilesClient = class {
2984
2984
  });
2985
2985
  return res.data;
2986
2986
  }
2987
+ /**
2988
+ * Get a security profile by UUID.
2989
+ * Fetches all profiles and filters — no dedicated API endpoint exists.
2990
+ * @param profileId - UUID of the profile to retrieve.
2991
+ * @returns The matching security profile.
2992
+ */
2993
+ async get(profileId) {
2994
+ const { ai_profiles } = await this.list();
2995
+ const profile = ai_profiles.find((p) => p.profile_id === profileId);
2996
+ if (!profile) {
2997
+ throw new AISecSDKException(
2998
+ `Profile not found: ${profileId}`,
2999
+ "AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
3000
+ );
3001
+ }
3002
+ return profile;
3003
+ }
3004
+ /**
3005
+ * Get a security profile by name.
3006
+ * Returns the highest-revision match (latest version).
3007
+ * @param profileName - Name of the profile to retrieve.
3008
+ * @returns The matching security profile with the highest revision.
3009
+ */
3010
+ async getByName(profileName) {
3011
+ const { ai_profiles } = await this.list();
3012
+ const matches = ai_profiles.filter((p) => p.profile_name === profileName);
3013
+ if (matches.length === 0) {
3014
+ throw new AISecSDKException(
3015
+ `Profile not found: ${profileName}`,
3016
+ "AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
3017
+ );
3018
+ }
3019
+ return matches.reduce((best, p) => (p.revision ?? 0) > (best.revision ?? 0) ? p : best);
3020
+ }
2987
3021
  /**
2988
3022
  * Update an existing security profile.
2989
3023
  * @param profileId - UUID of the profile to update.