@mcp-consultant-tools/powerplatform-core 26.0.0-beta.2

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.
Files changed (153) hide show
  1. package/build/auth/index.d.ts +64 -0
  2. package/build/auth/index.d.ts.map +1 -0
  3. package/build/auth/index.js +39 -0
  4. package/build/auth/index.js.map +1 -0
  5. package/build/auth/interactive-auth.d.ts +60 -0
  6. package/build/auth/interactive-auth.d.ts.map +1 -0
  7. package/build/auth/interactive-auth.js +429 -0
  8. package/build/auth/interactive-auth.js.map +1 -0
  9. package/build/auth/service-principal-auth.d.ts +26 -0
  10. package/build/auth/service-principal-auth.d.ts.map +1 -0
  11. package/build/auth/service-principal-auth.js +60 -0
  12. package/build/auth/service-principal-auth.js.map +1 -0
  13. package/build/auth/token-cache.d.ts +40 -0
  14. package/build/auth/token-cache.d.ts.map +1 -0
  15. package/build/auth/token-cache.js +108 -0
  16. package/build/auth/token-cache.js.map +1 -0
  17. package/build/client/PowerPlatformClient.d.ts +78 -0
  18. package/build/client/PowerPlatformClient.d.ts.map +1 -0
  19. package/build/client/PowerPlatformClient.js +198 -0
  20. package/build/client/PowerPlatformClient.js.map +1 -0
  21. package/build/client/index.d.ts +6 -0
  22. package/build/client/index.d.ts.map +1 -0
  23. package/build/client/index.js +6 -0
  24. package/build/client/index.js.map +1 -0
  25. package/build/client/types.d.ts +300 -0
  26. package/build/client/types.d.ts.map +1 -0
  27. package/build/client/types.js +5 -0
  28. package/build/client/types.js.map +1 -0
  29. package/build/index.d.ts +36 -0
  30. package/build/index.d.ts.map +1 -0
  31. package/build/index.js +55 -0
  32. package/build/index.js.map +1 -0
  33. package/build/services/AppManagementService.d.ts +95 -0
  34. package/build/services/AppManagementService.d.ts.map +1 -0
  35. package/build/services/AppManagementService.js +322 -0
  36. package/build/services/AppManagementService.js.map +1 -0
  37. package/build/services/AppService.d.ts +39 -0
  38. package/build/services/AppService.d.ts.map +1 -0
  39. package/build/services/AppService.js +173 -0
  40. package/build/services/AppService.js.map +1 -0
  41. package/build/services/AttributeService.d.ts +28 -0
  42. package/build/services/AttributeService.d.ts.map +1 -0
  43. package/build/services/AttributeService.js +86 -0
  44. package/build/services/AttributeService.js.map +1 -0
  45. package/build/services/BusinessRuleService.d.ts +22 -0
  46. package/build/services/BusinessRuleService.d.ts.map +1 -0
  47. package/build/services/BusinessRuleService.js +85 -0
  48. package/build/services/BusinessRuleService.js.map +1 -0
  49. package/build/services/DataService.d.ts +53 -0
  50. package/build/services/DataService.d.ts.map +1 -0
  51. package/build/services/DataService.js +204 -0
  52. package/build/services/DataService.js.map +1 -0
  53. package/build/services/DependencyService.d.ts +27 -0
  54. package/build/services/DependencyService.d.ts.map +1 -0
  55. package/build/services/DependencyService.js +47 -0
  56. package/build/services/DependencyService.js.map +1 -0
  57. package/build/services/EntityService.d.ts +42 -0
  58. package/build/services/EntityService.d.ts.map +1 -0
  59. package/build/services/EntityService.js +132 -0
  60. package/build/services/EntityService.js.map +1 -0
  61. package/build/services/FlowService.d.ts +55 -0
  62. package/build/services/FlowService.d.ts.map +1 -0
  63. package/build/services/FlowService.js +608 -0
  64. package/build/services/FlowService.js.map +1 -0
  65. package/build/services/FormService.d.ts +36 -0
  66. package/build/services/FormService.d.ts.map +1 -0
  67. package/build/services/FormService.js +55 -0
  68. package/build/services/FormService.js.map +1 -0
  69. package/build/services/MetadataService.d.ts +63 -0
  70. package/build/services/MetadataService.d.ts.map +1 -0
  71. package/build/services/MetadataService.js +176 -0
  72. package/build/services/MetadataService.js.map +1 -0
  73. package/build/services/OptionSetService.d.ts +40 -0
  74. package/build/services/OptionSetService.d.ts.map +1 -0
  75. package/build/services/OptionSetService.js +91 -0
  76. package/build/services/OptionSetService.js.map +1 -0
  77. package/build/services/PluginDeploymentService.d.ts +102 -0
  78. package/build/services/PluginDeploymentService.d.ts.map +1 -0
  79. package/build/services/PluginDeploymentService.js +412 -0
  80. package/build/services/PluginDeploymentService.js.map +1 -0
  81. package/build/services/PluginService.d.ts +61 -0
  82. package/build/services/PluginService.d.ts.map +1 -0
  83. package/build/services/PluginService.js +289 -0
  84. package/build/services/PluginService.js.map +1 -0
  85. package/build/services/PublishingService.d.ts +37 -0
  86. package/build/services/PublishingService.d.ts.map +1 -0
  87. package/build/services/PublishingService.js +65 -0
  88. package/build/services/PublishingService.js.map +1 -0
  89. package/build/services/RelationshipService.d.ts +29 -0
  90. package/build/services/RelationshipService.d.ts.map +1 -0
  91. package/build/services/RelationshipService.js +46 -0
  92. package/build/services/RelationshipService.js.map +1 -0
  93. package/build/services/SolutionService.d.ts +60 -0
  94. package/build/services/SolutionService.d.ts.map +1 -0
  95. package/build/services/SolutionService.js +125 -0
  96. package/build/services/SolutionService.js.map +1 -0
  97. package/build/services/ValidationService.d.ts +31 -0
  98. package/build/services/ValidationService.d.ts.map +1 -0
  99. package/build/services/ValidationService.js +391 -0
  100. package/build/services/ValidationService.js.map +1 -0
  101. package/build/services/ViewService.d.ts +36 -0
  102. package/build/services/ViewService.d.ts.map +1 -0
  103. package/build/services/ViewService.js +55 -0
  104. package/build/services/ViewService.js.map +1 -0
  105. package/build/services/WebResourceService.d.ts +40 -0
  106. package/build/services/WebResourceService.d.ts.map +1 -0
  107. package/build/services/WebResourceService.js +64 -0
  108. package/build/services/WebResourceService.js.map +1 -0
  109. package/build/services/WorkflowManagementService.d.ts +157 -0
  110. package/build/services/WorkflowManagementService.d.ts.map +1 -0
  111. package/build/services/WorkflowManagementService.js +567 -0
  112. package/build/services/WorkflowManagementService.js.map +1 -0
  113. package/build/services/WorkflowService.d.ts +28 -0
  114. package/build/services/WorkflowService.d.ts.map +1 -0
  115. package/build/services/WorkflowService.js +285 -0
  116. package/build/services/WorkflowService.js.map +1 -0
  117. package/build/services/index.d.ts +29 -0
  118. package/build/services/index.d.ts.map +1 -0
  119. package/build/services/index.js +31 -0
  120. package/build/services/index.js.map +1 -0
  121. package/build/utils/auditLogger.d.ts +76 -0
  122. package/build/utils/auditLogger.d.ts.map +1 -0
  123. package/build/utils/auditLogger.js +110 -0
  124. package/build/utils/auditLogger.js.map +1 -0
  125. package/build/utils/best-practices-formatters.d.ts +26 -0
  126. package/build/utils/best-practices-formatters.d.ts.map +1 -0
  127. package/build/utils/best-practices-formatters.js +238 -0
  128. package/build/utils/best-practices-formatters.js.map +1 -0
  129. package/build/utils/bestPractices.d.ts +150 -0
  130. package/build/utils/bestPractices.d.ts.map +1 -0
  131. package/build/utils/bestPractices.js +324 -0
  132. package/build/utils/bestPractices.js.map +1 -0
  133. package/build/utils/iconManager.d.ts +84 -0
  134. package/build/utils/iconManager.d.ts.map +1 -0
  135. package/build/utils/iconManager.js +338 -0
  136. package/build/utils/iconManager.js.map +1 -0
  137. package/build/utils/index.d.ts +11 -0
  138. package/build/utils/index.d.ts.map +1 -0
  139. package/build/utils/index.js +18 -0
  140. package/build/utils/index.js.map +1 -0
  141. package/build/utils/prompt-templates.d.ts +9 -0
  142. package/build/utils/prompt-templates.d.ts.map +1 -0
  143. package/build/utils/prompt-templates.js +31 -0
  144. package/build/utils/prompt-templates.js.map +1 -0
  145. package/build/utils/publisherConfig.d.ts +33 -0
  146. package/build/utils/publisherConfig.d.ts.map +1 -0
  147. package/build/utils/publisherConfig.js +54 -0
  148. package/build/utils/publisherConfig.js.map +1 -0
  149. package/build/utils/rate-limiter.d.ts +108 -0
  150. package/build/utils/rate-limiter.d.ts.map +1 -0
  151. package/build/utils/rate-limiter.js +242 -0
  152. package/build/utils/rate-limiter.js.map +1 -0
  153. package/package.json +65 -0
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Service Principal Authentication Provider
3
+ *
4
+ * Uses ConfidentialClientApplication (client credentials flow)
5
+ * for app-to-app authentication with client_id + client_secret.
6
+ *
7
+ * This is the existing authentication mechanism, refactored into the auth module.
8
+ */
9
+ import { ConfidentialClientApplication } from '@azure/msal-node';
10
+ export class ServicePrincipalAuth {
11
+ config;
12
+ msalClient;
13
+ accessToken = null;
14
+ tokenExpirationTime = 0;
15
+ constructor(config) {
16
+ this.config = config;
17
+ this.msalClient = new ConfidentialClientApplication({
18
+ auth: {
19
+ clientId: this.config.clientId,
20
+ clientSecret: this.config.clientSecret,
21
+ authority: `https://login.microsoftonline.com/${this.config.tenantId}`,
22
+ },
23
+ });
24
+ }
25
+ getAuthMode() {
26
+ return 'service-principal';
27
+ }
28
+ async getAccessToken(resource) {
29
+ const currentTime = Date.now();
30
+ // If we have a token that isn't expired, return it
31
+ if (this.accessToken && this.tokenExpirationTime > currentTime) {
32
+ return this.accessToken;
33
+ }
34
+ try {
35
+ // Get a new token using client credentials flow
36
+ const result = await this.msalClient.acquireTokenByClientCredential({
37
+ scopes: [`${resource}/.default`],
38
+ });
39
+ if (!result || !result.accessToken) {
40
+ throw new Error('Failed to acquire access token');
41
+ }
42
+ this.accessToken = result.accessToken;
43
+ // Set expiration time (subtract 5 minutes to refresh early)
44
+ if (result.expiresOn) {
45
+ this.tokenExpirationTime = result.expiresOn.getTime() - 5 * 60 * 1000;
46
+ }
47
+ return this.accessToken;
48
+ }
49
+ catch (error) {
50
+ const errorMessage = error.message || 'Unknown error';
51
+ console.error('Service Principal authentication failed:', errorMessage);
52
+ throw new Error(`Service Principal authentication failed: ${errorMessage}`);
53
+ }
54
+ }
55
+ async getUserInfo() {
56
+ // Service principal doesn't have user info
57
+ return null;
58
+ }
59
+ }
60
+ //# sourceMappingURL=service-principal-auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-principal-auth.js","sourceRoot":"","sources":["../../src/auth/service-principal-auth.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAC;AAUjE,MAAM,OAAO,oBAAoB;IACvB,MAAM,CAAyB;IAC/B,UAAU,CAAgC;IAC1C,WAAW,GAAkB,IAAI,CAAC;IAClC,mBAAmB,GAAW,CAAC,CAAC;IAExC,YAAY,MAA8B;QACxC,IAAI,CAAC,MAAM,GAAG,MAAM,CA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ACtD,OAAO,CAAC,KAAK,CAAC,0CAA0C,EAAE,YAAY,CAAC,CAAC;YACxE,MAAM,IAAI,KAAK,CAAC,4CAA4C,YAAY,EAAE,CAAC,CAAC;QAC9E,CAAC;IACH,CAAC;IAED,KAAK,CAAC,WAAW;QACf,2CAA2C;QAC3C,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Token Cache for Interactive Authentication
3
+ *
4
+ * Provides encrypted file-based storage for MSAL tokens.
5
+ * Tokens are encrypted using AES-256-GCM with a machine-specific key.
6
+ *
7
+ * Storage location: ~/.mcp-consultant-tools/token-cache-{clientId}.enc
8
+ */
9
+ import type { ICachePlugin } from '@azure/msal-node';
10
+ export declare class TokenCache {
11
+ private cacheFile;
12
+ private encryptionKey;
13
+ private cacheDir;
14
+ constructor(clientId: string);
15
+ /**
16
+ * Create MSAL cache plugin for automatic token persistence
17
+ */
18
+ createPlugin(): ICachePlugin;
19
+ /**
20
+ * Encrypt data using AES-256-GCM
21
+ */
22
+ private encrypt;
23
+ /**
24
+ * Decrypt data using AES-256-GCM
25
+ */
26
+ private decrypt;
27
+ /**
28
+ * Clear the token cache (logout)
29
+ */
30
+ clear(): void;
31
+ /**
32
+ * Check if a token cache exists
33
+ */
34
+ exists(): boolean;
35
+ /**
36
+ * Get the cache file path (for diagnostics)
37
+ */
38
+ getCachePath(): string;
39
+ }
40
+ //# sourceMappingURL=token-cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token-cache.d.ts","sourceRoot":"","sources":["../../src/auth/token-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAqB,MAAM,kBAAkB,CAAC;AAMxE,qBAAa,UAAU;IACrB,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAS;gBAEb,QAAQ,EAAE,MAAM;IAgB5B;;OAEG;IACH,YAAY,IAAI,YAAY;IA6B5B;;OAEG;IACH,OAAO,CAAC,OAAO;IASf;;OAEG;IACH,OAAO,CAAC,OAAO;IAef;;OAEG;IACH,KAAK,IAAI,IAAI;IAMb;;OAEG;IACH,MAAM,IAAI,OAAO;IAIjB;;OAEG;IACH,YAAY,IAAI,MAAM;CAGvB"}
@@ -0,0 +1,108 @@
1
+ /**
2
+ * Token Cache for Interactive Authentication
3
+ *
4
+ * Provides encrypted file-based storage for MSAL tokens.
5
+ * Tokens are encrypted using AES-256-GCM with a machine-specific key.
6
+ *
7
+ * Storage location: ~/.mcp-consultant-tools/token-cache-{clientId}.enc
8
+ */
9
+ import fs from 'node:fs';
10
+ import path from 'node:path';
11
+ import os from 'node:os';
12
+ import crypto from 'node:crypto';
13
+ export class TokenCache {
14
+ cacheFile;
15
+ encryptionKey;
16
+ cacheDir;
17
+ constructor(clientId) {
18
+ this.cacheDir = path.join(os.homedir(), '.mcp-consultant-tools');
19
+ // Create cache directory if it doesn't exist
20
+ if (!fs.existsSync(this.cacheDir)) {
21
+ fs.mkdirSync(this.cacheDir, { recursive: true, mode: 0o700 });
22
+ }
23
+ this.cacheFile = path.join(this.cacheDir, `token-cache-${clientId}.enc`);
24
+ // Derive encryption key from machine-specific data
25
+ // Uses hostname + username as salt for key derivation
26
+ const machineId = os.hostname() + os.userInfo().username;
27
+ this.encryptionKey = crypto.scryptSync(machineId, 'mcp-powerplatform-auth', 32);
28
+ }
29
+ /**
30
+ * Create MSAL cache plugin for automatic token persistence
31
+ */
32
+ createPlugin() {
33
+ return {
34
+ beforeCacheAccess: async (context) => {
35
+ if (fs.existsSync(this.cacheFile)) {
36
+ try {
37
+ const encrypted = fs.readFileSync(this.cacheFile);
38
+ const decrypted = this.decrypt(encrypted);
39
+ context.tokenCache.deserialize(decrypted);
40
+ }
41
+ catch (error) {
42
+ // Cache corrupted or from different machine, ignore
43
+ // MSAL will proceed with empty cache
44
+ console.error('Token cache read error (will re-authenticate):', error.message);
45
+ }
46
+ }
47
+ },
48
+ afterCacheAccess: async (context) => {
49
+ if (context.cacheHasChanged) {
50
+ try {
51
+ const data = context.tokenCache.serialize();
52
+ const encrypted = this.encrypt(data);
53
+ fs.writeFileSync(this.cacheFile, encrypted, { mode: 0o600 });
54
+ }
55
+ catch (error) {
56
+ console.error('Token cache write error:', error.message);
57
+ }
58
+ }
59
+ },
60
+ };
61
+ }
62
+ /**
63
+ * Encrypt data using AES-256-GCM
64
+ */
65
+ encrypt(data) {
66
+ const iv = crypto.randomBytes(16);
67
+ const cipher = crypto.createCipheriv('aes-256-gcm', this.encryptionKey, iv);
68
+ const encrypted = Buffer.concat([cipher.update(data, 'utf8'), cipher.final()]);
69
+ const tag = cipher.getAuthTag();
70
+ // Format: IV (16 bytes) + Auth Tag (16 bytes) + Encrypted Data
71
+ return Buffer.concat([iv, tag, encrypted]);
72
+ }
73
+ /**
74
+ * Decrypt data using AES-256-GCM
75
+ */
76
+ decrypt(data) {
77
+ if (data.length < 33) {
78
+ throw new Error('Invalid encrypted data: too short');
79
+ }
80
+ const iv = data.subarray(0, 16);
81
+ const tag = data.subarray(16, 32);
82
+ const encrypted = data.subarray(32);
83
+ const decipher = crypto.createDecipheriv('aes-256-gcm', this.encryptionKey, iv);
84
+ decipher.setAuthTag(tag);
85
+ return decipher.update(encrypted) + decipher.final('utf8');
86
+ }
87
+ /**
88
+ * Clear the token cache (logout)
89
+ */
90
+ clear() {
91
+ if (fs.existsSync(this.cacheFile)) {
92
+ fs.unlinkSync(this.cacheFile);
93
+ }
94
+ }
95
+ /**
96
+ * Check if a token cache exists
97
+ */
98
+ exists() {
99
+ return fs.existsSync(this.cacheFile);
100
+ }
101
+ /**
102
+ * Get the cache file path (for diagnostics)
103
+ */
104
+ getCachePath() {
105
+ return this.cacheFile;
106
+ }
107
+ }
108
+ //# sourceMappingURL=token-cache.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token-cache.js","sourceRoot":"","sources":["../../src/auth/token-cache.ts"],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
5
+ * Handles authentication (service principal or interactive) and HTTP requests.
6
+ *
7
+ * All modular services use this client for API access.
8
+ */
9
+ import { type AuthProvider } from '../auth/index.js';
10
+ import type { PowerPlatformConfig } from './types.js';
11
+ export declare class PowerPlatformClient {
12
+ private config;
13
+ private authProvider;
14
+ private environmentId;
15
+ /**
16
+ * Create a new PowerPlatformClient
17
+ * @param config - PowerPlatform configuration
18
+ * @param authProvider - Optional custom auth provider (uses createAuthProvider if not provided)
19
+ */
20
+ constructor(config: PowerPlatformConfig, authProvider?: AuthProvider);
21
+ /**
22
+ * Get the organization URL
23
+ */
24
+ getOrganizationUrl(): string;
25
+ /**
26
+ * Get the full configuration
27
+ */
28
+ getConfig(): PowerPlatformConfig;
29
+ /**
30
+ * Get the authentication mode being used
31
+ */
32
+ getAuthMode(): 'service-principal' | 'interactive';
33
+ /**
34
+ * Get information about the authenticated user (if using interactive auth)
35
+ */
36
+ getUserInfo(): Promise<{
37
+ name: string;
38
+ email: string;
39
+ oid: string;
40
+ } | null>;
41
+ /**
42
+ * Clear cached tokens (logout) - only applicable for interactive auth
43
+ */
44
+ logout(): Promise<void>;
45
+ /**
46
+ * Get an access token for the PowerPlatform API
47
+ */
48
+ getAccessToken(): Promise<string>;
49
+ /**
50
+ * Get the environment ID from the organization URL
51
+ */
52
+ getEnvironmentId(): Promise<string>;
53
+ /**
54
+ * Make an authenticated request to the PowerPlatform API
55
+ *
56
+ * @param endpoint - API endpoint (relative to organization URL)
57
+ * @param method - HTTP method
58
+ * @param data - Request body data
59
+ * @param additionalHeaders - Additional HTTP headers
60
+ * @returns Response data
61
+ */
62
+ makeRequest<T>(endpoint: string, method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE', data?: unknown, additionalHeaders?: Record<string, string>): Promise<T>;
63
+ /**
64
+ * Make a request and return the full response (including headers)
65
+ * Useful for operations that need to check response headers
66
+ */
67
+ makeRequestWithResponse<T>(endpoint: string, method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE', data?: unknown, additionalHeaders?: Record<string, string>): Promise<{
68
+ data: T;
69
+ headers: Record<string, string>;
70
+ status: number;
71
+ }>;
72
+ /**
73
+ * Make a request that returns no content (204 response)
74
+ * Used for DELETE operations and some updates
75
+ */
76
+ makeRequestNoContent(endpoint: string, method?: 'POST' | 'PUT' | 'PATCH' | 'DELETE', data?: unknown, additionalHeaders?: Record<string, string>): Promise<void>;
77
+ }
78
+ //# sourceMappingURL=PowerPlatformClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PowerPlatformClient.d.ts","sourceRoot":"","sources":["../../src/client/PowerPlatformClient.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,KAAK,YAAY,EAAsB,MAAM,kBAAkB,CAAC;AACzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,MAAM,CAAsB;IACpC,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,aAAa,CAAuB;IAE5C;;;;OAIG;gBACS,MAAM,EAAE,mBAAmB,EAAE,YAAY,CAAC,EAAE,YAAY;IAcpE;;OAEG;IACH,kBAAkB,IAAI,MAAM;IAI5B;;OAEG;IACH,SAAS,IAAI,mBAAmB;IAIhC;;OAEG;IACH,WAAW,IAAI,mBAAmB,GAAG,aAAa;IAIlD;;OAEG;IACG,WAAW,IAAI,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAOjF;;OAEG;IACG,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAM7B;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC;IAIvC;;OAEG;IACG,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC;IAezC;;;;;;;;OAQG;IACG,WAAW,CAAC,CAAC,EACjB,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAgB,EAC3D,IAAI,CAAC,EAAE,OAAO,EACd,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACzC,OAAO,CAAC,CAAC,CAAC;IAkDb;;;OAGG;IACG,uBAAuB,CAAC,CAAC,EAC7B,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAgB,EAC3D,IAAI,CAAC,EAAE,OAAO,EACd,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACzC,OAAO,CAAC;QAAE,IAAI,EAAE,CAAC,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IA6CxE;;;OAGG;IACG,oBAAoB,CACxB,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAmB,EACtD,IAAI,CAAC,EAAE,OAAO,EACd,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACzC,OAAO,CAAC,IAAI,CAAC;CAsCjB"}
@@ -0,0 +1,198 @@
1
+ /**
2
+ * PowerPlatformClient
3
+ *
4
+ * Core HTTP client for PowerPlatform/Dataverse API.
5
+ * Handles authentication (service principal or interactive) and HTTP requests.
6
+ *
7
+ * All modular services use this client for API access.
8
+ */
9
+ import axios from 'axios';
10
+ import { createAuthProvider } from '../auth/index.js';
11
+ export class PowerPlatformClient {
12
+ config;
13
+ authProvider;
14
+ environmentId = null;
15
+ /**
16
+ * Create a new PowerPlatformClient
17
+ * @param config - PowerPlatform configuration
18
+ * @param authProvider - Optional custom auth provider (uses createAuthProvider if not provided)
19
+ */
20
+ constructor(config, authProvider) {
21
+ this.config = config;
22
+ // Use provided auth provider or create one based on config
23
+ this.authProvider =
24
+ authProvider ||
25
+ createAuthProvider({
26
+ organizationUrl: config.organizationUrl,
27
+ clientId: config.clientId,
28
+ clientSecret: config.clientSecret,
29
+ tenantId: config.tenantId,
30
+ });
31
+ }
32
+ /**
33
+ * Get the organization URL
34
+ */
35
+ getOrganizationUrl() {
36
+ return this.config.organizationUrl;
37
+ }
38
+ /**
39
+ * Get the full configuration
40
+ */
41
+ getConfig() {
42
+ return this.config;
43
+ }
44
+ /**
45
+ * Get the authentication mode being used
46
+ */
47
+ getAuthMode() {
48
+ return this.authProvider.getAuthMode();
49
+ }
50
+ /**
51
+ * Get information about the authenticated user (if using interactive auth)
52
+ */
53
+ async getUserInfo() {
54
+ if (this.authProvider.getUserInfo) {
55
+ return this.authProvider.getUserInfo();
56
+ }
57
+ return null;
58
+ }
59
+ /**
60
+ * Clear cached tokens (logout) - only applicable for interactive auth
61
+ */
62
+ async logout() {
63
+ if (this.authProvider.clearCache) {
64
+ await this.authProvider.clearCache();
65
+ }
66
+ }
67
+ /**
68
+ * Get an access token for the PowerPlatform API
69
+ */
70
+ async getAccessToken() {
71
+ return this.authProvider.getAccessToken(this.config.organizationUrl);
72
+ }
73
+ /**
74
+ * Get the environment ID from the organization URL
75
+ */
76
+ async getEnvironmentId() {
77
+ if (this.environmentId) {
78
+ return this.environmentId;
79
+ }
80
+ // Extract from organization URL or fetch from API
81
+ const orgUrl = this.config.organizationUrl;
82
+ const match = orgUrl.match(/https:\/\/([^.]+)\./);
83
+ if (match) {
84
+ this.environmentId = match[1];
85
+ }
86
+ return this.environmentId || '';
87
+ }
88
+ /**
89
+ * Make an authenticated request to the PowerPlatform API
90
+ *
91
+ * @param endpoint - API endpoint (relative to organization URL)
92
+ * @param method - HTTP method
93
+ * @param data - Request body data
94
+ * @param additionalHeaders - Additional HTTP headers
95
+ * @returns Response data
96
+ */
97
+ async makeRequest(endpoint, method = 'GET', data, additionalHeaders) {
98
+ try {
99
+ const token = await this.getAccessToken();
100
+ const headers = {
101
+ Authorization: `Bearer ${token}`,
102
+ Accept: 'application/json',
103
+ 'OData-MaxVersion': '4.0',
104
+ 'OData-Version': '4.0',
105
+ ...additionalHeaders,
106
+ };
107
+ // Add Content-Type for POST/PUT/PATCH requests
108
+ if (method !== 'GET' && method !== 'DELETE' && data) {
109
+ headers['Content-Type'] = 'application/json';
110
+ }
111
+ const response = await axios({
112
+ method,
113
+ url: `${this.config.organizationUrl}/${endpoint}`,
114
+ headers,
115
+ data,
116
+ });
117
+ return response.data;
118
+ }
119
+ catch (error) {
120
+ const axiosError = error;
121
+ const errorDetails = axiosError.response?.data?.error || axiosError.response?.data || axiosError.message;
122
+ console.error('PowerPlatform API request failed:', {
123
+ endpoint,
124
+ method,
125
+ status: axiosError.response?.status,
126
+ statusText: axiosError.response?.statusText,
127
+ error: errorDetails,
128
+ });
129
+ throw new Error(`PowerPlatform API request failed: ${axiosError.message} - ${JSON.stringify(errorDetails)}`);
130
+ }
131
+ }
132
+ /**
133
+ * Make a request and return the full response (including headers)
134
+ * Useful for operations that need to check response headers
135
+ */
136
+ async makeRequestWithResponse(endpoint, method = 'GET', data, additionalHeaders) {
137
+ try {
138
+ const token = await this.getAccessToken();
139
+ const headers = {
140
+ Authorization: `Bearer ${token}`,
141
+ Accept: 'application/json',
142
+ 'OData-MaxVersion': '4.0',
143
+ 'OData-Version': '4.0',
144
+ ...additionalHeaders,
145
+ };
146
+ if (method !== 'GET' && method !== 'DELETE' && data) {
147
+ headers['Content-Type'] = 'application/json';
148
+ }
149
+ const response = await axios({
150
+ method,
151
+ url: `${this.config.organizationUrl}/${endpoint}`,
152
+ headers,
153
+ data,
154
+ });
155
+ return {
156
+ data: response.data,
157
+ headers: response.headers,
158
+ status: response.status,
159
+ };
160
+ }
161
+ catch (error) {
162
+ const axiosError = error;
163
+ const errorDetails = axiosError.response?.data?.error || axiosError.response?.data || axiosError.message;
164
+ throw new Error(`PowerPlatform API request failed: ${axiosError.message} - ${JSON.stringify(errorDetails)}`);
165
+ }
166
+ }
167
+ /**
168
+ * Make a request that returns no content (204 response)
169
+ * Used for DELETE operations and some updates
170
+ */
171
+ async makeRequestNoContent(endpoint, method = 'DELETE', data, additionalHeaders) {
172
+ try {
173
+ const token = await this.getAccessToken();
174
+ const headers = {
175
+ Authorization: `Bearer ${token}`,
176
+ Accept: 'application/json',
177
+ 'OData-MaxVersion': '4.0',
178
+ 'OData-Version': '4.0',
179
+ ...additionalHeaders,
180
+ };
181
+ if (data) {
182
+ headers['Content-Type'] = 'application/json';
183
+ }
184
+ await axios({
185
+ method,
186
+ url: `${this.config.organizationUrl}/${endpoint}`,
187
+ headers,
188
+ data,
189
+ });
190
+ }
191
+ catch (error) {
192
+ const axiosError = error;
193
+ const errorDetails = axiosError.response?.data?.error || axiosError.response?.data || axiosError.message;
194
+ throw new Error(`PowerPlatform API request failed: ${axiosError.message} - ${JSON.stringify(errorDetails)}`);
195
+ }
196
+ }
197
+ }
198
+ //# sourceMappingURL=PowerPlatformClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PowerPlatformClient.js","sourceRoot":"","sources":["../../src/client/PowerPlatformClient.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAqB,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAGzE,MAAM,OAAO,mBAAmB;IACtB,MAAM,CAAsB;IAC5B,YAAY,CAAe;IAC3B,aAAa,GAAkB,IAAI,CAAC;IAE5C;;;;OAIG;IACH,YAAY,MAA2B,EAAE,YAA2B;QAClE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,2DAA2D;QAC3D,IAAI,CAAC,YAAY;YACf,YAAY;gBACZ,kBAAkB,CAAC;oBACjB,eAAe,EAAE,MAAM,CAAC,eAAe;oBACvC,QAAQ,EAAE,MAAM,CAAC,QAAQ;oBACzB,YAAY,EAAE,MAAM,C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ACH,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,oBAAoB,CACxB,QAAgB,EAChB,SAA8C,QAAQ,EACtD,IAAc,EACd,iBAA0C;QAE1C,IAAI,CAAC;YACH,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;YAE1C,MAAM,OAAO,GAA2B;gBACtC,aAAa,EAAE,UAAU,KAAK,EAAE;gBAChC,MAAM,EAAE,kBAAkB;gBAC1B,kBAAkB,EAAE,KAAK;gBACzB,eAAe,EAAE,KAAK;gBACtB,GAAG,iBAAiB;aACrB,CAAC;YAEF,IAAI,IAAI,EAAE,CAAC;gBACT,OAAO,CAAC,cAAc,CAAC,GAAG,kBAAkB,CAAC;YAC/C,CAAC;YAED,MAAM,KAAK,CAAC;gBACV,MAAM;gBACN,GAAG,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,eAAe,IAAI,QAAQ,EAAE;gBACjD,OAAO;gBACP,IAAI;aACL,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACxB,MAAM,UAAU,GAAG,KAOlB,CAAC;YACF,MAAM,YAAY,GAChB,UAAU,CAAC,QAAQ,EAAE,IAAI,EAAE,KAAK,IAAI,UAAU,CAAC,QAAQ,EAAE,IAAI,IAAI,UAAU,CAAC,OAAO,CAAC;YACtF,MAAM,IAAI,KAAK,CACb,qCAAqC,UAAU,CAAC,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,CAC5F,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Client module exports
3
+ */
4
+ export { PowerPlatformClient } from './PowerPlatformClient.js';
5
+ export * from './types.js';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,cAAc,YAAY,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Client module exports
3
+ */
4
+ export { PowerPlatformClient } from './PowerPlatformClient.js';
5
+ export * from './types.js';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,cAAc,YAAY,CAAC"}