codeapp-js 0.2.1 → 0.3.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.
Files changed (100) hide show
  1. package/codeApp/.power/schemas/appschemas/dataSourcesInfo.ts +6275 -0
  2. package/codeApp/.power/schemas/jira/jira.Schema.json +6903 -0
  3. package/codeApp/.power/schemas/keyvault/keyvault.Schema.json +1600 -0
  4. package/codeApp/.power/schemas/teams/teams.Schema.json +11112 -0
  5. package/codeApp/dist/codeapp.js +992 -4
  6. package/codeApp/dist/power-apps-data.js +145 -31
  7. package/codeApp/src/generated/index.ts +12 -0
  8. package/codeApp/src/generated/models/AzureKeyVaultModel.ts +107 -0
  9. package/codeApp/src/generated/models/JiraModel.ts +501 -0
  10. package/codeApp/src/generated/models/Office365GroupsModel.ts +363 -0
  11. package/codeApp/src/generated/models/Office365OutlookModel.ts +2046 -0
  12. package/codeApp/src/generated/models/Office365UsersModel.ts +254 -0
  13. package/codeApp/src/generated/services/AzureKeyVaultService.ts +257 -0
  14. package/codeApp/src/generated/services/JiraService.ts +1124 -0
  15. package/codeApp/src/generated/services/Office365GroupsService.ts +326 -0
  16. package/codeApp/src/generated/services/Office365OutlookService.ts +2476 -0
  17. package/codeApp/src/generated/services/Office365UsersService.ts +358 -0
  18. package/dev files/outlook.js +218 -9
  19. package/examples/combined demo/dist/codeapp.js +1098 -1098
  20. package/examples/combined demo/dist/index.js +470 -470
  21. package/examples/combined demo/dist/power-apps-data.js +3006 -3006
  22. package/examples/combined demo/power.config.json +42 -42
  23. package/examples/dataverse Demo/dist/codeapp.js +1085 -1085
  24. package/examples/dataverse Demo/dist/index.html +54 -54
  25. package/examples/dataverse Demo/dist/index.js +82 -82
  26. package/examples/dataverse Demo/dist/power-apps-data.js +2911 -2911
  27. package/examples/dataverse Demo/power.config.json +34 -34
  28. package/examples/dataverse Demo/readme.md +79 -79
  29. package/examples/groups Demo/dist/codeapp.js +1085 -1085
  30. package/examples/groups Demo/dist/index.js +113 -113
  31. package/examples/groups Demo/dist/power-apps-data.js +2911 -2911
  32. package/examples/kanban/dist/dataverse.js +94 -94
  33. package/examples/kanban/dist/environmentVar.js +55 -55
  34. package/examples/kanban/dist/office365groups.js +97 -97
  35. package/examples/kanban/dist/office365users.js +169 -169
  36. package/examples/kanban/dist/outlook.js +162 -162
  37. package/examples/kanban/dist/power-apps-data.js +2953 -2953
  38. package/examples/kanban/dist/sharepoint.js +339 -339
  39. package/examples/myProfile/dist/index.html +184 -184
  40. package/examples/myProfile/dist/index.js +141 -141
  41. package/examples/myProfile/dist/office365users.js +169 -169
  42. package/examples/myProfile/dist/power-apps-data.js +2953 -2953
  43. package/examples/myProfile/power.config.json +22 -22
  44. package/examples/myProfile/readme.md +79 -79
  45. package/examples/outlook Demo/dist/codeapp.js +1085 -1085
  46. package/examples/outlook Demo/dist/index.html +35 -35
  47. package/examples/outlook Demo/dist/index.js +170 -170
  48. package/examples/outlook Demo/dist/outlook.js +121 -121
  49. package/examples/outlook Demo/dist/power-apps-data.js +2911 -2911
  50. package/examples/outlook Demo/dist/styles.css +84 -84
  51. package/examples/outlook Demo/readme.md +82 -82
  52. package/examples/outlook Demo2/OutlookDemo_1_0_0_1.zip +0 -0
  53. package/examples/outlook Demo2/agent/decision-log.md +7 -0
  54. package/examples/{solution explorer → outlook Demo2}/dist/codeapp.js +245 -9
  55. package/examples/outlook Demo2/dist/index.html +98 -0
  56. package/examples/outlook Demo2/dist/index.js +272 -0
  57. package/examples/outlook Demo2/dist/styles.css +639 -0
  58. package/examples/outlook Demo2/power.config.json +23 -0
  59. package/examples/outlook Demo2/src/generated/index.ts +14 -0
  60. package/examples/outlook Demo2/src/generated/models/Office365GroupsModel.ts +363 -0
  61. package/examples/outlook Demo2/src/generated/models/Office365OutlookModel.ts +2046 -0
  62. package/examples/outlook Demo2/src/generated/models/Office365UsersModel.ts +254 -0
  63. package/examples/outlook Demo2/src/generated/services/Office365GroupsService.ts +326 -0
  64. package/examples/outlook Demo2/src/generated/services/Office365OutlookService.ts +2476 -0
  65. package/examples/outlook Demo2/src/generated/services/Office365UsersService.ts +358 -0
  66. package/examples/planning Poker/.vscode/settings.json +4 -4
  67. package/examples/planning Poker/additional files/customizations (tables).xml +6428 -6428
  68. package/examples/planning Poker/additional files/dataverse-tables.json +165 -165
  69. package/examples/planning Poker/additional files/readme.md +122 -122
  70. package/examples/planning Poker/dist/dataverse.js +78 -78
  71. package/examples/planning Poker/dist/index.html +198 -198
  72. package/examples/planning Poker/dist/index.js +954 -954
  73. package/examples/planning Poker/dist/power-apps-data.js +2953 -2953
  74. package/examples/planning Poker/dist/styles.css +815 -815
  75. package/examples/sharePoint Demo/agent/decision-log.md +5 -5
  76. package/examples/sharePoint Demo/dist/codeapp.js +1085 -1085
  77. package/examples/sharePoint Demo/dist/index.js +262 -262
  78. package/examples/sharePoint Demo/dist/power-apps-data.js +2911 -2911
  79. package/examples/sharePoint Demo/power.config.json +22 -22
  80. package/examples/todo/dist/dataverse.js +64 -64
  81. package/examples/todo/dist/index.html +75 -75
  82. package/examples/todo/dist/index.js +8 -8
  83. package/examples/todo/dist/power-apps-data.js +2953 -2953
  84. package/examples/todo/dist/renderer.js +375 -375
  85. package/examples/todo/dist/styles.css +691 -691
  86. package/examples/todo/power.config.json +34 -34
  87. package/package.json +1 -1
  88. package/readme.md +33 -4
  89. package/examples/solution explorer/agent/decision-log.md +0 -27
  90. package/examples/solution explorer/agent/mockup-01-swiss-grid.html +0 -452
  91. package/examples/solution explorer/agent/mockup-02-dark-glass.html +0 -496
  92. package/examples/solution explorer/agent/mockup-03-paper-console.html +0 -510
  93. package/examples/solution explorer/agent/mockup-04-neon-noir.html +0 -546
  94. package/examples/solution explorer/agent/mockup-05-zen-garden.html +0 -534
  95. package/examples/solution explorer/dist/index.html +0 -80
  96. package/examples/solution explorer/dist/index.js +0 -735
  97. package/examples/solution explorer/dist/styles.css +0 -571
  98. package/examples/solution explorer/power.config.json +0 -151
  99. /package/examples/{solution explorer → outlook Demo2}/dist/icon-512.png +0 -0
  100. /package/examples/{solution explorer → outlook Demo2}/dist/power-apps-data.js +0 -0
@@ -0,0 +1,254 @@
1
+ /*!
2
+ * Copyright (C) Microsoft Corporation. All rights reserved.
3
+ * This file is autogenerated. Do not edit this file directly.
4
+ */
5
+
6
+ export interface GraphUserUpdateable_V1 {
7
+ // About Me
8
+ aboutMe?: string;
9
+ // Birthday
10
+ birthday?: string;
11
+ // Interests
12
+ interests?: string[];
13
+ // My Site
14
+ mySite?: string;
15
+ // Past Projects
16
+ pastProjects?: string[];
17
+ // Schools
18
+ schools?: string[];
19
+ // Skills
20
+ skills?: string[];
21
+ }
22
+
23
+ export interface GraphTrending {
24
+ // Unique identifier of the relationship
25
+ id?: string;
26
+ // Value indicating how much the document is currently trending
27
+ weight?: number;
28
+ resourceVisualization?: resourceVisualization;
29
+ sensitivityLabelInfo?: sensitivityLabelMetadata[];
30
+ }
31
+
32
+ export interface resourceVisualization {
33
+ // The item's title text
34
+ title?: string;
35
+ // The item's media type (can be used for filtering for a specific file based on a specific type)
36
+ _type?: string;
37
+ // The items media type (can be used for filtering for a specific type of file based on supported IANA Media MIME types)
38
+ mediaType?: string;
39
+ // A URL leading to the preview image for the item
40
+ previewImageUrl?: string;
41
+ // A preview text for the item
42
+ previewText?: string;
43
+ // A path leading to the folder in which the item is stored
44
+ containerWebUrl?: string;
45
+ // A string describing where the item is stored
46
+ containerDisplayName?: string;
47
+ // Can be used for filtering by the type of container in which the file is stored
48
+ containerType?: string;
49
+ }
50
+
51
+ export interface sensitivityLabelMetadata {
52
+ // SensitivityLabel Id.
53
+ sensitivityLabelId?: string;
54
+ // SensitivityLabel name.
55
+ name?: string;
56
+ // SensitivityLabel displayName info
57
+ displayName?: string;
58
+ // SensitivityLabel details on tooltip.
59
+ tooltip?: string;
60
+ // SensitivityLabel priority.
61
+ priority?: number;
62
+ // SensitivityLabel color.
63
+ color?: string;
64
+ // is SensitivityLabel Encrypted.
65
+ isEncrypted?: boolean;
66
+ // Whether SensitivityLabel is Enabled.
67
+ isEnabled?: boolean;
68
+ // Whether SensitivityLabel is Parent.
69
+ isParent?: boolean;
70
+ // Parent SensitivityLabel Id.
71
+ parentSensitivityLabelId?: string;
72
+ }
73
+
74
+ export interface LinklessEntityListResponse_List_Person {
75
+ // Value
76
+ value?: Person[];
77
+ }
78
+
79
+ export interface Person {
80
+ // A unique identifier for the Person object in the directory
81
+ id?: string;
82
+ // The person's display name
83
+ displayName?: string;
84
+ // The person's given name
85
+ givenName?: string;
86
+ // The person's surname
87
+ surname?: string;
88
+ // The person's birthday
89
+ birthday?: string;
90
+ // Free-form notes that the current user has taken about this person
91
+ personNotes?: string;
92
+ // If the current user has flagged this person as a favorite
93
+ isFavorite?: boolean;
94
+ // The person's job title
95
+ jobTitle?: string;
96
+ // The name of the person's company
97
+ companyName?: string;
98
+ // The person's department
99
+ department?: string;
100
+ // The location of the person's office
101
+ officeLocation?: string;
102
+ // The person's profession
103
+ profession?: string;
104
+ // The user principal name(UPN) of the user.The UPN is an Internet-style login name for the user based on the Internet standard RFC 822. By convention, this should map to the user's email name.The general format is alias @domain, where domain must be present in the tenant's collection of verified domains.
105
+ userPrincipalName?: string;
106
+ // The person's VOIP SIP address
107
+ imAddress?: string;
108
+ // Collection of the person's email addresses with a relevance score
109
+ scoredEmailAddresses?: ScoredEmailAddress[];
110
+ // The person's phone numbers
111
+ phones?: Phone[];
112
+ }
113
+
114
+ export interface ScoredEmailAddress {
115
+ // The email address
116
+ address?: string;
117
+ // The relevance score of the email address. A relevance score is used as a sort key, in relation to the other returned results. A higher relevance score value corresponds to a more relevant result. Relevance is determined by the user's communication and collaboration patterns and business relationships.
118
+ relevanceScore?: number;
119
+ }
120
+
121
+ export interface Phone {
122
+ // The phone number
123
+ _number?: string;
124
+ // The type of phone number. Possible values: home, business, mobile, other, assistant, homeFax, businessFax, otherFax, pager, radio.
125
+ _type?: string;
126
+ }
127
+
128
+ export interface User {
129
+ // A unique identifier for the user object in the directory.
130
+ Id: string;
131
+ // true if the account is enabled; otherwise, false. This property is required when a user is created.
132
+ AccountEnabled?: boolean;
133
+ // A list of business phone numbers for the user
134
+ BusinessPhones?: string[];
135
+ // The city in which the user is located.
136
+ City?: string;
137
+ // The name of the company in which the user works.
138
+ CompanyName?: string;
139
+ // The country/region in which the user is located; for example, "US" or "UK".
140
+ Country?: string;
141
+ // The name of the department in which the user works.
142
+ Department?: string;
143
+ // The name displayed in the address book for the user. This is usually the combination of the user's first name, middle initial and last name. This property is required when a user is created and it cannot be cleared during updates.
144
+ DisplayName?: string;
145
+ // The given name (first name) of the user.
146
+ GivenName?: string;
147
+ // The user’s job title.
148
+ JobTitle?: string;
149
+ // The SMTP/email address for the user, for example, "jeff@contoso.onmicrosoft.com". Read-Only.
150
+ Mail?: string;
151
+ // The mail alias for the user. This property must be specified when a user is created.
152
+ MailNickname?: string;
153
+ // The primary cellular telephone number for the user.
154
+ mobilePhone?: string;
155
+ // The office location in the user's place of business.
156
+ OfficeLocation?: string;
157
+ // The postal code for the user's postal address. The postal code is specific to the user's country/region. In the United States of America, this attribute contains the ZIP code.
158
+ PostalCode?: string;
159
+ // The user's surname (family name or last name).
160
+ Surname?: string;
161
+ // The primary cellular telephone number for the user.
162
+ TelephoneNumber?: string;
163
+ // The user principal name (UPN) of the user. The UPN is an Internet-style login name for the user based on the Internet standard RFC 822. By convention, this should map to the user’s email name. The general format is alias@domain, where domain must be present in the tenant’s collection of verified domains.
164
+ UserPrincipalName?: string;
165
+ }
166
+
167
+ export interface ClientPhotoMetadata {
168
+ // Has photo
169
+ HasPhoto?: boolean;
170
+ // Height of photo
171
+ Height?: number;
172
+ // Width of photo
173
+ Width?: number;
174
+ // Content Type of photo
175
+ ContentType?: string;
176
+ // File extension for the photo (ex: ".jpg")
177
+ ImageFileExtension?: string;
178
+ }
179
+
180
+ export type Object = object;
181
+
182
+ export interface EntityListResponse_IReadOnlyList_User {
183
+ // Value
184
+ value?: User[];
185
+ // Next page link
186
+ "@odata.nextLink"?: string;
187
+ }
188
+
189
+ export interface GraphUser_V1 {
190
+ // About Me
191
+ aboutMe?: string;
192
+ // true if the account is enabled; otherwise, false. This property is required when a user is created.
193
+ accountEnabled?: boolean;
194
+ // Birthday
195
+ birthday?: string;
196
+ // Business Phones
197
+ businessPhones?: string[];
198
+ // The city in which the user is located.
199
+ city?: string;
200
+ // The name of the company in which the user works.
201
+ companyName?: string;
202
+ // The country/region in which the user is located; for example, "US" or "UK".
203
+ country?: string;
204
+ // The name of the department in which the user works.
205
+ department?: string;
206
+ // Display Name
207
+ displayName?: string;
208
+ // Given Name
209
+ givenName?: string;
210
+ // Hire Date
211
+ hireDate?: string;
212
+ // Id
213
+ id?: string;
214
+ // Interests
215
+ interests?: string[];
216
+ // Job Title
217
+ jobTitle?: string;
218
+ // Mail
219
+ mail?: string;
220
+ // The mail alias for the user. This property must be specified when a user is created.
221
+ mailNickname?: string;
222
+ // Mobile Phone
223
+ mobilePhone?: string;
224
+ // My Site
225
+ mySite?: string;
226
+ // Office Location
227
+ officeLocation?: string;
228
+ // Past Projects
229
+ pastProjects?: string[];
230
+ // The postal code for the user's postal address. The postal code is specific to the user's country/region. In the United States of America, this attribute contains the ZIP code.
231
+ postalCode?: string;
232
+ // Preferred Language
233
+ preferredLanguage?: string;
234
+ // Preferred Name
235
+ preferredName?: string;
236
+ // Responsibilities
237
+ responsibilities?: string[];
238
+ // Schools
239
+ schools?: string[];
240
+ // Skills
241
+ skills?: string[];
242
+ // State
243
+ state?: string;
244
+ // Street Address
245
+ streetAddress?: string;
246
+ // Surname
247
+ surname?: string;
248
+ // User Principal Name
249
+ userPrincipalName?: string;
250
+ // User Type
251
+ userType?: string;
252
+ }
253
+
254
+ export type ObjectWithoutType = object;
@@ -0,0 +1,257 @@
1
+ /*!
2
+ * Copyright (C) Microsoft Corporation. All rights reserved.
3
+ * This file is autogenerated. Do not edit this file directly.
4
+ */
5
+
6
+ import type { IOperationResult } from '@microsoft/power-apps/data';
7
+ import type { KeyDecryptInput } from '../models/AzureKeyVaultModel';
8
+ import type { KeyDecryptOutput } from '../models/AzureKeyVaultModel';
9
+ import type { KeyEncryptInput } from '../models/AzureKeyVaultModel';
10
+ import type { KeyEncryptOutput } from '../models/AzureKeyVaultModel';
11
+ import type { KeyMetadata } from '../models/AzureKeyVaultModel';
12
+ import type { KeyMetadataCollection } from '../models/AzureKeyVaultModel';
13
+ import type { Secret } from '../models/AzureKeyVaultModel';
14
+ import type { SecretMetadata } from '../models/AzureKeyVaultModel';
15
+ import type { SecretMetadataCollection } from '../models/AzureKeyVaultModel';
16
+ import { dataSourcesInfo } from '../../../.power/schemas/appschemas/dataSourcesInfo';
17
+ import { getClient } from '@microsoft/power-apps/data';
18
+
19
+ export class AzureKeyVaultService {
20
+ private static readonly dataSourceName = 'keyvault';
21
+
22
+ private static readonly client = getClient(dataSourcesInfo);
23
+
24
+ /**
25
+ * List keys
26
+ * List keys.
27
+ */
28
+ public static async ListKeys(): Promise<IOperationResult<KeyMetadataCollection>> {
29
+ const result = await AzureKeyVaultService.client.executeAsync<void, KeyMetadataCollection>(
30
+ {
31
+ connectorOperation: {
32
+ tableName: AzureKeyVaultService.dataSourceName,
33
+ operationName: 'ListKeys',
34
+ },
35
+ });
36
+ return result;
37
+ }
38
+
39
+ /**
40
+ * List key versions
41
+ * List versions of a key.
42
+ */
43
+ public static async ListKeyVersions(keyName: string): Promise<IOperationResult<KeyMetadataCollection>> {
44
+ const params: { keyName: string } = { keyName };
45
+ const result = await AzureKeyVaultService.client.executeAsync<{ keyName: string }, KeyMetadataCollection>(
46
+ {
47
+ connectorOperation: {
48
+ tableName: AzureKeyVaultService.dataSourceName,
49
+ operationName: 'ListKeyVersions',
50
+ parameters: params
51
+ },
52
+ });
53
+ return result;
54
+ }
55
+
56
+ /**
57
+ * Get key metadata
58
+ * Gets metadata of a key.
59
+ */
60
+ public static async GetKeyMetadata(keyName: string): Promise<IOperationResult<KeyMetadata>> {
61
+ const params: { keyName: string } = { keyName };
62
+ const result = await AzureKeyVaultService.client.executeAsync<{ keyName: string }, KeyMetadata>(
63
+ {
64
+ connectorOperation: {
65
+ tableName: AzureKeyVaultService.dataSourceName,
66
+ operationName: 'GetKeyMetadata',
67
+ parameters: params
68
+ },
69
+ });
70
+ return result;
71
+ }
72
+
73
+ /**
74
+ * Get key version metadata
75
+ * Gets metadata of a version of a key.
76
+ */
77
+ public static async GetKeyVersionMetadata(keyName: string, keyVersion: string): Promise<IOperationResult<KeyMetadata>> {
78
+ const params: { keyName: string, keyVersion: string } = { keyName, keyVersion };
79
+ const result = await AzureKeyVaultService.client.executeAsync<{ keyName: string, keyVersion: string }, KeyMetadata>(
80
+ {
81
+ connectorOperation: {
82
+ tableName: AzureKeyVaultService.dataSourceName,
83
+ operationName: 'GetKeyVersionMetadata',
84
+ parameters: params
85
+ },
86
+ });
87
+ return result;
88
+ }
89
+
90
+ /**
91
+ * Encrypt data with key
92
+ * Encrypt data using the latest version of a key.
93
+ */
94
+ public static async EncryptData(keyName: string, operationInput: KeyEncryptInput): Promise<IOperationResult<KeyEncryptOutput>> {
95
+ const params: { keyName: string, operationInput: KeyEncryptInput } = { keyName, operationInput };
96
+ const result = await AzureKeyVaultService.client.executeAsync<{ keyName: string, operationInput: KeyEncryptInput }, KeyEncryptOutput>(
97
+ {
98
+ connectorOperation: {
99
+ tableName: AzureKeyVaultService.dataSourceName,
100
+ operationName: 'EncryptData',
101
+ parameters: params
102
+ },
103
+ });
104
+ return result;
105
+ }
106
+
107
+ /**
108
+ * Encrypt data with key version
109
+ * Encrypt data using a specific version of a key.
110
+ */
111
+ public static async EncryptDataWithVersion(keyName: string, keyVersion: string, operationInput: KeyEncryptInput): Promise<IOperationResult<KeyEncryptOutput>> {
112
+ const params: { keyName: string, keyVersion: string, operationInput: KeyEncryptInput } = { keyName, keyVersion, operationInput };
113
+ const result = await AzureKeyVaultService.client.executeAsync<{ keyName: string, keyVersion: string, operationInput: KeyEncryptInput }, KeyEncryptOutput>(
114
+ {
115
+ connectorOperation: {
116
+ tableName: AzureKeyVaultService.dataSourceName,
117
+ operationName: 'EncryptDataWithVersion',
118
+ parameters: params
119
+ },
120
+ });
121
+ return result;
122
+ }
123
+
124
+ /**
125
+ * Decrypt data with key
126
+ * Decrypt data using the latest version of a key. Output of this operation is typically classified as secret and can be visible in the run history.
127
+ */
128
+ public static async DecryptData(keyName: string, operationInput: KeyDecryptInput): Promise<IOperationResult<KeyDecryptOutput>> {
129
+ const params: { keyName: string, operationInput: KeyDecryptInput } = { keyName, operationInput };
130
+ const result = await AzureKeyVaultService.client.executeAsync<{ keyName: string, operationInput: KeyDecryptInput }, KeyDecryptOutput>(
131
+ {
132
+ connectorOperation: {
133
+ tableName: AzureKeyVaultService.dataSourceName,
134
+ operationName: 'DecryptData',
135
+ parameters: params
136
+ },
137
+ });
138
+ return result;
139
+ }
140
+
141
+ /**
142
+ * Decrypt data with key version
143
+ * Decrypt data using a specific version of a key. Output of this operation is typically classified as secret and can be visible in the run history.
144
+ */
145
+ public static async DecryptDataWithVersion(keyName: string, keyVersion: string, operationInput: KeyDecryptInput): Promise<IOperationResult<KeyDecryptOutput>> {
146
+ const params: { keyName: string, keyVersion: string, operationInput: KeyDecryptInput } = { keyName, keyVersion, operationInput };
147
+ const result = await AzureKeyVaultService.client.executeAsync<{ keyName: string, keyVersion: string, operationInput: KeyDecryptInput }, KeyDecryptOutput>(
148
+ {
149
+ connectorOperation: {
150
+ tableName: AzureKeyVaultService.dataSourceName,
151
+ operationName: 'DecryptDataWithVersion',
152
+ parameters: params
153
+ },
154
+ });
155
+ return result;
156
+ }
157
+
158
+ /**
159
+ * List secrets
160
+ * List secrets.
161
+ */
162
+ public static async ListSecrets(): Promise<IOperationResult<SecretMetadataCollection>> {
163
+ const result = await AzureKeyVaultService.client.executeAsync<void, SecretMetadataCollection>(
164
+ {
165
+ connectorOperation: {
166
+ tableName: AzureKeyVaultService.dataSourceName,
167
+ operationName: 'ListSecrets',
168
+ },
169
+ });
170
+ return result;
171
+ }
172
+
173
+ /**
174
+ * List secret versions
175
+ * List versions of a secret.
176
+ */
177
+ public static async ListSecretVersions(secretName: string): Promise<IOperationResult<SecretMetadataCollection>> {
178
+ const params: { secretName: string } = { secretName };
179
+ const result = await AzureKeyVaultService.client.executeAsync<{ secretName: string }, SecretMetadataCollection>(
180
+ {
181
+ connectorOperation: {
182
+ tableName: AzureKeyVaultService.dataSourceName,
183
+ operationName: 'ListSecretVersions',
184
+ parameters: params
185
+ },
186
+ });
187
+ return result;
188
+ }
189
+
190
+ /**
191
+ * Get secret metadata
192
+ * Gets metadata of a secret.
193
+ */
194
+ public static async GetSecretMetadata(secretName: string): Promise<IOperationResult<SecretMetadata>> {
195
+ const params: { secretName: string } = { secretName };
196
+ const result = await AzureKeyVaultService.client.executeAsync<{ secretName: string }, SecretMetadata>(
197
+ {
198
+ connectorOperation: {
199
+ tableName: AzureKeyVaultService.dataSourceName,
200
+ operationName: 'GetSecretMetadata',
201
+ parameters: params
202
+ },
203
+ });
204
+ return result;
205
+ }
206
+
207
+ /**
208
+ * Get secret version metadata
209
+ * Gets metadata of a version of a secret.
210
+ */
211
+ public static async GetSecretVersionMetadata(secretName: string, secretVersion: string): Promise<IOperationResult<SecretMetadata>> {
212
+ const params: { secretName: string, secretVersion: string } = { secretName, secretVersion };
213
+ const result = await AzureKeyVaultService.client.executeAsync<{ secretName: string, secretVersion: string }, SecretMetadata>(
214
+ {
215
+ connectorOperation: {
216
+ tableName: AzureKeyVaultService.dataSourceName,
217
+ operationName: 'GetSecretVersionMetadata',
218
+ parameters: params
219
+ },
220
+ });
221
+ return result;
222
+ }
223
+
224
+ /**
225
+ * Get secret
226
+ * Gets a secret. Output of this operation is typically classified as secret and can be visible in the run history.
227
+ */
228
+ public static async GetSecret(secretName: string): Promise<IOperationResult<Secret>> {
229
+ const params: { secretName: string } = { secretName };
230
+ const result = await AzureKeyVaultService.client.executeAsync<{ secretName: string }, Secret>(
231
+ {
232
+ connectorOperation: {
233
+ tableName: AzureKeyVaultService.dataSourceName,
234
+ operationName: 'GetSecret',
235
+ parameters: params
236
+ },
237
+ });
238
+ return result;
239
+ }
240
+
241
+ /**
242
+ * Get secret version
243
+ * Gets a version of a secret. Output of this operation is typically classified as secret and can be visible in the run history.
244
+ */
245
+ public static async GetSecretVersion(secretName: string, secretVersion: string): Promise<IOperationResult<Secret>> {
246
+ const params: { secretName: string, secretVersion: string } = { secretName, secretVersion };
247
+ const result = await AzureKeyVaultService.client.executeAsync<{ secretName: string, secretVersion: string }, Secret>(
248
+ {
249
+ connectorOperation: {
250
+ tableName: AzureKeyVaultService.dataSourceName,
251
+ operationName: 'GetSecretVersion',
252
+ parameters: params
253
+ },
254
+ });
255
+ return result;
256
+ }
257
+ }