@azure-rest/purview-workflow 1.0.0-beta.1 → 1.0.0-beta.3

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 (187) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/LICENSE +4 -4
  3. package/README.md +65 -92
  4. package/dist/browser/clientDefinitions.d.ts +85 -0
  5. package/dist/browser/clientDefinitions.d.ts.map +1 -0
  6. package/dist/browser/clientDefinitions.js +4 -0
  7. package/dist/browser/clientDefinitions.js.map +1 -0
  8. package/dist/browser/index.d.ts +11 -0
  9. package/dist/browser/index.d.ts.map +1 -0
  10. package/dist/browser/index.js +13 -0
  11. package/dist/browser/index.js.map +1 -0
  12. package/dist/browser/isUnexpected.d.ts +16 -0
  13. package/dist/browser/isUnexpected.d.ts.map +1 -0
  14. package/{dist-esm/src → dist/browser}/isUnexpected.js +5 -6
  15. package/dist/browser/isUnexpected.js.map +1 -0
  16. package/dist/browser/logger.d.ts +2 -0
  17. package/dist/browser/logger.d.ts.map +1 -0
  18. package/dist/browser/logger.js +5 -0
  19. package/dist/browser/logger.js.map +1 -0
  20. package/dist/browser/models.d.ts +70 -0
  21. package/dist/browser/models.d.ts.map +1 -0
  22. package/dist/browser/models.js +4 -0
  23. package/{dist-esm/src → dist/browser}/models.js.map +1 -1
  24. package/dist/browser/outputModels.d.ts +325 -0
  25. package/dist/browser/outputModels.d.ts.map +1 -0
  26. package/dist/browser/outputModels.js +4 -0
  27. package/{dist-esm/src → dist/browser}/outputModels.js.map +1 -1
  28. package/dist/browser/package.json +3 -0
  29. package/dist/browser/paginateHelper.d.ts +68 -0
  30. package/dist/browser/paginateHelper.d.ts.map +1 -0
  31. package/{dist-esm/src → dist/browser}/paginateHelper.js +70 -3
  32. package/dist/browser/paginateHelper.js.map +1 -0
  33. package/dist/browser/parameters.d.ts +109 -0
  34. package/dist/browser/parameters.d.ts.map +1 -0
  35. package/dist/browser/parameters.js +4 -0
  36. package/dist/browser/parameters.js.map +1 -0
  37. package/dist/browser/purviewWorkflow.d.ts +16 -0
  38. package/dist/browser/purviewWorkflow.d.ts.map +1 -0
  39. package/dist/browser/purviewWorkflow.js +45 -0
  40. package/dist/browser/purviewWorkflow.js.map +1 -0
  41. package/dist/browser/responses.d.ts +137 -0
  42. package/dist/browser/responses.d.ts.map +1 -0
  43. package/dist/browser/responses.js +4 -0
  44. package/dist/browser/responses.js.map +1 -0
  45. package/dist/commonjs/clientDefinitions.d.ts +85 -0
  46. package/dist/commonjs/clientDefinitions.d.ts.map +1 -0
  47. package/dist/commonjs/clientDefinitions.js +5 -0
  48. package/dist/commonjs/clientDefinitions.js.map +1 -0
  49. package/dist/commonjs/index.d.ts +11 -0
  50. package/dist/commonjs/index.d.ts.map +1 -0
  51. package/dist/commonjs/index.js +16 -0
  52. package/dist/commonjs/index.js.map +1 -0
  53. package/dist/commonjs/isUnexpected.d.ts +16 -0
  54. package/dist/commonjs/isUnexpected.d.ts.map +1 -0
  55. package/dist/commonjs/isUnexpected.js +85 -0
  56. package/dist/commonjs/isUnexpected.js.map +1 -0
  57. package/dist/commonjs/logger.d.ts +2 -0
  58. package/dist/commonjs/logger.d.ts.map +1 -0
  59. package/dist/commonjs/logger.js +8 -0
  60. package/dist/commonjs/logger.js.map +1 -0
  61. package/dist/commonjs/models.d.ts +70 -0
  62. package/dist/commonjs/models.d.ts.map +1 -0
  63. package/dist/commonjs/models.js +5 -0
  64. package/dist/commonjs/models.js.map +1 -0
  65. package/dist/commonjs/outputModels.d.ts +325 -0
  66. package/dist/commonjs/outputModels.d.ts.map +1 -0
  67. package/dist/commonjs/outputModels.js +5 -0
  68. package/dist/commonjs/outputModels.js.map +1 -0
  69. package/dist/commonjs/package.json +3 -0
  70. package/dist/commonjs/paginateHelper.d.ts +68 -0
  71. package/dist/commonjs/paginateHelper.d.ts.map +1 -0
  72. package/dist/commonjs/paginateHelper.js +140 -0
  73. package/dist/commonjs/paginateHelper.js.map +1 -0
  74. package/dist/commonjs/parameters.d.ts +109 -0
  75. package/dist/commonjs/parameters.d.ts.map +1 -0
  76. package/dist/commonjs/parameters.js +5 -0
  77. package/dist/commonjs/parameters.js.map +1 -0
  78. package/dist/commonjs/purviewWorkflow.d.ts +16 -0
  79. package/dist/commonjs/purviewWorkflow.d.ts.map +1 -0
  80. package/dist/commonjs/purviewWorkflow.js +48 -0
  81. package/dist/commonjs/purviewWorkflow.js.map +1 -0
  82. package/dist/commonjs/responses.d.ts +137 -0
  83. package/dist/commonjs/responses.d.ts.map +1 -0
  84. package/dist/commonjs/responses.js +5 -0
  85. package/dist/commonjs/responses.js.map +1 -0
  86. package/dist/commonjs/tsdoc-metadata.json +11 -0
  87. package/dist/esm/clientDefinitions.d.ts +85 -0
  88. package/dist/esm/clientDefinitions.d.ts.map +1 -0
  89. package/dist/esm/clientDefinitions.js +4 -0
  90. package/dist/esm/clientDefinitions.js.map +1 -0
  91. package/dist/esm/index.d.ts +11 -0
  92. package/dist/esm/index.d.ts.map +1 -0
  93. package/dist/esm/index.js +13 -0
  94. package/dist/esm/index.js.map +1 -0
  95. package/dist/esm/isUnexpected.d.ts +16 -0
  96. package/dist/esm/isUnexpected.d.ts.map +1 -0
  97. package/dist/esm/isUnexpected.js +82 -0
  98. package/dist/esm/isUnexpected.js.map +1 -0
  99. package/dist/esm/logger.d.ts +2 -0
  100. package/dist/esm/logger.d.ts.map +1 -0
  101. package/dist/esm/logger.js +5 -0
  102. package/dist/esm/logger.js.map +1 -0
  103. package/dist/esm/models.d.ts +70 -0
  104. package/dist/esm/models.d.ts.map +1 -0
  105. package/dist/esm/models.js +4 -0
  106. package/dist/esm/models.js.map +1 -0
  107. package/dist/esm/outputModels.d.ts +325 -0
  108. package/dist/esm/outputModels.d.ts.map +1 -0
  109. package/dist/esm/outputModels.js +4 -0
  110. package/dist/esm/outputModels.js.map +1 -0
  111. package/dist/esm/package.json +3 -0
  112. package/dist/esm/paginateHelper.d.ts +68 -0
  113. package/dist/esm/paginateHelper.d.ts.map +1 -0
  114. package/dist/esm/paginateHelper.js +137 -0
  115. package/dist/esm/paginateHelper.js.map +1 -0
  116. package/dist/esm/parameters.d.ts +109 -0
  117. package/dist/esm/parameters.d.ts.map +1 -0
  118. package/dist/esm/parameters.js +4 -0
  119. package/dist/esm/parameters.js.map +1 -0
  120. package/dist/esm/purviewWorkflow.d.ts +16 -0
  121. package/dist/esm/purviewWorkflow.d.ts.map +1 -0
  122. package/dist/esm/purviewWorkflow.js +45 -0
  123. package/dist/esm/purviewWorkflow.js.map +1 -0
  124. package/dist/esm/responses.d.ts +137 -0
  125. package/dist/esm/responses.d.ts.map +1 -0
  126. package/dist/esm/responses.js +4 -0
  127. package/dist/esm/responses.js.map +1 -0
  128. package/dist/react-native/clientDefinitions.d.ts +85 -0
  129. package/dist/react-native/clientDefinitions.d.ts.map +1 -0
  130. package/dist/react-native/clientDefinitions.js +4 -0
  131. package/dist/react-native/clientDefinitions.js.map +1 -0
  132. package/dist/react-native/index.d.ts +11 -0
  133. package/dist/react-native/index.d.ts.map +1 -0
  134. package/dist/react-native/index.js +13 -0
  135. package/dist/react-native/index.js.map +1 -0
  136. package/dist/react-native/isUnexpected.d.ts +16 -0
  137. package/dist/react-native/isUnexpected.d.ts.map +1 -0
  138. package/dist/react-native/isUnexpected.js +82 -0
  139. package/dist/react-native/isUnexpected.js.map +1 -0
  140. package/dist/react-native/logger.d.ts +2 -0
  141. package/dist/react-native/logger.d.ts.map +1 -0
  142. package/dist/react-native/logger.js +5 -0
  143. package/dist/react-native/logger.js.map +1 -0
  144. package/dist/react-native/models.d.ts +70 -0
  145. package/dist/react-native/models.d.ts.map +1 -0
  146. package/dist/react-native/models.js +4 -0
  147. package/dist/react-native/models.js.map +1 -0
  148. package/dist/react-native/outputModels.d.ts +325 -0
  149. package/dist/react-native/outputModels.d.ts.map +1 -0
  150. package/dist/react-native/outputModels.js +4 -0
  151. package/dist/react-native/outputModels.js.map +1 -0
  152. package/dist/react-native/package.json +3 -0
  153. package/dist/react-native/paginateHelper.d.ts +68 -0
  154. package/dist/react-native/paginateHelper.d.ts.map +1 -0
  155. package/dist/react-native/paginateHelper.js +137 -0
  156. package/dist/react-native/paginateHelper.js.map +1 -0
  157. package/dist/react-native/parameters.d.ts +109 -0
  158. package/dist/react-native/parameters.d.ts.map +1 -0
  159. package/dist/react-native/parameters.js +4 -0
  160. package/dist/react-native/parameters.js.map +1 -0
  161. package/dist/react-native/purviewWorkflow.d.ts +16 -0
  162. package/dist/react-native/purviewWorkflow.d.ts.map +1 -0
  163. package/dist/react-native/purviewWorkflow.js +45 -0
  164. package/dist/react-native/purviewWorkflow.js.map +1 -0
  165. package/dist/react-native/responses.d.ts +137 -0
  166. package/dist/react-native/responses.d.ts.map +1 -0
  167. package/dist/react-native/responses.js +4 -0
  168. package/dist/react-native/responses.js.map +1 -0
  169. package/package.json +84 -76
  170. package/review/{purview-workflow.api.md → purview-workflow-node.api.md} +26 -20
  171. package/dist/index.js +0 -188
  172. package/dist/index.js.map +0 -1
  173. package/dist-esm/src/clientDefinitions.js +0 -4
  174. package/dist-esm/src/clientDefinitions.js.map +0 -1
  175. package/dist-esm/src/index.js +0 -13
  176. package/dist-esm/src/index.js.map +0 -1
  177. package/dist-esm/src/isUnexpected.js.map +0 -1
  178. package/dist-esm/src/models.js +0 -4
  179. package/dist-esm/src/outputModels.js +0 -4
  180. package/dist-esm/src/paginateHelper.js.map +0 -1
  181. package/dist-esm/src/parameters.js +0 -4
  182. package/dist-esm/src/parameters.js.map +0 -1
  183. package/dist-esm/src/purviewWorkflow.js +0 -27
  184. package/dist-esm/src/purviewWorkflow.js.map +0 -1
  185. package/dist-esm/src/responses.js +0 -4
  186. package/dist-esm/src/responses.js.map +0 -1
  187. package/types/purview-workflow.d.ts +0 -920
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.isUnexpected = isUnexpected;
6
+ const responseMap = {
7
+ "GET /workflows": ["200"],
8
+ "GET /workflows/{workflowId}": ["200"],
9
+ "PUT /workflows/{workflowId}": ["200"],
10
+ "DELETE /workflows/{workflowId}": ["204"],
11
+ "POST /userrequests": ["200"],
12
+ "GET /workflowruns": ["200"],
13
+ "GET /workflowruns/{workflowRunId}": ["200"],
14
+ "POST /workflowruns/{workflowRunId}/cancel": ["200"],
15
+ "GET /workflowtasks": ["200"],
16
+ "GET /workflowtasks/{taskId}": ["200"],
17
+ "POST /workflowtasks/{taskId}/approve-approval": ["200"],
18
+ "POST /workflowtasks/{taskId}/reject-approval": ["200"],
19
+ "POST /workflowtasks/{taskId}/reassign": ["200"],
20
+ "POST /workflowtasks/{taskId}/change-task-status": ["200"],
21
+ };
22
+ function isUnexpected(response) {
23
+ const lroOriginal = response.headers["x-ms-original-url"];
24
+ const url = new URL(lroOriginal ?? response.request.url);
25
+ const method = response.request.method;
26
+ let pathDetails = responseMap[`${method} ${url.pathname}`];
27
+ if (!pathDetails) {
28
+ pathDetails = getParametrizedPathSuccess(method, url.pathname);
29
+ }
30
+ return !pathDetails.includes(response.status);
31
+ }
32
+ function getParametrizedPathSuccess(method, path) {
33
+ const pathParts = path.split("/");
34
+ // Traverse list to match the longest candidate
35
+ // matchedLen: the length of candidate path
36
+ // matchedValue: the matched status code array
37
+ let matchedLen = -1, matchedValue = [];
38
+ // Iterate the responseMap to find a match
39
+ for (const [key, value] of Object.entries(responseMap)) {
40
+ // Extracting the path from the map key which is in format
41
+ // GET /path/foo
42
+ if (!key.startsWith(method)) {
43
+ continue;
44
+ }
45
+ const candidatePath = getPathFromMapKey(key);
46
+ // Get each part of the url path
47
+ const candidateParts = candidatePath.split("/");
48
+ // track if we have found a match to return the values found.
49
+ let found = true;
50
+ for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
51
+ if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.indexOf("}") !== -1) {
52
+ const start = candidateParts[i].indexOf("}") + 1, end = candidateParts[i]?.length;
53
+ // If the current part of the candidate is a "template" part
54
+ // Try to use the suffix of pattern to match the path
55
+ // {guid} ==> $
56
+ // {guid}:export ==> :export$
57
+ const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(pathParts[j] || "");
58
+ if (!isMatched) {
59
+ found = false;
60
+ break;
61
+ }
62
+ continue;
63
+ }
64
+ // If the candidate part is not a template and
65
+ // the parts don't match mark the candidate as not found
66
+ // to move on with the next candidate path.
67
+ if (candidateParts[i] !== pathParts[j]) {
68
+ found = false;
69
+ break;
70
+ }
71
+ }
72
+ // We finished evaluating the current candidate parts
73
+ // Update the matched value if and only if we found the longer pattern
74
+ if (found && candidatePath.length > matchedLen) {
75
+ matchedLen = candidatePath.length;
76
+ matchedValue = value;
77
+ }
78
+ }
79
+ return matchedValue;
80
+ }
81
+ function getPathFromMapKey(mapKey) {
82
+ const pathStart = mapKey.indexOf("/");
83
+ return mapKey.slice(pathStart);
84
+ }
85
+ //# sourceMappingURL=isUnexpected.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isUnexpected.js","sourceRoot":"","sources":["../../src/isUnexpected.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AA4FlC,oCAqDC;AAhHD,MAAM,WAAW,GAA6B;IAC5C,gBAAgB,EAAE,CAAC,KAAK,CAAC;IACzB,6BAA6B,EAAE,CAAC,KAAK,CAAC;IACtC,6BAA6B,EAAE,CAAC,KAAK,CAAC;IACtC,gCAAgC,EAAE,CAAC,KAAK,CAAC;IACzC,oBAAoB,EAAE,CAAC,KAAK,CAAC;IAC7B,mBAAmB,EAAE,CAAC,KAAK,CAAC;IAC5B,mCAAmC,EAAE,CAAC,KAAK,CAAC;IAC5C,2CAA2C,EAAE,CAAC,KAAK,CAAC;IACpD,oBAAoB,EAAE,CAAC,KAAK,CAAC;IAC7B,6BAA6B,EAAE,CAAC,KAAK,CAAC;IACtC,+CAA+C,EAAE,CAAC,KAAK,C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IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YAC/C,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC;YAClC,YAAY,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n ListWorkflows200Response,\n ListWorkflowsDefaultResponse,\n GetWorkflow200Response,\n GetWorkflowDefaultResponse,\n CreateOrReplaceWorkflow200Response,\n CreateOrReplaceWorkflowDefaultResponse,\n DeleteWorkflow204Response,\n DeleteWorkflowDefaultResponse,\n SubmitUserRequests200Response,\n SubmitUserRequestsDefaultResponse,\n ListWorkflowRuns200Response,\n ListWorkflowRunsDefaultResponse,\n GetWorkflowRun200Response,\n GetWorkflowRunDefaultResponse,\n CancelWorkflowRun200Response,\n CancelWorkflowRunDefaultResponse,\n ListWorkflowTasks200Response,\n ListWorkflowTasksDefaultResponse,\n GetWorkflowTask200Response,\n GetWorkflowTaskDefaultResponse,\n ApproveApprovalTask200Response,\n ApproveApprovalTaskDefaultResponse,\n RejectApprovalTask200Response,\n RejectApprovalTaskDefaultResponse,\n ReassignWorkflowTask200Response,\n ReassignWorkflowTaskDefaultResponse,\n UpdateTaskStatus200Response,\n UpdateTaskStatusDefaultResponse,\n} from \"./responses.js\";\n\nconst responseMap: Record<string, string[]> = {\n \"GET /workflows\": [\"200\"],\n \"GET /workflows/{workflowId}\": [\"200\"],\n \"PUT /workflows/{workflowId}\": [\"200\"],\n \"DELETE /workflows/{workflowId}\": [\"204\"],\n \"POST /userrequests\": [\"200\"],\n \"GET /workflowruns\": [\"200\"],\n \"GET /workflowruns/{workflowRunId}\": [\"200\"],\n \"POST /workflowruns/{workflowRunId}/cancel\": [\"200\"],\n \"GET /workflowtasks\": [\"200\"],\n \"GET /workflowtasks/{taskId}\": [\"200\"],\n \"POST /workflowtasks/{taskId}/approve-approval\": [\"200\"],\n \"POST /workflowtasks/{taskId}/reject-approval\": [\"200\"],\n \"POST /workflowtasks/{taskId}/reassign\": [\"200\"],\n \"POST /workflowtasks/{taskId}/change-task-status\": [\"200\"],\n};\n\nexport function isUnexpected(\n response: ListWorkflows200Response | ListWorkflowsDefaultResponse,\n): response is ListWorkflowsDefaultResponse;\nexport function isUnexpected(\n response: GetWorkflow200Response | GetWorkflowDefaultResponse,\n): response is GetWorkflowDefaultResponse;\nexport function isUnexpected(\n response: CreateOrReplaceWorkflow200Response | CreateOrReplaceWorkflowDefaultResponse,\n): response is CreateOrReplaceWorkflowDefaultResponse;\nexport function isUnexpected(\n response: DeleteWorkflow204Response | DeleteWorkflowDefaultResponse,\n): response is DeleteWorkflowDefaultResponse;\nexport function isUnexpected(\n response: SubmitUserRequests200Response | SubmitUserRequestsDefaultResponse,\n): response is SubmitUserRequestsDefaultResponse;\nexport function isUnexpected(\n response: ListWorkflowRuns200Response | ListWorkflowRunsDefaultResponse,\n): response is ListWorkflowRunsDefaultResponse;\nexport function isUnexpected(\n response: GetWorkflowRun200Response | GetWorkflowRunDefaultResponse,\n): response is GetWorkflowRunDefaultResponse;\nexport function isUnexpected(\n response: CancelWorkflowRun200Response | CancelWorkflowRunDefaultResponse,\n): response is CancelWorkflowRunDefaultResponse;\nexport function isUnexpected(\n response: ListWorkflowTasks200Response | ListWorkflowTasksDefaultResponse,\n): response is ListWorkflowTasksDefaultResponse;\nexport function isUnexpected(\n response: GetWorkflowTask200Response | GetWorkflowTaskDefaultResponse,\n): response is GetWorkflowTaskDefaultResponse;\nexport function isUnexpected(\n response: ApproveApprovalTask200Response | ApproveApprovalTaskDefaultResponse,\n): response is ApproveApprovalTaskDefaultResponse;\nexport function isUnexpected(\n response: RejectApprovalTask200Response | RejectApprovalTaskDefaultResponse,\n): response is RejectApprovalTaskDefaultResponse;\nexport function isUnexpected(\n response: ReassignWorkflowTask200Response | ReassignWorkflowTaskDefaultResponse,\n): response is ReassignWorkflowTaskDefaultResponse;\nexport function isUnexpected(\n response: UpdateTaskStatus200Response | UpdateTaskStatusDefaultResponse,\n): response is UpdateTaskStatusDefaultResponse;\nexport function isUnexpected(\n response:\n | ListWorkflows200Response\n | ListWorkflowsDefaultResponse\n | GetWorkflow200Response\n | GetWorkflowDefaultResponse\n | CreateOrReplaceWorkflow200Response\n | CreateOrReplaceWorkflowDefaultResponse\n | DeleteWorkflow204Response\n | DeleteWorkflowDefaultResponse\n | SubmitUserRequests200Response\n | SubmitUserRequestsDefaultResponse\n | ListWorkflowRuns200Response\n | ListWorkflowRunsDefaultResponse\n | GetWorkflowRun200Response\n | GetWorkflowRunDefaultResponse\n | CancelWorkflowRun200Response\n | CancelWorkflowRunDefaultResponse\n | ListWorkflowTasks200Response\n | ListWorkflowTasksDefaultResponse\n | GetWorkflowTask200Response\n | GetWorkflowTaskDefaultResponse\n | ApproveApprovalTask200Response\n | ApproveApprovalTaskDefaultResponse\n | RejectApprovalTask200Response\n | RejectApprovalTaskDefaultResponse\n | ReassignWorkflowTask200Response\n | ReassignWorkflowTaskDefaultResponse\n | UpdateTaskStatus200Response\n | UpdateTaskStatusDefaultResponse,\n): response is\n | ListWorkflowsDefaultResponse\n | GetWorkflowDefaultResponse\n | CreateOrReplaceWorkflowDefaultResponse\n | DeleteWorkflowDefaultResponse\n | SubmitUserRequestsDefaultResponse\n | ListWorkflowRunsDefaultResponse\n | GetWorkflowRunDefaultResponse\n | CancelWorkflowRunDefaultResponse\n | ListWorkflowTasksDefaultResponse\n | GetWorkflowTaskDefaultResponse\n | ApproveApprovalTaskDefaultResponse\n | RejectApprovalTaskDefaultResponse\n | ReassignWorkflowTaskDefaultResponse\n | UpdateTaskStatusDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = getParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction getParametrizedPathSuccess(method: string, path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: string[] = [];\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const logger: import("@azure/logger").AzureLogger;
2
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM,qCAAyC,CAAC"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.logger = void 0;
6
+ const logger_1 = require("@azure/logger");
7
+ exports.logger = (0, logger_1.createClientLogger)("purview-workflow");
8
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,0CAAmD;AACtC,QAAA,MAAM,GAAG,IAAA,2BAAkB,EAAC,kBAAkB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"purview-workflow\");\n"]}
@@ -0,0 +1,70 @@
1
+ /** Describes under what condition a workflow will run. */
2
+ export interface Trigger {
3
+ type: "when_term_creation_is_requested" | "when_term_deletion_is_requested" | "when_term_update_is_requested" | "when_terms_import_is_requested" | "when_data_access_grant_is_requested" | "when_asset_update_is_requested";
4
+ /** Glossary term hierarchy path. */
5
+ underGlossaryHierarchy?: string;
6
+ /** The collection name. */
7
+ underCollection?: string;
8
+ /** The glossary guid. */
9
+ underGlossary?: string;
10
+ }
11
+ /** Create or update workflow payload. */
12
+ export interface WorkflowCreateOrUpdateCommand {
13
+ /** It describes under what condition a workflow will run. */
14
+ triggers: Array<Trigger>;
15
+ /** The workflow name. */
16
+ name: string;
17
+ /** Whether the workflow enabled or not. */
18
+ isEnabled: boolean;
19
+ /** Description of a workflow. */
20
+ description: string;
21
+ /** The action DAG(Directed Acyclic Graph), it defines actual flow. */
22
+ actionDag?: Record<string, unknown>;
23
+ }
24
+ export interface UserRequestPayload {
25
+ /** The list of operations user want to submit, each operation matches one Purview API call and will do the operation directly. */
26
+ operations: Array<Operation>;
27
+ /** The comment when submit a user request. */
28
+ comment?: string;
29
+ }
30
+ /** The operation user wants to perform. */
31
+ export interface Operation {
32
+ /** The operation type. */
33
+ type: "CreateTerm" | "UpdateTerm" | "DeleteTerm" | "ImportTerms" | "UpdateAsset" | "GrantDataAccess";
34
+ /** The payload of each operation which user want to submit. */
35
+ payload: Record<string, unknown>;
36
+ }
37
+ export interface WorkflowRunCancelRequest {
38
+ /** The comment of canceling a workflow run. */
39
+ comment?: string;
40
+ }
41
+ export interface ApprovalResponseComment {
42
+ /** The comment of approving or rejecting an approval request. */
43
+ comment?: string;
44
+ }
45
+ /** The request payload of reassigning a workflow task. */
46
+ export interface ReassignCommand {
47
+ /** The request body of reassigning a workflow task. */
48
+ reassignments?: Array<ReassignCommandReassignmentsItem>;
49
+ }
50
+ export interface ReassignCommandReassignmentsItem {
51
+ /**
52
+ * Reassign a workflow task from a user or a group.
53
+ *
54
+ * Value may contain a UUID
55
+ */
56
+ reassignFrom: string;
57
+ /**
58
+ * Reassign a workflow task to a user or a group.
59
+ *
60
+ * Value may contain a UUID
61
+ */
62
+ reassignTo: string;
63
+ }
64
+ export interface TaskUpdateCommand {
65
+ /** The new status will be used to update the task. */
66
+ newStatus: "NotStarted" | "InProgress" | "Completed" | "Canceled";
67
+ /** The comment when update a task. */
68
+ comment?: string;
69
+ }
70
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAGA,0DAA0D;AAC1D,MAAM,WAAW,OAAO;IACtB,IAAI,EACA,iCAAiC,GACjC,iCAAiC,GACjC,+BAA+B,GAC/B,gCAAgC,GAChC,qCAAqC,GACrC,gCAAgC,CAAC;IACrC,oCA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E,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,sDAAsD;IACtD,SAAS,EAAE,YAAY,GAAG,YAAY,GAAG,WAAW,GAAG,UAAU,CAAC;IAClE,sCAAsC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ //# sourceMappingURL=models.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/** Describes under what condition a workflow will run. */\nexport interface Trigger {\n type:\n | \"when_term_creation_is_requested\"\n | \"when_term_deletion_is_requested\"\n | \"when_term_update_is_requested\"\n | \"when_terms_import_is_requested\"\n | \"when_data_access_grant_is_requested\"\n | \"when_asset_update_is_requested\";\n /** Glossary term hierarchy path. */\n underGlossaryHierarchy?: string;\n /** The collection name. */\n underCollection?: string;\n /** The glossary guid. */\n underGlossary?: string;\n}\n\n/** Create or update workflow payload. */\nexport interface WorkflowCreateOrUpdateCommand {\n /** It describes under what condition a workflow will run. */\n triggers: Array<Trigger>;\n /** The workflow name. */\n name: string;\n /** Whether the workflow enabled or not. */\n isEnabled: boolean;\n /** Description of a workflow. */\n description: string;\n /** The action DAG(Directed Acyclic Graph), it defines actual flow. */\n actionDag?: Record<string, unknown>;\n}\n\nexport interface UserRequestPayload {\n /** The list of operations user want to submit, each operation matches one Purview API call and will do the operation directly. */\n operations: Array<Operation>;\n /** The comment when submit a user request. */\n comment?: string;\n}\n\n/** The operation user wants to perform. */\nexport interface Operation {\n /** The operation type. */\n type:\n | \"CreateTerm\"\n | \"UpdateTerm\"\n | \"DeleteTerm\"\n | \"ImportTerms\"\n | \"UpdateAsset\"\n | \"GrantDataAccess\";\n /** The payload of each operation which user want to submit. */\n payload: Record<string, unknown>;\n}\n\nexport interface WorkflowRunCancelRequest {\n /** The comment of canceling a workflow run. */\n comment?: string;\n}\n\nexport interface ApprovalResponseComment {\n /** The comment of approving or rejecting an approval request. */\n comment?: string;\n}\n\n/** The request payload of reassigning a workflow task. */\nexport interface ReassignCommand {\n /** The request body of reassigning a workflow task. */\n reassignments?: Array<ReassignCommandReassignmentsItem>;\n}\n\nexport interface ReassignCommandReassignmentsItem {\n /**\n * Reassign a workflow task from a user or a group.\n *\n * Value may contain a UUID\n */\n reassignFrom: string;\n /**\n * Reassign a workflow task to a user or a group.\n *\n * Value may contain a UUID\n */\n reassignTo: string;\n}\n\nexport interface TaskUpdateCommand {\n /** The new status will be used to update the task. */\n newStatus: \"NotStarted\" | \"InProgress\" | \"Completed\" | \"Canceled\";\n /** The comment when update a task. */\n comment?: string;\n}\n"]}
@@ -0,0 +1,325 @@
1
+ /** The workflow list. */
2
+ export interface WorkflowMetadataListOutput {
3
+ /** The value of workflow list. */
4
+ value: Array<WorkflowMetadataOutput>;
5
+ /** The URL to get the next set of results. */
6
+ nextLink?: string;
7
+ }
8
+ /** The workflow metadata, action DAGs are not included. */
9
+ export interface WorkflowMetadataOutput {
10
+ /**
11
+ * The id of workflow.
12
+ *
13
+ * Value may contain a UUID
14
+ */
15
+ id: string;
16
+ /** It describes under what condition a workflow will run. */
17
+ triggers: Array<TriggerOutput>;
18
+ /** The created time of workflow. */
19
+ createdTime?: string;
20
+ /** The person who created the workflow. */
21
+ createdBy?: string;
22
+ /** The last update time. */
23
+ lastUpdateTime?: string;
24
+ /** The person who updated the workflow. */
25
+ updatedBy?: string;
26
+ /** The name of a workflow. */
27
+ name: string;
28
+ /** Whether the workflow is enabled or not. */
29
+ isEnabled: boolean;
30
+ /** Description of a workflow. */
31
+ description: string;
32
+ }
33
+ /** Describes under what condition a workflow will run. */
34
+ export interface TriggerOutput {
35
+ type: "when_term_creation_is_requested" | "when_term_deletion_is_requested" | "when_term_update_is_requested" | "when_terms_import_is_requested" | "when_data_access_grant_is_requested" | "when_asset_update_is_requested";
36
+ /** Glossary term hierarchy path. */
37
+ underGlossaryHierarchy?: string;
38
+ /** The collection name. */
39
+ underCollection?: string;
40
+ /** The glossary guid. */
41
+ underGlossary?: string;
42
+ }
43
+ /** Default error response model */
44
+ export interface ErrorResponseOutput {
45
+ /** Default error model */
46
+ error: ErrorModelOutput;
47
+ }
48
+ /** Default error model */
49
+ export interface ErrorModelOutput {
50
+ /** Gets or sets the code. */
51
+ code: string;
52
+ /** Gets or sets the details. */
53
+ details?: Array<ErrorModelOutput>;
54
+ /** Gets or sets the messages. */
55
+ message: string;
56
+ /** Gets or sets the target. */
57
+ target?: string;
58
+ }
59
+ /** The workflow properties. It includes the triggers, actual flow and other properties of a workflow. */
60
+ export interface WorkflowOutput extends WorkflowMetadataOutput {
61
+ /** The action DAG(Directed Acyclic Graph), it defines steps to be executed in a workflow run and their order. */
62
+ actionDag: Record<string, unknown>;
63
+ }
64
+ /** Describes user ask to do operation(s) on Purview. */
65
+ export interface UserRequestResponseOutput {
66
+ /**
67
+ * The user request id.
68
+ *
69
+ * Value may contain a UUID
70
+ */
71
+ requestId: string;
72
+ /**
73
+ * The person who submitted the user request.
74
+ *
75
+ * Value may contain a UUID
76
+ */
77
+ requestor: string;
78
+ /** The list of operations user want to submit, each operation matches one Purview API call and will do the operation directly. */
79
+ operations: Array<UserRequestResponseOperationsItemOutput>;
80
+ /** The comment when submit a user request. */
81
+ comment?: string;
82
+ /** The status. */
83
+ status: "NotStarted" | "InProgress" | "Failed" | "Completed" | "Canceling" | "CancellationFailed" | "Canceled";
84
+ }
85
+ /** The operation user wants to perform. */
86
+ export interface UserRequestResponseOperationsItemOutput {
87
+ /** The operation type. */
88
+ type: "CreateTerm" | "UpdateTerm" | "DeleteTerm" | "ImportTerms" | "UpdateAsset" | "GrantDataAccess";
89
+ /** The payload of each operation which user want to submit. */
90
+ payload: Record<string, unknown>;
91
+ workflowRunIds?: Array<string>;
92
+ }
93
+ export interface WorkflowRunListOutput {
94
+ /** The value of workflow run list. */
95
+ value: Array<WorkflowRunMetadataOutput>;
96
+ /** The URL to get the next set of results. */
97
+ nextLink?: string;
98
+ }
99
+ /** The execution of a workflow. It includes status of the entire run and other properties of a run. */
100
+ export interface WorkflowRunMetadataOutput {
101
+ /**
102
+ * The workflow run id.
103
+ *
104
+ * Value may contain a UUID
105
+ */
106
+ id: string;
107
+ /**
108
+ * The workflow id.
109
+ *
110
+ * Value may contain a UUID
111
+ */
112
+ workflowId: string;
113
+ /** Workflow run start time. */
114
+ startTime: string;
115
+ /**
116
+ * The person who submitted the user request.
117
+ *
118
+ * Value may contain a UUID
119
+ */
120
+ requestor: string;
121
+ /**
122
+ * The user request id.
123
+ *
124
+ * Value may contain a UUID
125
+ */
126
+ userRequestId?: string;
127
+ /** The input of a workflow run. Align with operation in user request. */
128
+ runPayload: WorkflowRunPayloadOutput;
129
+ /** The status. */
130
+ status: "NotStarted" | "InProgress" | "Failed" | "Completed" | "Canceling" | "CancellationFailed" | "Canceled";
131
+ /** The time of workflow run completed. */
132
+ endTime?: string;
133
+ /** The time of workflow run be canceled. */
134
+ cancelTime?: string;
135
+ /** The comment when cancel a workflow run. */
136
+ cancelComment?: string;
137
+ }
138
+ /** The input of a workflow run. Align with operation in user request. */
139
+ export interface WorkflowRunPayloadOutput {
140
+ /** The workflow run payload type. */
141
+ type: "CreateTerm" | "UpdateTerm" | "DeleteTerm" | "ImportTerms" | "UpdateAsset" | "GrantDataAccess";
142
+ /** The target value which need involve workflow to update. */
143
+ targetValue: string;
144
+ }
145
+ /** The execution of a workflow. It includes workflow action DAG at run time (action DAG snapshot), run payload, status of the entire run and other properties of a run. */
146
+ export interface WorkflowRunOutput {
147
+ /**
148
+ * The workflow run id.
149
+ *
150
+ * Value may contain a UUID
151
+ */
152
+ id?: string;
153
+ /**
154
+ * The workflow id.
155
+ *
156
+ * Value may contain a UUID
157
+ */
158
+ workflowId?: string;
159
+ /** Workflow run start time. */
160
+ startTime?: string;
161
+ /**
162
+ * The person who submitted the user request.
163
+ *
164
+ * Value may contain a UUID
165
+ */
166
+ requestor?: string;
167
+ /**
168
+ * The user request id.
169
+ *
170
+ * Value may contain a UUID
171
+ */
172
+ userRequestId?: string;
173
+ /** The input of a workflow run. Align with operation in user request. */
174
+ runPayload?: WorkflowRunRunPayloadOutput;
175
+ /** The status. */
176
+ status?: "NotStarted" | "InProgress" | "Failed" | "Completed" | "Canceling" | "CancellationFailed" | "Canceled";
177
+ /** The time of workflow run completed. */
178
+ endTime?: string;
179
+ /** The time of workflow run be canceled. */
180
+ cancelTime?: string;
181
+ /** The comment when cancel a workflow run. */
182
+ cancelComment?: string;
183
+ /** The action DAG(Directed Acyclic Graph), it defines actual flow. */
184
+ actionDag: Record<string, unknown>;
185
+ /** It refers to the "detail" property of a workflow run object, which contains run context and runtime information of actions. */
186
+ detail: WorkflowRunDetailOutput;
187
+ }
188
+ /** The input of a workflow run. Align with operation in user request. */
189
+ export interface WorkflowRunRunPayloadOutput {
190
+ /** The workflow run payload type. */
191
+ type: "CreateTerm" | "UpdateTerm" | "DeleteTerm" | "ImportTerms" | "UpdateAsset" | "GrantDataAccess";
192
+ /** The target value which need involve workflow to update. */
193
+ targetValue: string;
194
+ /** The payload of each operation which user want to submit. */
195
+ payload: Record<string, unknown>;
196
+ }
197
+ /** It refers to the "detail" property of a workflow run object, which contains run context and runtime information of actions. */
198
+ export interface WorkflowRunDetailOutput {
199
+ /** Built-in variables starts with @runInput. Its properties are determined by trigger type at workflow run time. */
200
+ runInput: Record<string, unknown>;
201
+ /** Any object */
202
+ actions: Record<string, unknown>;
203
+ }
204
+ export interface TasksListOutput {
205
+ /** The value of workflow tasks list. */
206
+ value: Array<WorkflowTaskOutput>;
207
+ /** The URL to get the next set of results. */
208
+ nextLink?: string;
209
+ }
210
+ /** An actionable item assigned to assignees. It is created when approval or task action starts to execute. Approval is one kind of task. */
211
+ export interface WorkflowTaskOutputParent {
212
+ /**
213
+ * The workflow task id.
214
+ *
215
+ * Value may contain a UUID
216
+ */
217
+ id: string;
218
+ /** The workflow task title. */
219
+ title?: string;
220
+ /**
221
+ * The workflow run id.
222
+ *
223
+ * Value may contain a UUID
224
+ */
225
+ workflowRunId: string;
226
+ /**
227
+ * The workflow id.
228
+ *
229
+ * Value may contain a UUID
230
+ */
231
+ workflowId: string;
232
+ /**
233
+ * The person who submitted the user request.
234
+ *
235
+ * Value may contain a UUID
236
+ */
237
+ requestor: string;
238
+ /** The created time. */
239
+ createdTime: string;
240
+ /** The last update time. */
241
+ lastUpdateTime: string;
242
+ /** Info and material that helps assignees to take action. */
243
+ payload: TaskPayloadOutput;
244
+ /** Info of task reminder. */
245
+ reminderInfo?: WorkflowTaskReminderInfoOutput;
246
+ /** Info of task expiry. */
247
+ expiryInfo?: WorkflowTaskExpiryInfoOutput;
248
+ type: "WorkflowTask" | "Approval" | "SimpleTask";
249
+ }
250
+ /** Info and material that helps assignees to take action. */
251
+ export interface TaskPayloadOutput {
252
+ /** The task payload type. */
253
+ type: "CreateTerm" | "UpdateTerm" | "DeleteTerm" | "ImportTerms" | "UpdateAsset" | "GrantDataAccess";
254
+ /** The target value of entity which user want to involve workflow to update. */
255
+ targetValue: string;
256
+ /** The payload of the task. */
257
+ payload?: Record<string, unknown>;
258
+ }
259
+ /** Info of task reminder. */
260
+ export interface WorkflowTaskReminderInfoOutput {
261
+ /** The last update time. */
262
+ lastRemindTime?: string;
263
+ /** The next remind time. */
264
+ nextRemindTime: string;
265
+ /** The reminder settings. */
266
+ reminderSettings: Record<string, unknown>;
267
+ }
268
+ /** Info of task expiry. */
269
+ export interface WorkflowTaskExpiryInfoOutput {
270
+ /** The last expiry notification time. */
271
+ lastExpiryNotificationTime?: string;
272
+ /** The next expiry notification time. */
273
+ nextExpiryNotificationTime: string;
274
+ /** The expiry time. */
275
+ expiryTime: string;
276
+ expirySettings: WorkflowTaskExpiryInfoExpirySettingsOutput;
277
+ }
278
+ export interface WorkflowTaskExpiryInfoExpirySettingsOutput {
279
+ /** The time of expiry. */
280
+ expireAfter: Record<string, unknown>;
281
+ notifyOnExpiration?: Array<string>;
282
+ }
283
+ /** The workflow approval task properties. */
284
+ export interface ApprovalOutput extends WorkflowTaskOutputParent {
285
+ /** The approval task details */
286
+ approvalDetail?: ApprovalDetailOutput;
287
+ type: "Approval";
288
+ }
289
+ /** The approval task details */
290
+ export interface ApprovalDetailOutput {
291
+ /** The approval type of an approval task. */
292
+ approvalType: "PendingOnAny" | "PendingOnAll";
293
+ /** The status of an approval task. */
294
+ status: "Pending" | "Approved" | "Rejected" | "Canceled";
295
+ /** The list of approvers with reply. */
296
+ approvers: Record<string, ApproverResponseOutput>;
297
+ }
298
+ /** The response of approvers for a workflow task. */
299
+ export interface ApproverResponseOutput {
300
+ /** The response for an approval task. */
301
+ reply: "Approved" | "Rejected" | "Pending";
302
+ /** The comment of approving or rejecting an approval request. */
303
+ comment?: string;
304
+ /** The reply time of approver to a workflow task. */
305
+ responseTime?: string;
306
+ }
307
+ /** The workflow simple task properties. */
308
+ export interface SimpleTaskOutput extends WorkflowTaskOutputParent {
309
+ /** Workflow simple task details. */
310
+ taskDetail?: SimpleTaskDetailOutput;
311
+ type: "SimpleTask";
312
+ }
313
+ /** Workflow simple task details. */
314
+ export interface SimpleTaskDetailOutput {
315
+ /** The simple task body. */
316
+ taskBody: string;
317
+ /** The users or groups were assigned the simple task. */
318
+ assignedTo: Array<string>;
319
+ /** Simple task status. */
320
+ status: "NotStarted" | "InProgress" | "Completed" | "Canceled";
321
+ changeHistory: Array<Record<string, unknown>>;
322
+ }
323
+ /** An actionable item assigned to assignees. It is created when approval or task action starts to execute. Approval is one kind of task. */
324
+ export type WorkflowTaskOutput = ApprovalOutput | SimpleTaskOutput;
325
+ //# sourceMappingURL=outputModels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outputModels.d.ts","sourceRoot":"","sources":["../../src/outputModels.ts"],"names":[],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,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,CAAC;IACzD,wCAAwC;IACxC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;CACnD;AAED,qDAAqD;AACrD,MAAM,WAAW,sBAAsB;IACrC,yCAAyC;IACzC,KAAK,EAAE,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;IAC3C,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,2CAA2C;AAC3C,MAAM,WAAW,gBAAiB,SAAQ,wBAAwB;IAChE,oCAAoC;IACpC,UAAU,CAAC,EAAE,sBAAsB,CAAC;IACpC,IAAI,EAAE,YAAY,CAAC;CACpB;AAED,oCAAoC;AACpC,MAAM,WAAW,sBAAsB;IACrC,4BAA4B;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,yDAAyD;IACzD,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1B,0BAA0B;IAC1B,MAAM,EAAE,YAAY,GAAG,YAAY,GAAG,WAAW,GAAG,UAAU,CAAC;IAC/D,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAC/C;AAED,4IAA4I;AAC5I,MAAM,MAAM,kBAAkB,GAAG,cAAc,GAAG,gBAAgB,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ //# sourceMappingURL=outputModels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outputModels.js","sourceRoot":"","sources":["../../src/outputModels.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/** The workflow list. */\nexport interface WorkflowMetadataListOutput {\n /** The value of workflow list. */\n value: Array<WorkflowMetadataOutput>;\n /** The URL to get the next set of results. */\n nextLink?: string;\n}\n\n/** The workflow metadata, action DAGs are not included. */\nexport interface WorkflowMetadataOutput {\n /**\n * The id of workflow.\n *\n * Value may contain a UUID\n */\n id: string;\n /** It describes under what condition a workflow will run. */\n triggers: Array<TriggerOutput>;\n /** The created time of workflow. */\n createdTime?: string;\n /** The person who created the workflow. */\n createdBy?: string;\n /** The last update time. */\n lastUpdateTime?: string;\n /** The person who updated the workflow. */\n updatedBy?: string;\n /** The name of a workflow. */\n name: string;\n /** Whether the workflow is enabled or not. */\n isEnabled: boolean;\n /** Description of a workflow. */\n description: string;\n}\n\n/** Describes under what condition a workflow will run. */\nexport interface TriggerOutput {\n type:\n | \"when_term_creation_is_requested\"\n | \"when_term_deletion_is_requested\"\n | \"when_term_update_is_requested\"\n | \"when_terms_import_is_requested\"\n | \"when_data_access_grant_is_requested\"\n | \"when_asset_update_is_requested\";\n /** Glossary term hierarchy path. */\n underGlossaryHierarchy?: string;\n /** The collection name. */\n underCollection?: string;\n /** The glossary guid. */\n underGlossary?: string;\n}\n\n/** Default error response model */\nexport interface ErrorResponseOutput {\n /** Default error model */\n error: ErrorModelOutput;\n}\n\n/** Default error model */\nexport interface ErrorModelOutput {\n /** Gets or sets the code. */\n code: string;\n /** Gets or sets the details. */\n details?: Array<ErrorModelOutput>;\n /** Gets or sets the messages. */\n message: string;\n /** Gets or sets the target. */\n target?: string;\n}\n\n/** The workflow properties. It includes the triggers, actual flow and other properties of a workflow. */\nexport interface WorkflowOutput extends WorkflowMetadataOutput {\n /** The action DAG(Directed Acyclic Graph), it defines steps to be executed in a workflow run and their order. */\n actionDag: Record<string, unknown>;\n}\n\n/** Describes user ask to do operation(s) on Purview. */\nexport interface UserRequestResponseOutput {\n /**\n * The user request id.\n *\n * Value may contain a UUID\n */\n requestId: string;\n /**\n * The person who submitted the user request.\n *\n * Value may contain a UUID\n */\n requestor: string;\n /** The list of operations user want to submit, each operation matches one Purview API call and will do the operation directly. */\n operations: Array<UserRequestResponseOperationsItemOutput>;\n /** The comment when submit a user request. */\n comment?: string;\n /** The status. */\n status:\n | \"NotStarted\"\n | \"InProgress\"\n | \"Failed\"\n | \"Completed\"\n | \"Canceling\"\n | \"CancellationFailed\"\n | \"Canceled\";\n}\n\n/** The operation user wants to perform. */\nexport interface UserRequestResponseOperationsItemOutput {\n /** The operation type. */\n type:\n | \"CreateTerm\"\n | \"UpdateTerm\"\n | \"DeleteTerm\"\n | \"ImportTerms\"\n | \"UpdateAsset\"\n | \"GrantDataAccess\";\n /** The payload of each operation which user want to submit. */\n payload: Record<string, unknown>;\n workflowRunIds?: Array<string>;\n}\n\nexport interface WorkflowRunListOutput {\n /** The value of workflow run list. */\n value: Array<WorkflowRunMetadataOutput>;\n /** The URL to get the next set of results. */\n nextLink?: string;\n}\n\n/** The execution of a workflow. It includes status of the entire run and other properties of a run. */\nexport interface WorkflowRunMetadataOutput {\n /**\n * The workflow run id.\n *\n * Value may contain a UUID\n */\n id: string;\n /**\n * The workflow id.\n *\n * Value may contain a UUID\n */\n workflowId: string;\n /** Workflow run start time. */\n startTime: string;\n /**\n * The person who submitted the user request.\n *\n * Value may contain a UUID\n */\n requestor: string;\n /**\n * The user request id.\n *\n * Value may contain a UUID\n */\n userRequestId?: string;\n /** The input of a workflow run. Align with operation in user request. */\n runPayload: WorkflowRunPayloadOutput;\n /** The status. */\n status:\n | \"NotStarted\"\n | \"InProgress\"\n | \"Failed\"\n | \"Completed\"\n | \"Canceling\"\n | \"CancellationFailed\"\n | \"Canceled\";\n /** The time of workflow run completed. */\n endTime?: string;\n /** The time of workflow run be canceled. */\n cancelTime?: string;\n /** The comment when cancel a workflow run. */\n cancelComment?: string;\n}\n\n/** The input of a workflow run. Align with operation in user request. */\nexport interface WorkflowRunPayloadOutput {\n /** The workflow run payload type. */\n type:\n | \"CreateTerm\"\n | \"UpdateTerm\"\n | \"DeleteTerm\"\n | \"ImportTerms\"\n | \"UpdateAsset\"\n | \"GrantDataAccess\";\n /** The target value which need involve workflow to update. */\n targetValue: string;\n}\n\n/** The execution of a workflow. It includes workflow action DAG at run time (action DAG snapshot), run payload, status of the entire run and other properties of a run. */\nexport interface WorkflowRunOutput {\n /**\n * The workflow run id.\n *\n * Value may contain a UUID\n */\n id?: string;\n /**\n * The workflow id.\n *\n * Value may contain a UUID\n */\n workflowId?: string;\n /** Workflow run start time. */\n startTime?: string;\n /**\n * The person who submitted the user request.\n *\n * Value may contain a UUID\n */\n requestor?: string;\n /**\n * The user request id.\n *\n * Value may contain a UUID\n */\n userRequestId?: string;\n /** The input of a workflow run. Align with operation in user request. */\n runPayload?: WorkflowRunRunPayloadOutput;\n /** The status. */\n status?:\n | \"NotStarted\"\n | \"InProgress\"\n | \"Failed\"\n | \"Completed\"\n | \"Canceling\"\n | \"CancellationFailed\"\n | \"Canceled\";\n /** The time of workflow run completed. */\n endTime?: string;\n /** The time of workflow run be canceled. */\n cancelTime?: string;\n /** The comment when cancel a workflow run. */\n cancelComment?: string;\n /** The action DAG(Directed Acyclic Graph), it defines actual flow. */\n actionDag: Record<string, unknown>;\n /** It refers to the \"detail\" property of a workflow run object, which contains run context and runtime information of actions. */\n detail: WorkflowRunDetailOutput;\n}\n\n/** The input of a workflow run. Align with operation in user request. */\nexport interface WorkflowRunRunPayloadOutput {\n /** The workflow run payload type. */\n type:\n | \"CreateTerm\"\n | \"UpdateTerm\"\n | \"DeleteTerm\"\n | \"ImportTerms\"\n | \"UpdateAsset\"\n | \"GrantDataAccess\";\n /** The target value which need involve workflow to update. */\n targetValue: string;\n /** The payload of each operation which user want to submit. */\n payload: Record<string, unknown>;\n}\n\n/** It refers to the \"detail\" property of a workflow run object, which contains run context and runtime information of actions. */\nexport interface WorkflowRunDetailOutput {\n /** Built-in variables starts with @runInput. Its properties are determined by trigger type at workflow run time. */\n runInput: Record<string, unknown>;\n /** Any object */\n actions: Record<string, unknown>;\n}\n\nexport interface TasksListOutput {\n /** The value of workflow tasks list. */\n value: Array<WorkflowTaskOutput>;\n /** The URL to get the next set of results. */\n nextLink?: string;\n}\n\n/** An actionable item assigned to assignees. It is created when approval or task action starts to execute. Approval is one kind of task. */\nexport interface WorkflowTaskOutputParent {\n /**\n * The workflow task id.\n *\n * Value may contain a UUID\n */\n id: string;\n /** The workflow task title. */\n title?: string;\n /**\n * The workflow run id.\n *\n * Value may contain a UUID\n */\n workflowRunId: string;\n /**\n * The workflow id.\n *\n * Value may contain a UUID\n */\n workflowId: string;\n /**\n * The person who submitted the user request.\n *\n * Value may contain a UUID\n */\n requestor: string;\n /** The created time. */\n createdTime: string;\n /** The last update time. */\n lastUpdateTime: string;\n /** Info and material that helps assignees to take action. */\n payload: TaskPayloadOutput;\n /** Info of task reminder. */\n reminderInfo?: WorkflowTaskReminderInfoOutput;\n /** Info of task expiry. */\n expiryInfo?: WorkflowTaskExpiryInfoOutput;\n type: \"WorkflowTask\" | \"Approval\" | \"SimpleTask\";\n}\n\n/** Info and material that helps assignees to take action. */\nexport interface TaskPayloadOutput {\n /** The task payload type. */\n type:\n | \"CreateTerm\"\n | \"UpdateTerm\"\n | \"DeleteTerm\"\n | \"ImportTerms\"\n | \"UpdateAsset\"\n | \"GrantDataAccess\";\n /** The target value of entity which user want to involve workflow to update. */\n targetValue: string;\n /** The payload of the task. */\n payload?: Record<string, unknown>;\n}\n\n/** Info of task reminder. */\nexport interface WorkflowTaskReminderInfoOutput {\n /** The last update time. */\n lastRemindTime?: string;\n /** The next remind time. */\n nextRemindTime: string;\n /** The reminder settings. */\n reminderSettings: Record<string, unknown>;\n}\n\n/** Info of task expiry. */\nexport interface WorkflowTaskExpiryInfoOutput {\n /** The last expiry notification time. */\n lastExpiryNotificationTime?: string;\n /** The next expiry notification time. */\n nextExpiryNotificationTime: string;\n /** The expiry time. */\n expiryTime: string;\n expirySettings: WorkflowTaskExpiryInfoExpirySettingsOutput;\n}\n\nexport interface WorkflowTaskExpiryInfoExpirySettingsOutput {\n /** The time of expiry. */\n expireAfter: Record<string, unknown>;\n notifyOnExpiration?: Array<string>;\n}\n\n/** The workflow approval task properties. */\nexport interface ApprovalOutput extends WorkflowTaskOutputParent {\n /** The approval task details */\n approvalDetail?: ApprovalDetailOutput;\n type: \"Approval\";\n}\n\n/** The approval task details */\nexport interface ApprovalDetailOutput {\n /** The approval type of an approval task. */\n approvalType: \"PendingOnAny\" | \"PendingOnAll\";\n /** The status of an approval task. */\n status: \"Pending\" | \"Approved\" | \"Rejected\" | \"Canceled\";\n /** The list of approvers with reply. */\n approvers: Record<string, ApproverResponseOutput>;\n}\n\n/** The response of approvers for a workflow task. */\nexport interface ApproverResponseOutput {\n /** The response for an approval task. */\n reply: \"Approved\" | \"Rejected\" | \"Pending\";\n /** The comment of approving or rejecting an approval request. */\n comment?: string;\n /** The reply time of approver to a workflow task. */\n responseTime?: string;\n}\n\n/** The workflow simple task properties. */\nexport interface SimpleTaskOutput extends WorkflowTaskOutputParent {\n /** Workflow simple task details. */\n taskDetail?: SimpleTaskDetailOutput;\n type: \"SimpleTask\";\n}\n\n/** Workflow simple task details. */\nexport interface SimpleTaskDetailOutput {\n /** The simple task body. */\n taskBody: string;\n /** The users or groups were assigned the simple task. */\n assignedTo: Array<string>;\n /** Simple task status. */\n status: \"NotStarted\" | \"InProgress\" | \"Completed\" | \"Canceled\";\n changeHistory: Array<Record<string, unknown>>;\n}\n\n/** An actionable item assigned to assignees. It is created when approval or task action starts to execute. Approval is one kind of task. */\nexport type WorkflowTaskOutput = ApprovalOutput | SimpleTaskOutput;\n"]}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }