diff --git a/types/gorilla-engine/components/MappingEditor.d.ts b/types/gorilla-engine/components/MappingEditor.d.ts index 10f12f49d8a1c5..cf9429c2285d19 100644 --- a/types/gorilla-engine/components/MappingEditor.d.ts +++ b/types/gorilla-engine/components/MappingEditor.d.ts @@ -1,15 +1,15 @@ declare namespace GorillaEngine.UI { interface Zone { + path: string; + name: string; index: number; rootKey: number; lowKey: number; highKey: number; lowVel: number; highVel: number; - samplePath: string; } interface MappingEditorProps extends Common, Bounds, Background { - parentPath: string; zones?: Zone[]; refreshView(index?: number): void; addZone(zone: Partial): Zone; diff --git a/types/gorilla-engine/gorilla-engine-tests.ts b/types/gorilla-engine/gorilla-engine-tests.ts index 6237c1f881f63b..d2624d4c643e7a 100644 --- a/types/gorilla-engine/gorilla-engine-tests.ts +++ b/types/gorilla-engine/gorilla-engine-tests.ts @@ -14,4 +14,4 @@ const label = new GorillaEngine.UI.Label({ margin: 5 }); const slider = new GorillaEngine.UI.Slider({ id: "slider", x: 0 }); -const mappingEditor = new GorillaEngine.UI.MappingEditor({ id: "myMapping" }); +const mappingEditor = new GorillaEngine.UI.MappingEditor({ id: "myMappingEditor" }); diff --git a/types/pxr-oneline/index.d.ts b/types/pxr-oneline/index.d.ts index 35460301854cb7..2eabc8e7911aa9 100644 --- a/types/pxr-oneline/index.d.ts +++ b/types/pxr-oneline/index.d.ts @@ -4,6 +4,8 @@ declare namespace OneLine { adUnitRequest(arrFoAdIds?: string[], allowReload?: boolean): void; preBidAdUnit(prebidBids: PrebidBids, gtag: string, isDebug: boolean): any; requestVideoPlayerAds(onBiddingComplete: () => void): void; + showCmp(): void; + loadScript(src: string, priority: "async" | "defer" | "instant" | "async"): void; buildVideoUrl( bidder: BidderConfig[], placementID: string, @@ -72,6 +74,5 @@ declare namespace OneLine { type NoParamFunction = () => void; type ParamFunction = (arg: any) => void; } - declare const OneLine: OneLine.OneLine; export = OneLine; diff --git a/types/pxr-oneline/oneline-tests.ts b/types/pxr-oneline/oneline-tests.ts index e84cf4c47723e1..1eec022fae255d 100644 --- a/types/pxr-oneline/oneline-tests.ts +++ b/types/pxr-oneline/oneline-tests.ts @@ -71,6 +71,20 @@ const ndOne: OneLine.OneLine = { // This is a mock implementation and should be replaced with your actual logic return `https://example.com/video?placement=${placementID}&bidder=${bidder.map(b => b.bidder).join(",")}`; }, + showCmp: () => { + // Mock implementation for showCmp + console.log("Showing CMP screen..."); + const currentDomain = window.location.origin; + if (currentDomain) { + console.log(`Redirecting to: ${currentDomain}/#cmpscreen`); + } else { + console.warn("NDM: Unable to show CMP"); + } + }, + loadScript: (src: string, priority: "async" | "defer" | "instant" | "async"): void => { + // Mock implementation for loadScript + console.log(`Loading script from: ${src} with priority: ${priority}`); + }, }; // Test cases diff --git a/types/pxr-oneline/package.json b/types/pxr-oneline/package.json index cf742f0c36ea5f..776121c7ca3e5e 100644 --- a/types/pxr-oneline/package.json +++ b/types/pxr-oneline/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@types/pxr-oneline", - "version": "1.5.9999", + "version": "1.6.9999", "nonNpm": true, "nonNpmDescription": "The OneLine handles all the logic needed for a publisher to serve ads.", "projects": [ @@ -12,8 +12,16 @@ }, "owners": [ { - "name": "PXR Advertising", + "name": "Diogo", "githubUsername": "diogopxrnextday" + }, + { + "name": "Edwin", + "githubUsername": "edwinveldhuizen" + }, + { + "name": "Bart", + "githubUsername": "bart-digitalenterprises" } ] } diff --git a/types/xrm/index.d.ts b/types/xrm/index.d.ts index 71cda66fbe0812..21c6fa5bb1e6b1 100644 --- a/types/xrm/index.d.ts +++ b/types/xrm/index.d.ts @@ -2923,7 +2923,7 @@ declare namespace Xrm { * Interface an OptionSet attribute. * @see {@link EnumAttribute} */ - interface MultiSelectOptionSetAttribute extends EnumAttribute { + interface MultiSelectOptionSetAttribute extends EnumAttribute { /** * Gets the attribute format. * @returns The format of the attribute. @@ -6083,7 +6083,7 @@ declare namespace Xrm { * @returns On success, returns a promise object containing the attributes specified earlier in the description of the successCallback parameter. * @see {@link https://learn.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/reference/xrm-webapi/updaterecord External Link: updateRecord (Client API reference)} */ - updateRecord(entityLogicalName: string, id: string, data: any): Async.PromiseLike; + updateRecord(entityLogicalName: string, id: string, data: any): Async.PromiseLike; } /** @@ -6094,6 +6094,14 @@ declare namespace Xrm { id: string; } + /** + * Interface for the WebAPI UpdateRecord request response + */ + interface UpdateResponse { + entityType: string; + id: string; + } + /** * Interface for the Promise error response arguments */ diff --git a/types/xrm/xrm-tests.ts b/types/xrm/xrm-tests.ts index 64fb810e518861..131723fb6946c4 100644 --- a/types/xrm/xrm-tests.ts +++ b/types/xrm/xrm-tests.ts @@ -153,7 +153,7 @@ alert(`The current form type is: ${formContext.ui.getFormType()}`); alert(`The current entity type is: ${formContext.data.entity.getEntityName()}`); -/// Demonstrate Optionset Value as int in Turbo Forms +/// Demonstrate OptionSet Value as int const optionSetAttribute = formContext.getAttribute("statuscode"); if (optionSetAttribute !== null) { @@ -170,6 +170,41 @@ if (optionSetAttribute !== null) { } } +/// Demonstrate OptionSet Value as enum + +enum TestOptionSet { + Option1 = 56666000, + Option2 = 56666001, +} + +const optionSetAttributeEnum = formContext.getAttribute>("statuscode"); +if (optionSetAttributeEnum !== null) { + const optionEnumValue: TestOptionSet | null = optionSetAttributeEnum.getValue(); +} + +/// Demonstrate MultiSelectOptionSet Value as int + +const multiSelectOptionSetAttribute = formContext.getAttribute( + "statuscode", +); +if (multiSelectOptionSetAttribute !== null) { + const multiSelectOptionValue: number = multiSelectOptionSetAttribute.getOptions()[0].value; +} + +/// Demonstrate MultiSelectOptionSet Value as enum + +enum TestMultiSelectOptionSet { + Option1 = 56666000, + Option2 = 56666001, +} + +const multiSelectOptionSetAttributeEnum = formContext.getAttribute< + Xrm.Attributes.MultiSelectOptionSetAttribute +>("statuscode"); +if (multiSelectOptionSetAttributeEnum !== null) { + const multiSelectOptionEnumValue: TestMultiSelectOptionSet[] | null = multiSelectOptionSetAttributeEnum.getValue(); +} + /// Demonstrate setFormNotification let level: Xrm.FormNotificationLevel; @@ -220,6 +255,16 @@ Xrm.Utility.getEntityMetadata("account", ["telephone1"]).then((metadata) => { console.log(metadata.Attributes["statuscode"].OptionSet[0].Label.LocalizedLabels[0].Label); }); +// Demonstrate WebAPI CreateRecord +Xrm.WebApi.createRecord("contact", { fullname: "Neo" }).then((response) => { + console.log(response.entityType, response.id); +}); + +// Demonstrate WebAPI UpdateRecord +Xrm.WebApi.updateRecord("contact", "1d-123", { fullname: "Neo" }).then((response) => { + console.log(response.entityType, response.id); +}); + // Demonstrate WebAPI RetrieveMultiple Xrm.WebApi.retrieveMultipleRecords( "contact", @@ -634,7 +679,7 @@ const multiSelectOptionSetControl = formContext.getControl multiSelectOptionSetControl.getAttribute(); // Demonstrates getWebResourceUrl