@microsoft/managed-apps-codegen 0.2.1

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 (119) hide show
  1. package/LICENSE +153 -0
  2. package/README.md +37 -0
  3. package/dist/CodegenProject.d.ts +26 -0
  4. package/dist/CodegenProject.d.ts.map +1 -0
  5. package/dist/CodegenProject.js +140 -0
  6. package/dist/CodegenProject.js.map +1 -0
  7. package/dist/Connector/generateConnectorModel.d.ts +13 -0
  8. package/dist/Connector/generateConnectorModel.d.ts.map +1 -0
  9. package/dist/Connector/generateConnectorModel.js +163 -0
  10. package/dist/Connector/generateConnectorModel.js.map +1 -0
  11. package/dist/Connector/generateConnectorService.d.ts +15 -0
  12. package/dist/Connector/generateConnectorService.d.ts.map +1 -0
  13. package/dist/Connector/generateConnectorService.js +331 -0
  14. package/dist/Connector/generateConnectorService.js.map +1 -0
  15. package/dist/Connector/index.d.ts +6 -0
  16. package/dist/Connector/index.d.ts.map +1 -0
  17. package/dist/Connector/index.js +6 -0
  18. package/dist/Connector/index.js.map +1 -0
  19. package/dist/Dataverse/generateDataverseModel.d.ts +18 -0
  20. package/dist/Dataverse/generateDataverseModel.d.ts.map +1 -0
  21. package/dist/Dataverse/generateDataverseModel.js +226 -0
  22. package/dist/Dataverse/generateDataverseModel.js.map +1 -0
  23. package/dist/Dataverse/generateDataverseService.d.ts +17 -0
  24. package/dist/Dataverse/generateDataverseService.d.ts.map +1 -0
  25. package/dist/Dataverse/generateDataverseService.js +323 -0
  26. package/dist/Dataverse/generateDataverseService.js.map +1 -0
  27. package/dist/Dataverse/index.d.ts +6 -0
  28. package/dist/Dataverse/index.d.ts.map +1 -0
  29. package/dist/Dataverse/index.js +6 -0
  30. package/dist/Dataverse/index.js.map +1 -0
  31. package/dist/SharePointTabular/generateSharepointTabularModel.d.ts +16 -0
  32. package/dist/SharePointTabular/generateSharepointTabularModel.d.ts.map +1 -0
  33. package/dist/SharePointTabular/generateSharepointTabularModel.js +130 -0
  34. package/dist/SharePointTabular/generateSharepointTabularModel.js.map +1 -0
  35. package/dist/SharePointTabular/index.d.ts +5 -0
  36. package/dist/SharePointTabular/index.d.ts.map +1 -0
  37. package/dist/SharePointTabular/index.js +5 -0
  38. package/dist/SharePointTabular/index.js.map +1 -0
  39. package/dist/SqlStoredProc/generateSqlStoredProcModel.d.ts +16 -0
  40. package/dist/SqlStoredProc/generateSqlStoredProcModel.d.ts.map +1 -0
  41. package/dist/SqlStoredProc/generateSqlStoredProcModel.js +38 -0
  42. package/dist/SqlStoredProc/generateSqlStoredProcModel.js.map +1 -0
  43. package/dist/SqlStoredProc/generateSqlStoredProcService.d.ts +16 -0
  44. package/dist/SqlStoredProc/generateSqlStoredProcService.d.ts.map +1 -0
  45. package/dist/SqlStoredProc/generateSqlStoredProcService.js +89 -0
  46. package/dist/SqlStoredProc/generateSqlStoredProcService.js.map +1 -0
  47. package/dist/SqlStoredProc/index.d.ts +6 -0
  48. package/dist/SqlStoredProc/index.d.ts.map +1 -0
  49. package/dist/SqlStoredProc/index.js +6 -0
  50. package/dist/SqlStoredProc/index.js.map +1 -0
  51. package/dist/Tabular/generateCommonModels.d.ts +11 -0
  52. package/dist/Tabular/generateCommonModels.d.ts.map +1 -0
  53. package/dist/Tabular/generateCommonModels.js +27 -0
  54. package/dist/Tabular/generateCommonModels.js.map +1 -0
  55. package/dist/Tabular/generateTabularModel.d.ts +15 -0
  56. package/dist/Tabular/generateTabularModel.d.ts.map +1 -0
  57. package/dist/Tabular/generateTabularModel.js +31 -0
  58. package/dist/Tabular/generateTabularModel.js.map +1 -0
  59. package/dist/Tabular/generateTabularService.d.ts +19 -0
  60. package/dist/Tabular/generateTabularService.d.ts.map +1 -0
  61. package/dist/Tabular/generateTabularService.js +165 -0
  62. package/dist/Tabular/generateTabularService.js.map +1 -0
  63. package/dist/Tabular/index.d.ts +7 -0
  64. package/dist/Tabular/index.d.ts.map +1 -0
  65. package/dist/Tabular/index.js +7 -0
  66. package/dist/Tabular/index.js.map +1 -0
  67. package/dist/defaultPrettierConfig.d.ts +6 -0
  68. package/dist/defaultPrettierConfig.d.ts.map +1 -0
  69. package/dist/defaultPrettierConfig.js +10 -0
  70. package/dist/defaultPrettierConfig.js.map +1 -0
  71. package/dist/index.d.ts +13 -0
  72. package/dist/index.d.ts.map +1 -0
  73. package/dist/index.js +11 -0
  74. package/dist/index.js.map +1 -0
  75. package/dist/shared/constants.d.ts +9 -0
  76. package/dist/shared/constants.d.ts.map +1 -0
  77. package/dist/shared/constants.js +9 -0
  78. package/dist/shared/constants.js.map +1 -0
  79. package/dist/shared/dataverseUtils.d.ts +61 -0
  80. package/dist/shared/dataverseUtils.d.ts.map +1 -0
  81. package/dist/shared/dataverseUtils.js +138 -0
  82. package/dist/shared/dataverseUtils.js.map +1 -0
  83. package/dist/shared/flowUtils.d.ts +11 -0
  84. package/dist/shared/flowUtils.d.ts.map +1 -0
  85. package/dist/shared/flowUtils.js +16 -0
  86. package/dist/shared/flowUtils.js.map +1 -0
  87. package/dist/shared/nameUtils.d.ts +33 -0
  88. package/dist/shared/nameUtils.d.ts.map +1 -0
  89. package/dist/shared/nameUtils.js +180 -0
  90. package/dist/shared/nameUtils.js.map +1 -0
  91. package/dist/shared/project.d.ts +22 -0
  92. package/dist/shared/project.d.ts.map +1 -0
  93. package/dist/shared/project.js +5 -0
  94. package/dist/shared/project.js.map +1 -0
  95. package/dist/shared/schemaUtils.d.ts +32 -0
  96. package/dist/shared/schemaUtils.d.ts.map +1 -0
  97. package/dist/shared/schemaUtils.js +110 -0
  98. package/dist/shared/schemaUtils.js.map +1 -0
  99. package/dist/shared/sqlStoredProcUtils.d.ts +11 -0
  100. package/dist/shared/sqlStoredProcUtils.d.ts.map +1 -0
  101. package/dist/shared/sqlStoredProcUtils.js +19 -0
  102. package/dist/shared/sqlStoredProcUtils.js.map +1 -0
  103. package/dist/shared/swaggerUtils.d.ts +12 -0
  104. package/dist/shared/swaggerUtils.d.ts.map +1 -0
  105. package/dist/shared/swaggerUtils.js +12 -0
  106. package/dist/shared/swaggerUtils.js.map +1 -0
  107. package/dist/shared/typeUtils.d.ts +22 -0
  108. package/dist/shared/typeUtils.d.ts.map +1 -0
  109. package/dist/shared/typeUtils.js +94 -0
  110. package/dist/shared/typeUtils.js.map +1 -0
  111. package/dist/shared/types.d.ts +24 -0
  112. package/dist/shared/types.d.ts.map +1 -0
  113. package/dist/shared/types.js +5 -0
  114. package/dist/shared/types.js.map +1 -0
  115. package/dist/types.d.ts +5 -0
  116. package/dist/types.d.ts.map +1 -0
  117. package/dist/types.js +5 -0
  118. package/dist/types.js.map +1 -0
  119. package/package.json +61 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataverseUtils.d.ts","sourceRoot":"","sources":["../../src/shared/dataverseUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG3C,2EAA2E;AAC3E,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAOxD;AAED,+GAA+G;AAC/G,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAQtE;AAED,wFAAwF;AACxF,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAExE;AAED,+FAA+F;AAC/F,wBAAgB,yBAAyB,CAAC,cAAc,EAAE,UAAU,GAAG,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAQ7F;AAED,2HAA2H;AAC3H,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAClC,OAAO,CAOT;AAED,kHAAkH;AAClH,wBAAgB,6BAA6B,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAExE;AAED,8EAA8E;AAC9E,wBAAgB,+BAA+B,CAAC,kBAAkB,EAAE,MAAM,GAAG,MAAM,CAElF;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAKzE;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAoBzE;AAED;;;GAGG;AACH,wBAAgB,sCAAsC,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAErF;AAED;;;;;GAKG;AACH,wBAAgB,qCAAqC,CAAC,cAAc,EAAE,UAAU,GAAG,MAAM,EAAE,CAa1F;AAED,mGAAmG;AACnG,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAK/D;AAED,KAAK,aAAa,GAAG;IACnB,IAAI,EAAE,eAAe,GAAG,QAAQ,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,UAAU,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AACF,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,UAAU,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wIAAwI;AACxI,wBAAiB,0BAA0B,CACzC,cAAc,EAAE,UAAU,EAC1B,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,GACrC,SAAS,CAAC,aAAa,GAAG,YAAY,CAAC,CAezC"}
@@ -0,0 +1,138 @@
1
+ /*!
2
+ * Copyright (C) Microsoft Corporation. All rights reserved.
3
+ */
4
+ import { hasEnumValues, isJsonObject } from './schemaUtils.js';
5
+ /** Returns true if the schema root represents a Dataverse entity table. */
6
+ export function isDataverseEntity(root) {
7
+ return (isJsonObject(root) &&
8
+ isJsonObject(root.schema) &&
9
+ isJsonObject(root.schema.items) &&
10
+ root.schema.items['x-ms-dataverse-entity'] === true);
11
+ }
12
+ /** Returns the Dataverse entity set name for a schema (used as the OData API path), or null if not defined. */
13
+ export function getDataverseEntitySetName(root) {
14
+ if (isJsonObject(root) && isJsonObject(root.schema) && isJsonObject(root.schema.items)) {
15
+ const entitySetName = root.schema.items['x-ms-dataverse-entityset'];
16
+ if (typeof entitySetName === 'string' && entitySetName.trim()) {
17
+ return entitySetName;
18
+ }
19
+ }
20
+ return null;
21
+ }
22
+ /** Returns true if the property is a Dataverse lookup relationship to another table. */
23
+ export function isDataverseLookupProperty(propValue) {
24
+ return propValue['x-ms-dataverse-type'] === 'LookupType';
25
+ }
26
+ /** Collects all lookup relationship columns from a properties node, keyed by property name. */
27
+ export function getDataverseLookupColumns(propertiesNode) {
28
+ const lookupColumns = new Map();
29
+ for (const [propName, propValue] of Object.entries(propertiesNode)) {
30
+ if (isJsonObject(propValue) && isDataverseLookupProperty(propValue)) {
31
+ lookupColumns.set(propName, propValue);
32
+ }
33
+ }
34
+ return lookupColumns;
35
+ }
36
+ /** Returns true if the property is an auto-generated name field for a lookup column (e.g. `owneridname` for `ownerid`). */
37
+ export function isLookupRelatedProperty(propName, lookupColumns) {
38
+ for (const lookupPropName of lookupColumns.keys()) {
39
+ if (propName === `${lookupPropName}name`) {
40
+ return true;
41
+ }
42
+ }
43
+ return false;
44
+ }
45
+ /** Returns the write-form property name for a lookup column, used when creating or updating Dataverse records. */
46
+ export function generateODataBindPropertyName(schemaName) {
47
+ return `${schemaName}@odata.bind`;
48
+ }
49
+ /** Returns the read-form property name for a lookup's resolved GUID value. */
50
+ export function generateLookupValuePropertyName(lookupPropertyName) {
51
+ return `_${lookupPropertyName}_value`;
52
+ }
53
+ /**
54
+ * Returns true if the property is a Dataverse boolean (yes/no) field.
55
+ * These fields have enum/x-ms-enum-values in the schema but must be typed as `boolean`,
56
+ * not as a numeric optionset, because the Dataverse Web API expects true/false.
57
+ */
58
+ export function isDataverseBooleanProperty(propValue) {
59
+ return (propValue['x-ms-dataverse-type'] === 'BooleanType' ||
60
+ propValue['x-ms-optionSetType'] === 'Boolean');
61
+ }
62
+ /**
63
+ * Returns true if the property is a Dataverse numeric field (integer, decimal, double, money, bigint).
64
+ * These fields have `"type": "string"` in the schema but must be typed as `number` because
65
+ * the Dataverse Web API sends and receives them as JSON numbers.
66
+ */
67
+ export function isDataverseNumericProperty(propValue) {
68
+ const dvType = typeof propValue['x-ms-dataverse-type'] === 'string'
69
+ ? propValue['x-ms-dataverse-type'].toLowerCase()
70
+ : undefined;
71
+ switch (dvType) {
72
+ case 'integer':
73
+ case 'integertype':
74
+ case 'bigint':
75
+ case 'biginttype':
76
+ case 'decimal':
77
+ case 'decimaltype':
78
+ case 'double':
79
+ case 'doubletype':
80
+ case 'money':
81
+ case 'moneytype':
82
+ return true;
83
+ default:
84
+ return false;
85
+ }
86
+ }
87
+ /**
88
+ * Returns true if the property is a Dataverse multi-select picklist (multi-choice) field.
89
+ * These fields allow multiple selections and should be typed as an array of the enum type.
90
+ */
91
+ export function isDataverseMultiSelectPicklistProperty(propValue) {
92
+ return propValue['x-ms-dataverse-type'] === 'MultiSelectPicklistType';
93
+ }
94
+ /**
95
+ * Returns the names of all MultiSelectPicklist (multi-choice) properties in a Dataverse entity
96
+ * properties node — i.e., properties that have optionset data AND are typed as MultiSelectPicklistType.
97
+ * These fields require serialization (array → comma-separated string) when writing to the Dataverse API
98
+ * and deserialization (comma-separated string → array) when reading back from it.
99
+ */
100
+ export function getDataverseMultiSelectPicklistFields(propertiesNode) {
101
+ const fields = [];
102
+ for (const [propName, propValue] of Object.entries(propertiesNode)) {
103
+ if (isJsonObject(propValue) &&
104
+ isDataverseMultiSelectPicklistProperty(propValue) &&
105
+ Array.isArray(propValue.enum) &&
106
+ propValue.enum.length > 0) {
107
+ fields.push(propName);
108
+ }
109
+ }
110
+ return fields;
111
+ }
112
+ /** Returns true if the property represents an optionset (choice) column with enumerable values. */
113
+ export function hasOptionsetData(propValue) {
114
+ if (isDataverseBooleanProperty(propValue)) {
115
+ return false;
116
+ }
117
+ return hasEnumValues(propValue);
118
+ }
119
+ /** Yields each property in a Dataverse entity's properties node, tagged by its role and mutability, for use in interface generation. */
120
+ export function* iterateDataverseProperties(propertiesNode, lookupColumns) {
121
+ for (const [propName, propValue] of Object.entries(propertiesNode)) {
122
+ if (isJsonObject(propValue)) {
123
+ const readOnly = !!propValue['x-ms-read-only'];
124
+ if (lookupColumns.has(propName)) {
125
+ const schemaNameRaw = propValue['x-ms-schema-name'];
126
+ const schemaName = typeof schemaNameRaw === 'string' ? schemaNameRaw : propName;
127
+ yield { type: 'lookup', readOnly, propName, propValue, schemaName };
128
+ }
129
+ else if (isLookupRelatedProperty(propName, lookupColumns)) {
130
+ yield { type: 'lookupRelated', readOnly, propName, propValue };
131
+ }
132
+ else {
133
+ yield { type: 'normal', readOnly, propName, propValue };
134
+ }
135
+ }
136
+ }
137
+ }
138
+ //# sourceMappingURL=dataverseUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataverseUtils.js","sourceRoot":"","sources":["../../src/shared/dataverseUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE5D,2EAA2E;AAC3E,MAAM,UAAU,iBAAiB,CAAC,IAAa;IAC7C,OAAO,CACL,YAAY,CAAC,IAAI,CAAC;QAClB,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC;QACzB,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;QAC/B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,uBAAuB,CAAC,KAAK,IAAI,CACpD,CAAC;AACJ,CAAC;AAED,+GAA+G;AAC/G,MAAM,UAAU,yBAAyB,CAAC,IAAa;IACrD,IAAI,YAAY,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;QACvF,MAAM,aAAa,GAAG,IAAI,C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C;AACH,CAAC"}
@@ -0,0 +1,11 @@
1
+ /*!
2
+ * Copyright (C) Microsoft Corporation. All rights reserved.
3
+ */
4
+ /** The full API ID for Power Automate flows used in connection references and codegen dispatch. */
5
+ export declare const LOGIC_FLOWS_API_ID = "/providers/Microsoft.PowerApps/apis/shared_logicflows";
6
+ /**
7
+ * Returns true if the schema's `id` field identifies it as a Power Automate Logic Flow connector.
8
+ * Used during service generation to suppress internal parameters from the method signature.
9
+ */
10
+ export declare function isLogicFlowSchema(schema: unknown): boolean;
11
+ //# sourceMappingURL=flowUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flowUtils.d.ts","sourceRoot":"","sources":["../../src/shared/flowUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,mGAAmG;AACnG,eAAO,MAAM,kBAAkB,0DAA0D,CAAC;AAE1F;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAK1D"}
@@ -0,0 +1,16 @@
1
+ /*!
2
+ * Copyright (C) Microsoft Corporation. All rights reserved.
3
+ */
4
+ import { equalsIgnoreCase } from '@microsoft/managed-apps-common/utils';
5
+ import { isJsonObject } from './schemaUtils.js';
6
+ /** The full API ID for Power Automate flows used in connection references and codegen dispatch. */
7
+ export const LOGIC_FLOWS_API_ID = '/providers/Microsoft.PowerApps/apis/shared_logicflows';
8
+ /**
9
+ * Returns true if the schema's `id` field identifies it as a Power Automate Logic Flow connector.
10
+ * Used during service generation to suppress internal parameters from the method signature.
11
+ */
12
+ export function isLogicFlowSchema(schema) {
13
+ return (isJsonObject(schema) &&
14
+ equalsIgnoreCase(schema.id, LOGIC_FLOWS_API_ID));
15
+ }
16
+ //# sourceMappingURL=flowUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flowUtils.js","sourceRoot":"","sources":["../../src/shared/flowUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAExE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,mGAAmG;AACnG,MAAM,CAAC,MAAM,kBAAkB,GAAG,uDAAuD,CAAC;AAE1F;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAe;IAC/C,OAAO,CACL,YAAY,CAAC,MAAM,CAAC;QACpB,gBAAgB,CAAC,MAAM,CAAC,EAA+B,EAAE,kBAAkB,CAAC,CAC7E,CAAC;AACJ,CAAC"}
@@ -0,0 +1,33 @@
1
+ /*!
2
+ * Copyright (C) Microsoft Corporation. All rights reserved.
3
+ */
4
+ /** Converts an arbitrary string to a safe TypeScript identifier for use in generated code. */
5
+ export declare function convertToValidIdentifier(variableOrInterfaceName: string): string;
6
+ /** Sanitizes a raw string to a valid TypeScript identifier, for use when generating type and variable names. */
7
+ export declare function sanitizeName(name: string, removeWhitespace?: boolean, prefixReservedKeywords?: boolean): string;
8
+ /** Sanitizes a property name for use in a TypeScript interface, without prefixing reserved keywords. */
9
+ export declare function sanitizePropertyName(name: string): string;
10
+ /** Returns a unique sanitized name, appending a numeric suffix to avoid collisions with existing names. */
11
+ export declare function getSanitizedUniqueName(existingNames: string[], desiredName: string): string;
12
+ /** Normalizes a type name containing generic bracket syntax into a form suitable as a TypeScript identifier. */
13
+ export declare function normalizeGenericTypeName(typeName: string): string;
14
+ /**
15
+ * Extracts a clean identifier from a potentially schema-qualified resource name,
16
+ * for use in generated TypeScript identifiers.
17
+ *
18
+ * Handles bracket-qualified names used by SQL, Oracle, and other tabular connectors
19
+ * (e.g. `[dbo].[TableName]` or `[OWNER].[TABLE_NAME]`), as well as plain names.
20
+ * Always takes the last segment after the final dot, strips brackets, then sanitizes.
21
+ */
22
+ export declare function sanitizeTabularResourceName(name: string): string;
23
+ /** Returns the data source name accessor for the given model's service class. */
24
+ export declare function getServiceName(modelName: string): string;
25
+ /** Applies well-known casing fixes to property names before they are emitted into generated types. */
26
+ export declare function normalizePropertyName(propertyName: string): string;
27
+ /** Converts a kebab-case string to camelCase (e.g., `common-models` → `commonModels`). */
28
+ export declare function kebabToCamelCase(name: string): string;
29
+ /** Wraps a property name in quotes when it cannot appear as a bare TypeScript identifier. */
30
+ export declare function formatPropertyName(propName: string): string;
31
+ /** Returns true if a property name can be used without quotes in a TypeScript type definition. */
32
+ export declare function isValidPropertyName(propName: string): boolean;
33
+ //# sourceMappingURL=nameUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nameUtils.d.ts","sourceRoot":"","sources":["../../src/shared/nameUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAkEH,8FAA8F;AAC9F,wBAAgB,wBAAwB,CAAC,uBAAuB,EAAE,MAAM,UAOvE;AAED,gHAAgH;AAChH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,gBAAgB,GAAE,OAAc,EAChC,sBAAsB,GAAE,OAAc,GACrC,MAAM,CA8BR;AAED,wGAAwG;AACxG,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKzD;AAED,2GAA2G;AAC3G,wBAAgB,sBAAsB,CAAC,aAAa,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAsB3F;AAED,gHAAgH;AAChH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOhE;AAED,iFAAiF;AACjF,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAKxD;AAED,sGAAsG;AACtG,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAElE;AAED,0FAA0F;AAC1F,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,6FAA6F;AAC7F,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAM3D;AAED,kGAAkG;AAClG,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAI7D"}
@@ -0,0 +1,180 @@
1
+ /*!
2
+ * Copyright (C) Microsoft Corporation. All rights reserved.
3
+ */
4
+ // TypeScript reserved keywords and built-in types
5
+ const RESERVED_KEYWORDS = new Set([
6
+ 'break',
7
+ 'case',
8
+ 'catch',
9
+ 'class',
10
+ 'const',
11
+ 'continue',
12
+ 'debugger',
13
+ 'default',
14
+ 'delete',
15
+ 'do',
16
+ 'else',
17
+ 'enum',
18
+ 'export',
19
+ 'extends',
20
+ 'false',
21
+ 'finally',
22
+ 'for',
23
+ 'function',
24
+ 'if',
25
+ 'import',
26
+ 'in',
27
+ 'instanceof',
28
+ 'new',
29
+ 'null',
30
+ 'return',
31
+ 'super',
32
+ 'switch',
33
+ 'this',
34
+ 'throw',
35
+ 'true',
36
+ 'try',
37
+ 'typeof',
38
+ 'var',
39
+ 'void',
40
+ 'while',
41
+ 'with',
42
+ 'as',
43
+ 'implements',
44
+ 'interface',
45
+ 'let',
46
+ 'package',
47
+ 'private',
48
+ 'protected',
49
+ 'public',
50
+ 'static',
51
+ 'yield',
52
+ 'any',
53
+ 'boolean',
54
+ 'constructor',
55
+ 'declare',
56
+ 'get',
57
+ 'module',
58
+ 'require',
59
+ 'number',
60
+ 'set',
61
+ 'string',
62
+ 'symbol',
63
+ 'type',
64
+ 'from',
65
+ 'of',
66
+ ]);
67
+ /** Converts an arbitrary string to a safe TypeScript identifier for use in generated code. */
68
+ export function convertToValidIdentifier(variableOrInterfaceName) {
69
+ if (variableOrInterfaceName.indexOf('@odata') > -1) {
70
+ // this an odata property, we can skip processing it further and return immediately, but just return a quoted version of it
71
+ return `"${variableOrInterfaceName}"`;
72
+ }
73
+ return sanitizeName(variableOrInterfaceName, false);
74
+ }
75
+ /** Sanitizes a raw string to a valid TypeScript identifier, for use when generating type and variable names. */
76
+ export function sanitizeName(name, removeWhitespace = true, prefixReservedKeywords = true) {
77
+ const originalName = name;
78
+ // Remove any leading or trailing whitespace
79
+ name = name.trim();
80
+ if (!name) {
81
+ throw new Error('Invalid identifier: empty string');
82
+ }
83
+ if (removeWhitespace) {
84
+ name = name.replace(/\s/g, '');
85
+ }
86
+ // Remove any characters that are not alphanumeric or underscores
87
+ name = name.replace(/[^a-zA-Z0-9_$]/g, '_');
88
+ // Ensure the name does not start with a number
89
+ if (/^\d/.test(name)) {
90
+ name = `_${name}`;
91
+ }
92
+ // Ensure the name is not empty or all underscores
93
+ if (name.length === 0 || /^_+$/.test(name)) {
94
+ throw new Error(`Failed to sanitize string ${originalName}`);
95
+ }
96
+ if (prefixReservedKeywords && RESERVED_KEYWORDS.has(name)) {
97
+ name = `_${name}`;
98
+ }
99
+ return name;
100
+ }
101
+ /** Sanitizes a property name for use in a TypeScript interface, without prefixing reserved keywords. */
102
+ export function sanitizePropertyName(name) {
103
+ if (name.indexOf('@odata') > -1) {
104
+ return `"${name}"`;
105
+ }
106
+ return sanitizeName(name, false, false);
107
+ }
108
+ /** Returns a unique sanitized name, appending a numeric suffix to avoid collisions with existing names. */
109
+ export function getSanitizedUniqueName(existingNames, desiredName) {
110
+ // Sanitize the base name
111
+ desiredName = sanitizeName(desiredName);
112
+ const nameSet = new Set(existingNames);
113
+ if (!nameSet.has(desiredName)) {
114
+ return desiredName.toLowerCase();
115
+ }
116
+ let maxSuffix = 0;
117
+ // Non-literal regex shoud be safe here since baseName is sanitized
118
+ // and should not contain any special characters that could lead to regex injection.
119
+ const regex = new RegExp(`^${desiredName}_(\\d+)$`);
120
+ for (const name of existingNames) {
121
+ const match = name.match(regex);
122
+ if (match) {
123
+ const num = parseInt(match[1], 10);
124
+ if (num > maxSuffix) {
125
+ maxSuffix = num;
126
+ }
127
+ }
128
+ }
129
+ return `${desiredName}_${maxSuffix + 1}`.toLowerCase();
130
+ }
131
+ /** Normalizes a type name containing generic bracket syntax into a form suitable as a TypeScript identifier. */
132
+ export function normalizeGenericTypeName(typeName) {
133
+ return typeName.replace(/\[/g, '_').replace(/\]/g, '');
134
+ }
135
+ /**
136
+ * Extracts a clean identifier from a potentially schema-qualified resource name,
137
+ * for use in generated TypeScript identifiers.
138
+ *
139
+ * Handles bracket-qualified names used by SQL, Oracle, and other tabular connectors
140
+ * (e.g. `[dbo].[TableName]` or `[OWNER].[TABLE_NAME]`), as well as plain names.
141
+ * Always takes the last segment after the final dot, strips brackets, then sanitizes.
142
+ */
143
+ export function sanitizeTabularResourceName(name) {
144
+ const result = name.trim().replace(/\[|\]/g, '');
145
+ const match = result.match(/\.?([^.]*)$/);
146
+ if (match) {
147
+ return sanitizeName(match[1]);
148
+ }
149
+ return sanitizeName(result);
150
+ }
151
+ /** Returns the data source name accessor for the given model's service class. */
152
+ export function getServiceName(modelName) {
153
+ if (!modelName || !modelName.trim()) {
154
+ throw new Error('Model name cannot be null or empty.');
155
+ }
156
+ return `${modelName}Service.dataSourceName`;
157
+ }
158
+ /** Applies well-known casing fixes to property names before they are emitted into generated types. */
159
+ export function normalizePropertyName(propertyName) {
160
+ return propertyName.toLowerCase() === 'resultsets' ? 'ResultSets' : propertyName;
161
+ }
162
+ /** Converts a kebab-case string to camelCase (e.g., `common-models` → `commonModels`). */
163
+ export function kebabToCamelCase(name) {
164
+ return name.replace(/-+(.)/g, (_, c) => c.toUpperCase()).replace(/-+$/, '');
165
+ }
166
+ /** Wraps a property name in quotes when it cannot appear as a bare TypeScript identifier. */
167
+ export function formatPropertyName(propName) {
168
+ // Skip if already quoted
169
+ if (propName.startsWith('"') && propName.endsWith('"')) {
170
+ return propName;
171
+ }
172
+ return isValidPropertyName(propName) ? propName : `"${propName}"`;
173
+ }
174
+ /** Returns true if a property name can be used without quotes in a TypeScript type definition. */
175
+ export function isValidPropertyName(propName) {
176
+ // A valid property name must start with a letter, underscore, or dollar sign
177
+ // and can only contain letters, numbers, underscores, or dollar signs
178
+ return /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(propName);
179
+ }
180
+ //# sourceMappingURL=nameUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nameUtils.js","sourceRoot":"","sources":["../../src/shared/nameUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,kDAAkD;AAClD,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC;IAChC,OAAO;IACP,MAAM;IACN,OAAO;IACP,OAAO;IACP,OAAO;IACP,UAAU;IACV,UAAU;IACV,SAAS;IACT,QAAQ;IACR,IAAI;IACJ,MAAM;IACN,MAAM;IACN,QAAQ;IACR,SAAS;IACT,OAAO;IACP,SAAS;IACT,KAAK;IACL,UAAU;IACV,IAAI;IACJ,QAAQ;IACR,IAAI;IACJ,YAAY;IACZ,KAAK;IACL,MAAM;IACN,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,MAAM;IACN,OAAO;IACP,MAAM;IACN,KAAK;IACL,QAAQ;IACR,KAAK;IACL,MAAM;IACN,OAAO;IACP,MAAM;IACN,IAAI;IACJ,YAAY;IACZ,WAAW;IACX,KAAK;IACL,SAAS;IACT,SAAS;IACT,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,SAAS;IACT,aAAa;IACb,SAAS;IACT,KAAK;IACL,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,MAAM;IACN,IAAI;CACL,CAAC,CAAC;AAEH,8FAA8F;AAC9F,MAAM,UAAU,wBAAwB,CAAC,uBAA+B;IACtE,IAAI,uBAAuB,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;QACnD,2HAA2H;QAC3H,OAAO,IAAI,uBAAuB,GAAG,CAAC;IACxC,CAAC;IAED,OAAO,YAAY,CAAC,uBAAuB,EAAE,KAAK,CAAC,CAAC;AACtD,CAAC;AAED,gHAAgH;AAChH,MAAM,UAAU,YAAY,CAC1B,IAAY,EACZ,mBAA4B,IA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,CAAC;AACrD,CAAC"}
@@ -0,0 +1,22 @@
1
+ /*!
2
+ * Copyright (C) Microsoft Corporation. All rights reserved.
3
+ */
4
+ /**
5
+ * The types of files that can be generated by codegen. Each project can have up to one of each.
6
+ */
7
+ export type FileIdentifier = 'model' | 'service' | 'commonModel' | 'index';
8
+ export interface ICodegenProject {
9
+ /** Create a file at the given path with the given content. */
10
+ createFile(identifier: FileIdentifier, filePath: string, content: string): Promise<unknown>;
11
+ /** Commit any uncommitted files to the filesystem */
12
+ commit(): Promise<void>;
13
+ /** Join path segments using the underlying path convention. */
14
+ join(...paths: string[]): string;
15
+ /** Returns true if a directory exists at the given path. */
16
+ directoryExists(path: string): Promise<boolean>;
17
+ /** Returns true if a file exists at the given path. */
18
+ fileExists(path: string): Promise<boolean>;
19
+ /** Returns the names of all source files directly inside the given directory. */
20
+ getSourceFilesInDirectory(path: string): Promise<string[]>;
21
+ }
22
+ //# sourceMappingURL=project.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/shared/project.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,SAAS,GAAG,aAAa,GAAG,OAAO,CAAC;AAE3E,MAAM,WAAW,eAAe;IAC9B,8DAA8D;IAC9D,UAAU,CAAC,UAAU,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5F,qDAAqD;IACrD,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACxB,+DAA+D;IAC/D,IAAI,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IACjC,4DAA4D;IAC5D,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAChD,uDAAuD;IACvD,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC3C,iFAAiF;IACjF,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;CAC5D"}
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * Copyright (C) Microsoft Corporation. All rights reserved.
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=project.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/shared/project.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -0,0 +1,32 @@
1
+ /*!
2
+ * Copyright (C) Microsoft Corporation. All rights reserved.
3
+ */
4
+ import type { JsonObject } from '../types.js';
5
+ /**
6
+ * Type guard for plain JSON objects. Used widely for safe property access
7
+ * on `unknown` schema values before codegen processing begins.
8
+ */
9
+ export declare function isJsonObject(value: unknown): value is JsonObject;
10
+ /** Retrieves the properties map from a schema definition for iteration during code generation. */
11
+ export declare function getPropertiesNode(definition: JsonObject): JsonObject;
12
+ /** Returns the set of required property names from a schema, used to determine optionality in generated types. */
13
+ export declare function getRequiredFields(definition: JsonObject): Set<string>;
14
+ /** Converts a JSON Schema type to the TypeScript type used in generated interfaces. */
15
+ export declare function mapJsonTypeToTypeScript(jsonType?: string): string;
16
+ /** Resolves a JSON Schema `$ref` to the TypeScript type name it refers to. */
17
+ export declare function extractReferencedType(refValue: string): string;
18
+ /** Returns the schema's `name` field, which identifies the data source or connector. */
19
+ export declare function getNameNode(schema: unknown): string;
20
+ /** Returns true if a schema property has enumerable values (a non-empty `enum` array). */
21
+ export declare function hasEnumValues(propValue: JsonObject): boolean;
22
+ /** Produces the TypeScript identifier used for the type alias generated from an optionset property. */
23
+ export declare function generateOptionsetEnumName(modelName: string, propName: string): string;
24
+ /** Formats an enum value as a TypeScript string literal for use in union types. */
25
+ export declare function formatEnumLabel(label: unknown): string;
26
+ /** Returns true if the schema comes from a SharePoint data source (has a `referencedEntities` property). */
27
+ export declare function isSharepointSchema(root: unknown): boolean;
28
+ /** Returns true if a SharePoint schema property is a choice or multi-choice column. */
29
+ export declare function isSharepointChoiceColumn(propNode: unknown): boolean;
30
+ /** Extracts the items node from a standard tabular or SharePoint schema. Throws if the structure is invalid. */
31
+ export declare function getTabularItemsFromSchema(schema: unknown): JsonObject;
32
+ //# sourceMappingURL=schemaUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemaUtils.d.ts","sourceRoot":"","sources":["../../src/shared/schemaUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG3C;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAGhE;AAED,kGAAkG;AAClG,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,CAKpE;AAED,kHAAkH;AAClH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,CAKrE;AAED,uFAAuF;AACvF,wBAAgB,uBAAuB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAcjE;AAED,8EAA8E;AAC9E,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAI9D;AAED,wFAAwF;AACxF,wBAAgB,WAAW,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CASnD;AAED,0FAA0F;AAC1F,wBAAgB,aAAa,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAE5D;AAED,uGAAuG;AACvG,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAErF;AAED,mFAAmF;AACnF,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAYtD;AAED,4GAA4G;AAC5G,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAIzD;AAED,uFAAuF;AACvF,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,CAcnE;AAED,gHAAgH;AAChH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,OAAO,GAAG,UAAU,CASrE"}
@@ -0,0 +1,110 @@
1
+ /*!
2
+ * Copyright (C) Microsoft Corporation. All rights reserved.
3
+ */
4
+ import { convertToValidIdentifier, normalizeGenericTypeName } from './nameUtils.js';
5
+ /**
6
+ * Type guard for plain JSON objects. Used widely for safe property access
7
+ * on `unknown` schema values before codegen processing begins.
8
+ */
9
+ export function isJsonObject(value) {
10
+ // Conclusive because 'object' type from JSON.parse() cannot have Symbol keys, or be undefined, functions, Dates, RegExp, Map/Set, or Classes
11
+ return value !== null && typeof value === 'object' && !Array.isArray(value);
12
+ }
13
+ /** Retrieves the properties map from a schema definition for iteration during code generation. */
14
+ export function getPropertiesNode(definition) {
15
+ if (!('properties' in definition) || !isJsonObject(definition.properties)) {
16
+ throw new Error("The definition does not contain a valid 'properties' node.");
17
+ }
18
+ return definition.properties;
19
+ }
20
+ /** Returns the set of required property names from a schema, used to determine optionality in generated types. */
21
+ export function getRequiredFields(definition) {
22
+ if ('required' in definition && Array.isArray(definition.required)) {
23
+ return new Set(definition.required.map((r) => String(r)));
24
+ }
25
+ return new Set();
26
+ }
27
+ /** Converts a JSON Schema type to the TypeScript type used in generated interfaces. */
28
+ export function mapJsonTypeToTypeScript(jsonType) {
29
+ switch (jsonType) {
30
+ case 'string':
31
+ return 'string';
32
+ case 'number':
33
+ case 'integer':
34
+ return 'number';
35
+ case 'boolean':
36
+ return 'boolean';
37
+ case 'object':
38
+ return 'Record<string, unknown>';
39
+ default:
40
+ return 'unknown';
41
+ }
42
+ }
43
+ /** Resolves a JSON Schema `$ref` to the TypeScript type name it refers to. */
44
+ export function extractReferencedType(refValue) {
45
+ const parts = refValue.split('/');
46
+ const raw = normalizeGenericTypeName(parts[parts.length - 1] ?? '');
47
+ return convertToValidIdentifier(raw);
48
+ }
49
+ /** Returns the schema's `name` field, which identifies the data source or connector. */
50
+ export function getNameNode(schema) {
51
+ if (isJsonObject(schema)) {
52
+ const name = schema.name;
53
+ if (typeof name !== 'string' || !name.trim()) {
54
+ throw new Error("No 'name' node found in schema");
55
+ }
56
+ return name.trim();
57
+ }
58
+ throw new Error('Schema must be a JSON object to extract name');
59
+ }
60
+ /** Returns true if a schema property has enumerable values (a non-empty `enum` array). */
61
+ export function hasEnumValues(propValue) {
62
+ return Array.isArray(propValue.enum) && propValue.enum.length > 0;
63
+ }
64
+ /** Produces the TypeScript identifier used for the type alias generated from an optionset property. */
65
+ export function generateOptionsetEnumName(modelName, propName) {
66
+ return convertToValidIdentifier(`${modelName}${propName}`);
67
+ }
68
+ /** Formats an enum value as a TypeScript string literal for use in union types. */
69
+ export function formatEnumLabel(label) {
70
+ if (label === null || label === undefined) {
71
+ return "''";
72
+ }
73
+ // Non-string enum values (e.g. boolean true/false, numbers) appear in some connector schemas
74
+ if (typeof label !== 'string') {
75
+ return `'${String(label).replace(/'/g, "\\'")}'`;
76
+ }
77
+ if (label.trim() === '') {
78
+ return "''";
79
+ }
80
+ return `'${label.replace(/'/g, "\\'")}'`;
81
+ }
82
+ /** Returns true if the schema comes from a SharePoint data source (has a `referencedEntities` property). */
83
+ export function isSharepointSchema(root) {
84
+ return (isJsonObject(root) && !!root.referencedEntities && typeof root.referencedEntities === 'object');
85
+ }
86
+ /** Returns true if a SharePoint schema property is a choice or multi-choice column. */
87
+ export function isSharepointChoiceColumn(propNode) {
88
+ try {
89
+ if (isJsonObject(propNode) &&
90
+ isJsonObject(propNode['x-ms-capabilities']) &&
91
+ isJsonObject(propNode['x-ms-capabilities']['x-ms-sp']) &&
92
+ propNode['x-ms-capabilities']['x-ms-sp'].IsChoice === true) {
93
+ return true;
94
+ }
95
+ }
96
+ catch {
97
+ // Ignore errors and return false so we fall back to default behavior
98
+ }
99
+ return false;
100
+ }
101
+ /** Extracts the items node from a standard tabular or SharePoint schema. Throws if the structure is invalid. */
102
+ export function getTabularItemsFromSchema(schema) {
103
+ if (!isJsonObject(schema) || !isJsonObject(schema.schema) || !isJsonObject(schema.schema.items)) {
104
+ const name = isJsonObject(schema) && typeof schema.name === 'string' ? schema.name : 'unknown';
105
+ const items = schema?.schema?.items;
106
+ throw new Error(`Schema '${name}': expected schema.schema.items to be an object, got ${typeof items}`);
107
+ }
108
+ return schema.schema.items;
109
+ }
110
+ //# sourceMappingURL=schemaUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemaUtils.js","sourceRoot":"","sources":["../../src/shared/schemaUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEjF;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAc;IACzC,6IAA6I;IAC7I,OAAO,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,kGAAkG;AAClG,MAAM,UAAU,iBAAiB,CAAC,UAAsB;IACtD,IAAI,CAAC,CAAC,YAAY,IAAI,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC1E,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;IAChF,CAAC;IACD,OAAO,UAAU,CAAC,UAAU,CAAC;AAC/B,CAAC;AAED,kHAAkH;AAClH,MAAM,UAAU,iBAAiB,CAAC,UAAsB;IACtD,IAAI,UAAU,IAAI,UAAU,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QACnE,OAAO,IAAI,GAAG,CAAS,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,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D,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,qEAAqE;IACvE,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,gHAAgH;AAChH,MAAM,UAAU,yBAAyB,CAAC,MAAe;IACvD,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;QAChG,MAAM,IAAI,GAAG,YAAY,CAAC,MAAM,CAAC,IAAI,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;QAC/F,MAAM,KAAK,GAAI,MAA2C,EAAE,MAAM,EAAE,KAAK,CAAC;QAC1E,MAAM,IAAI,KAAK,CACb,WAAW,IAAI,wDAAwD,OAAO,KAAK,EAAE,CACtF,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;AAC7B,CAAC"}
@@ -0,0 +1,11 @@
1
+ /*!
2
+ * Copyright (C) Microsoft Corporation. All rights reserved.
3
+ */
4
+ /** Returns true if the schema represents a SQL stored procedure (has a `procedureresultschema` object). */
5
+ export declare function isSqlStoredProcedure(root: unknown): boolean;
6
+ /**
7
+ * Returns the API key used to identify a stored procedure in datasourcesinfo.
8
+ * Strips brackets and the schema prefix: `[dbo].[testProc]` → `testProc`.
9
+ */
10
+ export declare function getSqlStoredProcApiKey(name: string): string;
11
+ //# sourceMappingURL=sqlStoredProcUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sqlStoredProcUtils.d.ts","sourceRoot":"","sources":["../../src/shared/sqlStoredProcUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,2GAA2G;AAC3G,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAM3D;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAG3D"}