@osdk/generator 2.1.0-beta.25 → 2.1.0-beta.26
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.
- package/CHANGELOG.md +15 -0
- package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.js +1 -1
- package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.js.map +1 -1
- package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.js +498 -498
- package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.js.map +1 -1
- package/build/cjs/index.cjs +1 -1
- package/build/cjs/index.cjs.map +1 -1
- package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.js +1 -1
- package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.js.map +1 -1
- package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.js +498 -498
- package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.js.map +1 -1
- package/package.json +4 -4
|
@@ -404,567 +404,567 @@ describe("generator", () => {
|
|
|
404
404
|
const errors = diagnostics.filter(q => q.code !== 2792);
|
|
405
405
|
expect(errors).toHaveLength(0);
|
|
406
406
|
expect(tweakedFilesForSnapshotConsistency(helper.getFiles())).toMatchInlineSnapshot(`
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
export const $ontologyRid = 'ridHere';
|
|
412
|
-
",
|
|
413
|
-
"/foo/index.ts": "export { deleteTodos, markTodoCompleted } from './ontology/actions';
|
|
414
|
-
export * as $Actions from './ontology/actions';
|
|
415
|
-
export { SomeInterface } from './ontology/interfaces';
|
|
416
|
-
export * as $Interfaces from './ontology/interfaces';
|
|
417
|
-
export { Person, Todo } from './ontology/objects';
|
|
418
|
-
export * as $Objects from './ontology/objects';
|
|
419
|
-
export { getCount, returnsTodo } from './ontology/queries';
|
|
420
|
-
export * as $Queries from './ontology/queries';
|
|
421
|
-
export { $osdkMetadata } from './OntologyMetadata';
|
|
422
|
-
export { $ontologyRid } from './OntologyMetadata';
|
|
423
|
-
",
|
|
424
|
-
"/foo/ontology/actions.ts": "export { deleteTodos } from './actions/deleteTodos';
|
|
425
|
-
export { markTodoCompleted } from './actions/markTodoCompleted';
|
|
426
|
-
",
|
|
427
|
-
"/foo/ontology/actions/deleteTodos.ts": "import type {
|
|
428
|
-
ActionDefinition,
|
|
429
|
-
ActionMetadata,
|
|
430
|
-
ActionParam,
|
|
431
|
-
ActionReturnTypeForOptions,
|
|
432
|
-
ApplyActionOptions,
|
|
433
|
-
ApplyBatchActionOptions,
|
|
434
|
-
} from '@osdk/client';
|
|
435
|
-
import { $osdkMetadata } from '../../OntologyMetadata';
|
|
436
|
-
import type { Todo } from '../objects/Todo';
|
|
437
|
-
|
|
438
|
-
export namespace deleteTodos {
|
|
439
|
-
// Represents the definition of the parameters for the action
|
|
440
|
-
export type ParamsDefinition = {
|
|
441
|
-
object: {
|
|
442
|
-
description: 'Todo(s) to be deleted';
|
|
443
|
-
multiplicity: true;
|
|
444
|
-
nullable: true;
|
|
445
|
-
type: ActionMetadata.DataType.Object<Todo>;
|
|
446
|
-
};
|
|
447
|
-
};
|
|
407
|
+
{
|
|
408
|
+
"/foo/OntologyMetadata.ts": "export type $ExpectedClientVersion = 'PLACEHOLDER';
|
|
409
|
+
export const $osdkMetadata = { extraUserAgent: 'typescript-sdk/0.0.0 osdk-cli/0.0.0' };
|
|
448
410
|
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
export
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
}
|
|
411
|
+
export const $ontologyRid = 'ridHere';
|
|
412
|
+
",
|
|
413
|
+
"/foo/index.ts": "export { deleteTodos, markTodoCompleted } from './ontology/actions.js';
|
|
414
|
+
export * as $Actions from './ontology/actions.js';
|
|
415
|
+
export { SomeInterface } from './ontology/interfaces.js';
|
|
416
|
+
export * as $Interfaces from './ontology/interfaces.js';
|
|
417
|
+
export { Person, Todo } from './ontology/objects.js';
|
|
418
|
+
export * as $Objects from './ontology/objects.js';
|
|
419
|
+
export { getCount, returnsTodo } from './ontology/queries.js';
|
|
420
|
+
export * as $Queries from './ontology/queries.js';
|
|
421
|
+
export { $osdkMetadata } from './OntologyMetadata.js';
|
|
422
|
+
export { $ontologyRid } from './OntologyMetadata.js';
|
|
423
|
+
",
|
|
424
|
+
"/foo/ontology/actions.ts": "export { deleteTodos } from './actions/deleteTodos.js';
|
|
425
|
+
export { markTodoCompleted } from './actions/markTodoCompleted.js';
|
|
426
|
+
",
|
|
427
|
+
"/foo/ontology/actions/deleteTodos.ts": "import type {
|
|
428
|
+
ActionDefinition,
|
|
429
|
+
ActionMetadata,
|
|
430
|
+
ActionParam,
|
|
431
|
+
ActionReturnTypeForOptions,
|
|
432
|
+
ApplyActionOptions,
|
|
433
|
+
ApplyBatchActionOptions,
|
|
434
|
+
} from '@osdk/client';
|
|
435
|
+
import { $osdkMetadata } from '../../OntologyMetadata.js';
|
|
436
|
+
import type { Todo } from '../objects/Todo.js';
|
|
437
|
+
|
|
438
|
+
export namespace deleteTodos {
|
|
439
|
+
// Represents the definition of the parameters for the action
|
|
440
|
+
export type ParamsDefinition = {
|
|
441
|
+
object: {
|
|
442
|
+
description: 'Todo(s) to be deleted';
|
|
443
|
+
multiplicity: true;
|
|
444
|
+
nullable: true;
|
|
445
|
+
type: ActionMetadata.DataType.Object<Todo>;
|
|
446
|
+
};
|
|
447
|
+
};
|
|
458
448
|
|
|
459
|
-
// Represents a fqn of the action
|
|
460
|
-
export interface Signatures {
|
|
461
449
|
/**
|
|
462
450
|
* An action which takes in an array of objects
|
|
463
451
|
*/
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
452
|
+
export interface Params {
|
|
453
|
+
/**
|
|
454
|
+
* Todo(s) to be deleted
|
|
455
|
+
*/
|
|
456
|
+
readonly object?: ReadonlyArray<ActionParam.ObjectType<Todo>>;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
// Represents a fqn of the action
|
|
460
|
+
export interface Signatures {
|
|
461
|
+
/**
|
|
462
|
+
* An action which takes in an array of objects
|
|
463
|
+
*/
|
|
464
|
+
applyAction<P extends deleteTodos.Params, OP extends ApplyActionOptions>(
|
|
465
|
+
args: P,
|
|
466
|
+
options?: OP,
|
|
467
|
+
): Promise<ActionReturnTypeForOptions<OP>>;
|
|
468
|
+
|
|
469
|
+
batchApplyAction<P extends ReadonlyArray<deleteTodos.Params>, OP extends ApplyBatchActionOptions>(
|
|
470
|
+
args: P,
|
|
471
|
+
options?: OP,
|
|
472
|
+
): Promise<ActionReturnTypeForOptions<OP>>;
|
|
473
|
+
}
|
|
473
474
|
}
|
|
474
|
-
}
|
|
475
475
|
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
476
|
+
/**
|
|
477
|
+
* An action which takes in an array of objects
|
|
478
|
+
* @param {ActionParam.ObjectType<Todo>} [object] Todo(s) to be deleted
|
|
479
|
+
*/
|
|
480
|
+
export interface deleteTodos extends ActionDefinition<deleteTodos.Signatures> {
|
|
481
|
+
__DefinitionMetadata?: {
|
|
482
|
+
apiName: 'deleteTodos';
|
|
483
|
+
description: 'An action which takes in an array of objects';
|
|
484
|
+
modifiedEntities: {};
|
|
485
|
+
parameters: deleteTodos.ParamsDefinition;
|
|
486
|
+
rid: 'ri.ontology.main.action-type.8f94017d-cf17-4fa8-84c3-8e01e5d594f2';
|
|
487
|
+
status: 'ACTIVE';
|
|
488
|
+
type: 'action';
|
|
489
|
+
|
|
490
|
+
signatures: deleteTodos.Signatures;
|
|
491
|
+
};
|
|
482
492
|
apiName: 'deleteTodos';
|
|
483
|
-
description: 'An action which takes in an array of objects';
|
|
484
|
-
modifiedEntities: {};
|
|
485
|
-
parameters: deleteTodos.ParamsDefinition;
|
|
486
|
-
rid: 'ri.ontology.main.action-type.8f94017d-cf17-4fa8-84c3-8e01e5d594f2';
|
|
487
|
-
status: 'ACTIVE';
|
|
488
493
|
type: 'action';
|
|
494
|
+
osdkMetadata: typeof $osdkMetadata;
|
|
495
|
+
}
|
|
489
496
|
|
|
490
|
-
|
|
497
|
+
export const deleteTodos: deleteTodos = {
|
|
498
|
+
apiName: 'deleteTodos',
|
|
499
|
+
type: 'action',
|
|
500
|
+
osdkMetadata: $osdkMetadata,
|
|
491
501
|
};
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
502
|
+
",
|
|
503
|
+
"/foo/ontology/actions/markTodoCompleted.ts": "import type {
|
|
504
|
+
ActionDefinition,
|
|
505
|
+
ActionMetadata,
|
|
506
|
+
ActionParam,
|
|
507
|
+
ActionReturnTypeForOptions,
|
|
508
|
+
ApplyActionOptions,
|
|
509
|
+
ApplyBatchActionOptions,
|
|
510
|
+
} from '@osdk/client';
|
|
511
|
+
import { $osdkMetadata } from '../../OntologyMetadata.js';
|
|
512
|
+
import type { Todo } from '../objects/Todo.js';
|
|
496
513
|
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
ActionParam,
|
|
507
|
-
ActionReturnTypeForOptions,
|
|
508
|
-
ApplyActionOptions,
|
|
509
|
-
ApplyBatchActionOptions,
|
|
510
|
-
} from '@osdk/client';
|
|
511
|
-
import { $osdkMetadata } from '../../OntologyMetadata';
|
|
512
|
-
import type { Todo } from '../objects/Todo';
|
|
513
|
-
|
|
514
|
-
export namespace markTodoCompleted {
|
|
515
|
-
// Represents the definition of the parameters for the action
|
|
516
|
-
export type ParamsDefinition = {
|
|
517
|
-
object: {
|
|
518
|
-
description: 'A Todo to mark completed';
|
|
519
|
-
multiplicity: false;
|
|
520
|
-
nullable: true;
|
|
521
|
-
type: ActionMetadata.DataType.Object<Todo>;
|
|
514
|
+
export namespace markTodoCompleted {
|
|
515
|
+
// Represents the definition of the parameters for the action
|
|
516
|
+
export type ParamsDefinition = {
|
|
517
|
+
object: {
|
|
518
|
+
description: 'A Todo to mark completed';
|
|
519
|
+
multiplicity: false;
|
|
520
|
+
nullable: true;
|
|
521
|
+
type: ActionMetadata.DataType.Object<Todo>;
|
|
522
|
+
};
|
|
522
523
|
};
|
|
523
|
-
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* An action which takes different types of parameters
|
|
527
|
+
*/
|
|
528
|
+
export interface Params {
|
|
529
|
+
/**
|
|
530
|
+
* A Todo to mark completed
|
|
531
|
+
*/
|
|
532
|
+
readonly object?: ActionParam.ObjectType<Todo>;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
// Represents a fqn of the action
|
|
536
|
+
export interface Signatures {
|
|
537
|
+
/**
|
|
538
|
+
* An action which takes different types of parameters
|
|
539
|
+
*/
|
|
540
|
+
applyAction<P extends markTodoCompleted.Params, OP extends ApplyActionOptions>(
|
|
541
|
+
args: P,
|
|
542
|
+
options?: OP,
|
|
543
|
+
): Promise<ActionReturnTypeForOptions<OP>>;
|
|
544
|
+
|
|
545
|
+
batchApplyAction<P extends ReadonlyArray<markTodoCompleted.Params>, OP extends ApplyBatchActionOptions>(
|
|
546
|
+
args: P,
|
|
547
|
+
options?: OP,
|
|
548
|
+
): Promise<ActionReturnTypeForOptions<OP>>;
|
|
549
|
+
}
|
|
550
|
+
}
|
|
524
551
|
|
|
525
552
|
/**
|
|
526
553
|
* An action which takes different types of parameters
|
|
554
|
+
* @param {ActionParam.ObjectType<Todo>} [object] A Todo to mark completed
|
|
527
555
|
*/
|
|
528
|
-
export interface
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
556
|
+
export interface markTodoCompleted extends ActionDefinition<markTodoCompleted.Signatures> {
|
|
557
|
+
__DefinitionMetadata?: {
|
|
558
|
+
apiName: 'markTodoCompleted';
|
|
559
|
+
description: 'An action which takes different types of parameters';
|
|
560
|
+
modifiedEntities: {
|
|
561
|
+
Todo: {
|
|
562
|
+
created: false;
|
|
563
|
+
modified: true;
|
|
564
|
+
};
|
|
565
|
+
};
|
|
566
|
+
parameters: markTodoCompleted.ParamsDefinition;
|
|
567
|
+
rid: 'ri.ontology.main.action-type.9f84017d-cf17-4fa8-84c3-8e01e5d594f2';
|
|
568
|
+
status: 'ACTIVE';
|
|
569
|
+
type: 'action';
|
|
570
|
+
|
|
571
|
+
signatures: markTodoCompleted.Signatures;
|
|
572
|
+
};
|
|
573
|
+
apiName: 'markTodoCompleted';
|
|
574
|
+
type: 'action';
|
|
575
|
+
osdkMetadata: typeof $osdkMetadata;
|
|
533
576
|
}
|
|
534
577
|
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
578
|
+
export const markTodoCompleted: markTodoCompleted = {
|
|
579
|
+
apiName: 'markTodoCompleted',
|
|
580
|
+
type: 'action',
|
|
581
|
+
osdkMetadata: $osdkMetadata,
|
|
582
|
+
};
|
|
583
|
+
",
|
|
584
|
+
"/foo/ontology/interfaces.ts": "export { SomeInterface } from './interfaces/SomeInterface.js';
|
|
585
|
+
",
|
|
586
|
+
"/foo/ontology/interfaces/SomeInterface.ts": "import type { PropertyDef as $PropertyDef } from '@osdk/client';
|
|
587
|
+
import { $osdkMetadata } from '../../OntologyMetadata.js';
|
|
588
|
+
|
|
589
|
+
import type {
|
|
590
|
+
InterfaceDefinition as $InterfaceDefinition,
|
|
591
|
+
ObjectSet as $ObjectSet,
|
|
592
|
+
Osdk as $Osdk,
|
|
593
|
+
PropertyValueWireToClient as $PropType,
|
|
594
|
+
} from '@osdk/client';
|
|
595
|
+
|
|
596
|
+
export type OsdkObjectLinks$SomeInterface = {};
|
|
597
|
+
|
|
598
|
+
export namespace SomeInterface {
|
|
599
|
+
export type PropertyKeys = 'SomeProperty';
|
|
600
|
+
|
|
601
|
+
export interface Props {
|
|
602
|
+
readonly SomeProperty: $PropType['string'] | undefined;
|
|
603
|
+
}
|
|
604
|
+
export type StrictProps = Props;
|
|
605
|
+
|
|
606
|
+
export interface ObjectSet extends $ObjectSet<SomeInterface, SomeInterface.ObjectSet> {}
|
|
607
|
+
|
|
608
|
+
export type OsdkInstance<
|
|
609
|
+
OPTIONS extends never | '$rid' = never,
|
|
610
|
+
K extends keyof SomeInterface.Props = keyof SomeInterface.Props,
|
|
611
|
+
> = $Osdk.Instance<SomeInterface, OPTIONS, K>;
|
|
612
|
+
|
|
613
|
+
/** @deprecated use OsdkInstance */
|
|
614
|
+
export type OsdkObject<
|
|
615
|
+
OPTIONS extends never | '$rid' = never,
|
|
616
|
+
K extends keyof SomeInterface.Props = keyof SomeInterface.Props,
|
|
617
|
+
> = OsdkInstance<OPTIONS, K>;
|
|
549
618
|
}
|
|
550
|
-
}
|
|
551
619
|
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
620
|
+
export interface SomeInterface extends $InterfaceDefinition {
|
|
621
|
+
osdkMetadata: typeof $osdkMetadata;
|
|
622
|
+
type: 'interface';
|
|
623
|
+
apiName: 'SomeInterface';
|
|
624
|
+
__DefinitionMetadata?: {
|
|
625
|
+
objectSet: SomeInterface.ObjectSet;
|
|
626
|
+
props: SomeInterface.Props;
|
|
627
|
+
linksType: OsdkObjectLinks$SomeInterface;
|
|
628
|
+
strictProps: SomeInterface.StrictProps;
|
|
629
|
+
apiName: 'SomeInterface';
|
|
630
|
+
description: 'Some interface';
|
|
631
|
+
displayName: 'Sum Interface';
|
|
632
|
+
implementedBy: [];
|
|
633
|
+
implements: [];
|
|
634
|
+
links: {};
|
|
635
|
+
properties: {
|
|
636
|
+
/**
|
|
637
|
+
* display name: 'Sum Property',
|
|
638
|
+
* description: Some property
|
|
639
|
+
*/
|
|
640
|
+
SomeProperty: $PropertyDef<'string', 'nullable', 'single'>;
|
|
641
|
+
};
|
|
642
|
+
rid: 'idk';
|
|
643
|
+
type: 'interface';
|
|
644
|
+
};
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
export const SomeInterface: SomeInterface = {
|
|
648
|
+
type: 'interface',
|
|
649
|
+
apiName: 'SomeInterface',
|
|
650
|
+
osdkMetadata: $osdkMetadata,
|
|
651
|
+
};
|
|
652
|
+
",
|
|
653
|
+
"/foo/ontology/objects.ts": "export { Person } from './objects/Person.js';
|
|
654
|
+
export { Todo } from './objects/Todo.js';
|
|
655
|
+
",
|
|
656
|
+
"/foo/ontology/objects/Person.ts": "import type { PropertyDef as $PropertyDef } from '@osdk/client';
|
|
657
|
+
import { $osdkMetadata } from '../../OntologyMetadata.js';
|
|
658
|
+
import type { $ExpectedClientVersion } from '../../OntologyMetadata.js';
|
|
659
|
+
import type { Todo } from './Todo.js';
|
|
660
|
+
import type {
|
|
661
|
+
PropertyKeys as $PropertyKeys,
|
|
662
|
+
ObjectTypeDefinition as $ObjectTypeDefinition,
|
|
663
|
+
ObjectMetadata as $ObjectMetadata,
|
|
664
|
+
} from '@osdk/client';
|
|
665
|
+
import type {
|
|
666
|
+
ObjectSet as $ObjectSet,
|
|
667
|
+
Osdk as $Osdk,
|
|
668
|
+
OsdkObject as $OsdkObject,
|
|
669
|
+
PropertyValueWireToClient as $PropType,
|
|
670
|
+
SingleLinkAccessor as $SingleLinkAccessor,
|
|
671
|
+
} from '@osdk/client';
|
|
672
|
+
|
|
673
|
+
export namespace Person {
|
|
674
|
+
export type PropertyKeys = 'email';
|
|
675
|
+
|
|
676
|
+
export interface Links {
|
|
677
|
+
readonly Todos: Todo.ObjectSet;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
export interface Props {
|
|
681
|
+
readonly email: $PropType['string'];
|
|
682
|
+
}
|
|
683
|
+
export type StrictProps = Props;
|
|
684
|
+
|
|
685
|
+
export interface ObjectSet extends $ObjectSet<Person, Person.ObjectSet> {}
|
|
686
|
+
|
|
687
|
+
export type OsdkInstance<
|
|
688
|
+
OPTIONS extends never | '$rid' = never,
|
|
689
|
+
K extends keyof Person.Props = keyof Person.Props,
|
|
690
|
+
> = $Osdk.Instance<Person, OPTIONS, K>;
|
|
691
|
+
|
|
692
|
+
/** @deprecated use OsdkInstance */
|
|
693
|
+
export type OsdkObject<
|
|
694
|
+
OPTIONS extends never | '$rid' = never,
|
|
695
|
+
K extends keyof Person.Props = keyof Person.Props,
|
|
696
|
+
> = OsdkInstance<OPTIONS, K>;
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
export interface Person extends $ObjectTypeDefinition {
|
|
700
|
+
osdkMetadata: typeof $osdkMetadata;
|
|
701
|
+
type: 'object';
|
|
702
|
+
apiName: 'Person';
|
|
703
|
+
__DefinitionMetadata?: {
|
|
704
|
+
objectSet: Person.ObjectSet;
|
|
705
|
+
props: Person.Props;
|
|
706
|
+
linksType: Person.Links;
|
|
707
|
+
strictProps: Person.StrictProps;
|
|
708
|
+
apiName: 'Person';
|
|
709
|
+
description: 'A person';
|
|
710
|
+
displayName: 'Person';
|
|
711
|
+
icon: {
|
|
712
|
+
type: 'blueprint';
|
|
713
|
+
name: 'document';
|
|
714
|
+
color: 'blue';
|
|
715
|
+
};
|
|
716
|
+
implements: [];
|
|
717
|
+
interfaceMap: {};
|
|
718
|
+
inverseInterfaceMap: {};
|
|
719
|
+
links: {
|
|
720
|
+
Todos: $ObjectMetadata.Link<Todo, true>;
|
|
564
721
|
};
|
|
722
|
+
pluralDisplayName: 'Persons';
|
|
723
|
+
primaryKeyApiName: 'email';
|
|
724
|
+
primaryKeyType: 'string';
|
|
725
|
+
properties: {
|
|
726
|
+
/**
|
|
727
|
+
* (no ontology metadata)
|
|
728
|
+
*/
|
|
729
|
+
email: $PropertyDef<'string', 'non-nullable', 'single'>;
|
|
730
|
+
};
|
|
731
|
+
rid: 'ridForPerson';
|
|
732
|
+
status: 'ACTIVE';
|
|
733
|
+
titleProperty: 'email';
|
|
734
|
+
type: 'object';
|
|
565
735
|
};
|
|
566
|
-
|
|
567
|
-
rid: 'ri.ontology.main.action-type.9f84017d-cf17-4fa8-84c3-8e01e5d594f2';
|
|
568
|
-
status: 'ACTIVE';
|
|
569
|
-
type: 'action';
|
|
736
|
+
}
|
|
570
737
|
|
|
571
|
-
|
|
738
|
+
export const Person: Person = {
|
|
739
|
+
type: 'object',
|
|
740
|
+
apiName: 'Person',
|
|
741
|
+
osdkMetadata: $osdkMetadata,
|
|
572
742
|
};
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
743
|
+
",
|
|
744
|
+
"/foo/ontology/objects/Todo.ts": "import type { PropertyDef as $PropertyDef } from '@osdk/client';
|
|
745
|
+
import { $osdkMetadata } from '../../OntologyMetadata.js';
|
|
746
|
+
import type { $ExpectedClientVersion } from '../../OntologyMetadata.js';
|
|
747
|
+
import type { Person } from './Person.js';
|
|
748
|
+
import type {
|
|
749
|
+
PropertyKeys as $PropertyKeys,
|
|
750
|
+
ObjectTypeDefinition as $ObjectTypeDefinition,
|
|
751
|
+
ObjectMetadata as $ObjectMetadata,
|
|
752
|
+
} from '@osdk/client';
|
|
753
|
+
import type {
|
|
754
|
+
ObjectSet as $ObjectSet,
|
|
755
|
+
Osdk as $Osdk,
|
|
756
|
+
OsdkObject as $OsdkObject,
|
|
757
|
+
PropertyValueWireToClient as $PropType,
|
|
758
|
+
SingleLinkAccessor as $SingleLinkAccessor,
|
|
759
|
+
} from '@osdk/client';
|
|
577
760
|
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
type: 'action',
|
|
581
|
-
osdkMetadata: $osdkMetadata,
|
|
582
|
-
};
|
|
583
|
-
",
|
|
584
|
-
"/foo/ontology/interfaces.ts": "export { SomeInterface } from './interfaces/SomeInterface';
|
|
585
|
-
",
|
|
586
|
-
"/foo/ontology/interfaces/SomeInterface.ts": "import type { PropertyDef as $PropertyDef } from '@osdk/client';
|
|
587
|
-
import { $osdkMetadata } from '../../OntologyMetadata';
|
|
588
|
-
|
|
589
|
-
import type {
|
|
590
|
-
InterfaceDefinition as $InterfaceDefinition,
|
|
591
|
-
ObjectSet as $ObjectSet,
|
|
592
|
-
Osdk as $Osdk,
|
|
593
|
-
PropertyValueWireToClient as $PropType,
|
|
594
|
-
} from '@osdk/client';
|
|
595
|
-
|
|
596
|
-
export type OsdkObjectLinks$SomeInterface = {};
|
|
597
|
-
|
|
598
|
-
export namespace SomeInterface {
|
|
599
|
-
export type PropertyKeys = 'SomeProperty';
|
|
600
|
-
|
|
601
|
-
export interface Props {
|
|
602
|
-
readonly SomeProperty: $PropType['string'] | undefined;
|
|
603
|
-
}
|
|
604
|
-
export type StrictProps = Props;
|
|
761
|
+
export namespace Todo {
|
|
762
|
+
export type PropertyKeys = 'id' | 'body' | 'complete';
|
|
605
763
|
|
|
606
|
-
|
|
764
|
+
export interface Links {
|
|
765
|
+
readonly Assignee: $SingleLinkAccessor<Person>;
|
|
766
|
+
}
|
|
607
767
|
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
768
|
+
export interface Props {
|
|
769
|
+
readonly body: $PropType['string'] | undefined;
|
|
770
|
+
readonly complete: $PropType['boolean'] | undefined;
|
|
771
|
+
readonly id: $PropType['integer'];
|
|
772
|
+
}
|
|
773
|
+
export type StrictProps = Props;
|
|
612
774
|
|
|
613
|
-
|
|
614
|
-
export type OsdkObject<
|
|
615
|
-
OPTIONS extends never | '$rid' = never,
|
|
616
|
-
K extends keyof SomeInterface.Props = keyof SomeInterface.Props,
|
|
617
|
-
> = OsdkInstance<OPTIONS, K>;
|
|
618
|
-
}
|
|
775
|
+
export interface ObjectSet extends $ObjectSet<Todo, Todo.ObjectSet> {}
|
|
619
776
|
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
__DefinitionMetadata?: {
|
|
625
|
-
objectSet: SomeInterface.ObjectSet;
|
|
626
|
-
props: SomeInterface.Props;
|
|
627
|
-
linksType: OsdkObjectLinks$SomeInterface;
|
|
628
|
-
strictProps: SomeInterface.StrictProps;
|
|
629
|
-
apiName: 'SomeInterface';
|
|
630
|
-
description: 'Some interface';
|
|
631
|
-
displayName: 'Sum Interface';
|
|
632
|
-
implementedBy: [];
|
|
633
|
-
implements: [];
|
|
634
|
-
links: {};
|
|
635
|
-
properties: {
|
|
636
|
-
/**
|
|
637
|
-
* display name: 'Sum Property',
|
|
638
|
-
* description: Some property
|
|
639
|
-
*/
|
|
640
|
-
SomeProperty: $PropertyDef<'string', 'nullable', 'single'>;
|
|
641
|
-
};
|
|
642
|
-
rid: 'idk';
|
|
643
|
-
type: 'interface';
|
|
644
|
-
};
|
|
645
|
-
}
|
|
777
|
+
export type OsdkInstance<
|
|
778
|
+
OPTIONS extends never | '$rid' = never,
|
|
779
|
+
K extends keyof Todo.Props = keyof Todo.Props,
|
|
780
|
+
> = $Osdk.Instance<Todo, OPTIONS, K>;
|
|
646
781
|
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
",
|
|
653
|
-
"/foo/ontology/objects.ts": "export { Person } from './objects/Person';
|
|
654
|
-
export { Todo } from './objects/Todo';
|
|
655
|
-
",
|
|
656
|
-
"/foo/ontology/objects/Person.ts": "import type { PropertyDef as $PropertyDef } from '@osdk/client';
|
|
657
|
-
import { $osdkMetadata } from '../../OntologyMetadata';
|
|
658
|
-
import type { $ExpectedClientVersion } from '../../OntologyMetadata';
|
|
659
|
-
import type { Todo } from './Todo';
|
|
660
|
-
import type {
|
|
661
|
-
PropertyKeys as $PropertyKeys,
|
|
662
|
-
ObjectTypeDefinition as $ObjectTypeDefinition,
|
|
663
|
-
ObjectMetadata as $ObjectMetadata,
|
|
664
|
-
} from '@osdk/client';
|
|
665
|
-
import type {
|
|
666
|
-
ObjectSet as $ObjectSet,
|
|
667
|
-
Osdk as $Osdk,
|
|
668
|
-
OsdkObject as $OsdkObject,
|
|
669
|
-
PropertyValueWireToClient as $PropType,
|
|
670
|
-
SingleLinkAccessor as $SingleLinkAccessor,
|
|
671
|
-
} from '@osdk/client';
|
|
672
|
-
|
|
673
|
-
export namespace Person {
|
|
674
|
-
export type PropertyKeys = 'email';
|
|
675
|
-
|
|
676
|
-
export interface Links {
|
|
677
|
-
readonly Todos: Todo.ObjectSet;
|
|
782
|
+
/** @deprecated use OsdkInstance */
|
|
783
|
+
export type OsdkObject<
|
|
784
|
+
OPTIONS extends never | '$rid' = never,
|
|
785
|
+
K extends keyof Todo.Props = keyof Todo.Props,
|
|
786
|
+
> = OsdkInstance<OPTIONS, K>;
|
|
678
787
|
}
|
|
679
788
|
|
|
680
|
-
export interface
|
|
681
|
-
|
|
789
|
+
export interface Todo extends $ObjectTypeDefinition {
|
|
790
|
+
osdkMetadata: typeof $osdkMetadata;
|
|
791
|
+
type: 'object';
|
|
792
|
+
apiName: 'Todo';
|
|
793
|
+
__DefinitionMetadata?: {
|
|
794
|
+
objectSet: Todo.ObjectSet;
|
|
795
|
+
props: Todo.Props;
|
|
796
|
+
linksType: Todo.Links;
|
|
797
|
+
strictProps: Todo.StrictProps;
|
|
798
|
+
apiName: 'Todo';
|
|
799
|
+
description: 'Its a todo item.';
|
|
800
|
+
displayName: 'AwesomeTodoDisplayname';
|
|
801
|
+
icon: {
|
|
802
|
+
type: 'blueprint';
|
|
803
|
+
name: 'document';
|
|
804
|
+
color: 'blue';
|
|
805
|
+
};
|
|
806
|
+
implements: ['SomeInterface'];
|
|
807
|
+
interfaceMap: {
|
|
808
|
+
SomeInterface: {
|
|
809
|
+
SomeProperty: 'body';
|
|
810
|
+
};
|
|
811
|
+
};
|
|
812
|
+
inverseInterfaceMap: {
|
|
813
|
+
SomeInterface: {
|
|
814
|
+
body: 'SomeProperty';
|
|
815
|
+
};
|
|
816
|
+
};
|
|
817
|
+
links: {
|
|
818
|
+
Assignee: $ObjectMetadata.Link<Person, false>;
|
|
819
|
+
};
|
|
820
|
+
pluralDisplayName: 'AwesomeTodoDisplayNames';
|
|
821
|
+
primaryKeyApiName: 'id';
|
|
822
|
+
primaryKeyType: 'integer';
|
|
823
|
+
properties: {
|
|
824
|
+
/**
|
|
825
|
+
* display name: 'Body',
|
|
826
|
+
* description: The text of the todo
|
|
827
|
+
*/
|
|
828
|
+
body: $PropertyDef<'string', 'nullable', 'single'>;
|
|
829
|
+
/**
|
|
830
|
+
* (no ontology metadata)
|
|
831
|
+
*/
|
|
832
|
+
complete: $PropertyDef<'boolean', 'nullable', 'single'>;
|
|
833
|
+
/**
|
|
834
|
+
* (no ontology metadata)
|
|
835
|
+
*/
|
|
836
|
+
id: $PropertyDef<'integer', 'non-nullable', 'single'>;
|
|
837
|
+
};
|
|
838
|
+
rid: 'ridForTodo';
|
|
839
|
+
status: 'ACTIVE';
|
|
840
|
+
titleProperty: 'body';
|
|
841
|
+
type: 'object';
|
|
842
|
+
};
|
|
682
843
|
}
|
|
683
|
-
export type StrictProps = Props;
|
|
684
|
-
|
|
685
|
-
export interface ObjectSet extends $ObjectSet<Person, Person.ObjectSet> {}
|
|
686
844
|
|
|
687
|
-
export
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
845
|
+
export const Todo: Todo = {
|
|
846
|
+
type: 'object',
|
|
847
|
+
apiName: 'Todo',
|
|
848
|
+
osdkMetadata: $osdkMetadata,
|
|
849
|
+
};
|
|
850
|
+
",
|
|
851
|
+
"/foo/ontology/queries.ts": "export { getCount } from './queries/getCount.js';
|
|
852
|
+
export { returnsTodo } from './queries/returnsTodo.js';
|
|
853
|
+
",
|
|
854
|
+
"/foo/ontology/queries/getCount.ts": "import type { QueryDefinition, QueryParam, QueryResult, VersionBound } from '@osdk/client';
|
|
855
|
+
import type { $ExpectedClientVersion } from '../../OntologyMetadata.js';
|
|
856
|
+
import { $osdkMetadata } from '../../OntologyMetadata.js';
|
|
691
857
|
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
> = OsdkInstance<OPTIONS, K>;
|
|
697
|
-
}
|
|
858
|
+
export namespace getCount {
|
|
859
|
+
export interface Signature {
|
|
860
|
+
(query: getCount.Parameters): Promise<getCount.ReturnType>;
|
|
861
|
+
}
|
|
698
862
|
|
|
699
|
-
|
|
700
|
-
osdkMetadata: typeof $osdkMetadata;
|
|
701
|
-
type: 'object';
|
|
702
|
-
apiName: 'Person';
|
|
703
|
-
__DefinitionMetadata?: {
|
|
704
|
-
objectSet: Person.ObjectSet;
|
|
705
|
-
props: Person.Props;
|
|
706
|
-
linksType: Person.Links;
|
|
707
|
-
strictProps: Person.StrictProps;
|
|
708
|
-
apiName: 'Person';
|
|
709
|
-
description: 'A person';
|
|
710
|
-
displayName: 'Person';
|
|
711
|
-
icon: {
|
|
712
|
-
type: 'blueprint';
|
|
713
|
-
name: 'document';
|
|
714
|
-
color: 'blue';
|
|
715
|
-
};
|
|
716
|
-
implements: [];
|
|
717
|
-
interfaceMap: {};
|
|
718
|
-
inverseInterfaceMap: {};
|
|
719
|
-
links: {
|
|
720
|
-
Todos: $ObjectMetadata.Link<Todo, true>;
|
|
721
|
-
};
|
|
722
|
-
pluralDisplayName: 'Persons';
|
|
723
|
-
primaryKeyApiName: 'email';
|
|
724
|
-
primaryKeyType: 'string';
|
|
725
|
-
properties: {
|
|
863
|
+
export interface Parameters {
|
|
726
864
|
/**
|
|
727
865
|
* (no ontology metadata)
|
|
728
866
|
*/
|
|
729
|
-
|
|
730
|
-
}
|
|
731
|
-
rid: 'ridForPerson';
|
|
732
|
-
status: 'ACTIVE';
|
|
733
|
-
titleProperty: 'email';
|
|
734
|
-
type: 'object';
|
|
735
|
-
};
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
export const Person: Person = {
|
|
739
|
-
type: 'object',
|
|
740
|
-
apiName: 'Person',
|
|
741
|
-
osdkMetadata: $osdkMetadata,
|
|
742
|
-
};
|
|
743
|
-
",
|
|
744
|
-
"/foo/ontology/objects/Todo.ts": "import type { PropertyDef as $PropertyDef } from '@osdk/client';
|
|
745
|
-
import { $osdkMetadata } from '../../OntologyMetadata';
|
|
746
|
-
import type { $ExpectedClientVersion } from '../../OntologyMetadata';
|
|
747
|
-
import type { Person } from './Person';
|
|
748
|
-
import type {
|
|
749
|
-
PropertyKeys as $PropertyKeys,
|
|
750
|
-
ObjectTypeDefinition as $ObjectTypeDefinition,
|
|
751
|
-
ObjectMetadata as $ObjectMetadata,
|
|
752
|
-
} from '@osdk/client';
|
|
753
|
-
import type {
|
|
754
|
-
ObjectSet as $ObjectSet,
|
|
755
|
-
Osdk as $Osdk,
|
|
756
|
-
OsdkObject as $OsdkObject,
|
|
757
|
-
PropertyValueWireToClient as $PropType,
|
|
758
|
-
SingleLinkAccessor as $SingleLinkAccessor,
|
|
759
|
-
} from '@osdk/client';
|
|
760
|
-
|
|
761
|
-
export namespace Todo {
|
|
762
|
-
export type PropertyKeys = 'id' | 'body' | 'complete';
|
|
763
|
-
|
|
764
|
-
export interface Links {
|
|
765
|
-
readonly Assignee: $SingleLinkAccessor<Person>;
|
|
766
|
-
}
|
|
867
|
+
readonly completed: QueryParam.PrimitiveType<'boolean'>;
|
|
868
|
+
}
|
|
767
869
|
|
|
768
|
-
|
|
769
|
-
readonly body: $PropType['string'] | undefined;
|
|
770
|
-
readonly complete: $PropType['boolean'] | undefined;
|
|
771
|
-
readonly id: $PropType['integer'];
|
|
870
|
+
export type ReturnType = QueryResult.PrimitiveType<'integer'>;
|
|
772
871
|
}
|
|
773
|
-
export type StrictProps = Props;
|
|
774
|
-
|
|
775
|
-
export interface ObjectSet extends $ObjectSet<Todo, Todo.ObjectSet> {}
|
|
776
872
|
|
|
777
|
-
export
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
type: 'object';
|
|
792
|
-
apiName: 'Todo';
|
|
793
|
-
__DefinitionMetadata?: {
|
|
794
|
-
objectSet: Todo.ObjectSet;
|
|
795
|
-
props: Todo.Props;
|
|
796
|
-
linksType: Todo.Links;
|
|
797
|
-
strictProps: Todo.StrictProps;
|
|
798
|
-
apiName: 'Todo';
|
|
799
|
-
description: 'Its a todo item.';
|
|
800
|
-
displayName: 'AwesomeTodoDisplayname';
|
|
801
|
-
icon: {
|
|
802
|
-
type: 'blueprint';
|
|
803
|
-
name: 'document';
|
|
804
|
-
color: 'blue';
|
|
805
|
-
};
|
|
806
|
-
implements: ['SomeInterface'];
|
|
807
|
-
interfaceMap: {
|
|
808
|
-
SomeInterface: {
|
|
809
|
-
SomeProperty: 'body';
|
|
873
|
+
export interface getCount extends QueryDefinition<getCount.Signature>, VersionBound<$ExpectedClientVersion> {
|
|
874
|
+
__DefinitionMetadata?: {
|
|
875
|
+
apiName: 'getCount';
|
|
876
|
+
rid: 'rid.query.1';
|
|
877
|
+
type: 'query';
|
|
878
|
+
version: '0';
|
|
879
|
+
parameters: {
|
|
880
|
+
/**
|
|
881
|
+
* (no ontology metadata)
|
|
882
|
+
*/
|
|
883
|
+
completed: {
|
|
884
|
+
nullable: false;
|
|
885
|
+
type: 'boolean';
|
|
886
|
+
};
|
|
810
887
|
};
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
body: 'SomeProperty';
|
|
888
|
+
output: {
|
|
889
|
+
nullable: false;
|
|
890
|
+
type: 'integer';
|
|
815
891
|
};
|
|
892
|
+
signature: getCount.Signature;
|
|
816
893
|
};
|
|
817
|
-
links: {
|
|
818
|
-
Assignee: $ObjectMetadata.Link<Person, false>;
|
|
819
|
-
};
|
|
820
|
-
pluralDisplayName: 'AwesomeTodoDisplayNames';
|
|
821
|
-
primaryKeyApiName: 'id';
|
|
822
|
-
primaryKeyType: 'integer';
|
|
823
|
-
properties: {
|
|
824
|
-
/**
|
|
825
|
-
* display name: 'Body',
|
|
826
|
-
* description: The text of the todo
|
|
827
|
-
*/
|
|
828
|
-
body: $PropertyDef<'string', 'nullable', 'single'>;
|
|
829
|
-
/**
|
|
830
|
-
* (no ontology metadata)
|
|
831
|
-
*/
|
|
832
|
-
complete: $PropertyDef<'boolean', 'nullable', 'single'>;
|
|
833
|
-
/**
|
|
834
|
-
* (no ontology metadata)
|
|
835
|
-
*/
|
|
836
|
-
id: $PropertyDef<'integer', 'non-nullable', 'single'>;
|
|
837
|
-
};
|
|
838
|
-
rid: 'ridForTodo';
|
|
839
|
-
status: 'ACTIVE';
|
|
840
|
-
titleProperty: 'body';
|
|
841
|
-
type: 'object';
|
|
842
|
-
};
|
|
843
|
-
}
|
|
844
|
-
|
|
845
|
-
export const Todo: Todo = {
|
|
846
|
-
type: 'object',
|
|
847
|
-
apiName: 'Todo',
|
|
848
|
-
osdkMetadata: $osdkMetadata,
|
|
849
|
-
};
|
|
850
|
-
",
|
|
851
|
-
"/foo/ontology/queries.ts": "export { getCount } from './queries/getCount';
|
|
852
|
-
export { returnsTodo } from './queries/returnsTodo';
|
|
853
|
-
",
|
|
854
|
-
"/foo/ontology/queries/getCount.ts": "import type { QueryDefinition, QueryParam, QueryResult, VersionBound } from '@osdk/client';
|
|
855
|
-
import type { $ExpectedClientVersion } from '../../OntologyMetadata';
|
|
856
|
-
import { $osdkMetadata } from '../../OntologyMetadata';
|
|
857
|
-
|
|
858
|
-
export namespace getCount {
|
|
859
|
-
export interface Signature {
|
|
860
|
-
(query: getCount.Parameters): Promise<getCount.ReturnType>;
|
|
861
|
-
}
|
|
862
|
-
|
|
863
|
-
export interface Parameters {
|
|
864
|
-
/**
|
|
865
|
-
* (no ontology metadata)
|
|
866
|
-
*/
|
|
867
|
-
readonly completed: QueryParam.PrimitiveType<'boolean'>;
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
export type ReturnType = QueryResult.PrimitiveType<'integer'>;
|
|
871
|
-
}
|
|
872
|
-
|
|
873
|
-
export interface getCount extends QueryDefinition<getCount.Signature>, VersionBound<$ExpectedClientVersion> {
|
|
874
|
-
__DefinitionMetadata?: {
|
|
875
894
|
apiName: 'getCount';
|
|
876
|
-
rid: 'rid.query.1';
|
|
877
895
|
type: 'query';
|
|
878
896
|
version: '0';
|
|
879
|
-
|
|
880
|
-
/**
|
|
881
|
-
* (no ontology metadata)
|
|
882
|
-
*/
|
|
883
|
-
completed: {
|
|
884
|
-
nullable: false;
|
|
885
|
-
type: 'boolean';
|
|
886
|
-
};
|
|
887
|
-
};
|
|
888
|
-
output: {
|
|
889
|
-
nullable: false;
|
|
890
|
-
type: 'integer';
|
|
891
|
-
};
|
|
892
|
-
signature: getCount.Signature;
|
|
893
|
-
};
|
|
894
|
-
apiName: 'getCount';
|
|
895
|
-
type: 'query';
|
|
896
|
-
version: '0';
|
|
897
|
-
osdkMetadata: typeof $osdkMetadata;
|
|
898
|
-
}
|
|
899
|
-
|
|
900
|
-
export const getCount: getCount = {
|
|
901
|
-
apiName: 'getCount',
|
|
902
|
-
type: 'query',
|
|
903
|
-
version: '0',
|
|
904
|
-
osdkMetadata: $osdkMetadata,
|
|
905
|
-
};
|
|
906
|
-
",
|
|
907
|
-
"/foo/ontology/queries/returnsTodo.ts": "import type { QueryDefinition, QueryParam, QueryResult, VersionBound } from '@osdk/client';
|
|
908
|
-
import type { $ExpectedClientVersion } from '../../OntologyMetadata';
|
|
909
|
-
import { $osdkMetadata } from '../../OntologyMetadata';
|
|
910
|
-
import type { Todo } from '../objects/Todo';
|
|
911
|
-
|
|
912
|
-
export namespace returnsTodo {
|
|
913
|
-
export interface Signature {
|
|
914
|
-
(query: returnsTodo.Parameters): Promise<returnsTodo.ReturnType>;
|
|
897
|
+
osdkMetadata: typeof $osdkMetadata;
|
|
915
898
|
}
|
|
916
899
|
|
|
917
|
-
export
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
}
|
|
900
|
+
export const getCount: getCount = {
|
|
901
|
+
apiName: 'getCount',
|
|
902
|
+
type: 'query',
|
|
903
|
+
version: '0',
|
|
904
|
+
osdkMetadata: $osdkMetadata,
|
|
905
|
+
};
|
|
906
|
+
",
|
|
907
|
+
"/foo/ontology/queries/returnsTodo.ts": "import type { QueryDefinition, QueryParam, QueryResult, VersionBound } from '@osdk/client';
|
|
908
|
+
import type { $ExpectedClientVersion } from '../../OntologyMetadata.js';
|
|
909
|
+
import { $osdkMetadata } from '../../OntologyMetadata.js';
|
|
910
|
+
import type { Todo } from '../objects/Todo.js';
|
|
923
911
|
|
|
924
|
-
export
|
|
925
|
-
|
|
912
|
+
export namespace returnsTodo {
|
|
913
|
+
export interface Signature {
|
|
914
|
+
(query: returnsTodo.Parameters): Promise<returnsTodo.ReturnType>;
|
|
915
|
+
}
|
|
926
916
|
|
|
927
|
-
|
|
928
|
-
__DefinitionMetadata?: {
|
|
929
|
-
apiName: 'returnsTodo';
|
|
930
|
-
rid: 'rid.query.2';
|
|
931
|
-
type: 'query';
|
|
932
|
-
version: '0';
|
|
933
|
-
parameters: {
|
|
917
|
+
export interface Parameters {
|
|
934
918
|
/**
|
|
935
919
|
* description: Random desc so we test jsdoc
|
|
936
920
|
*/
|
|
937
|
-
someTodo:
|
|
938
|
-
|
|
921
|
+
readonly someTodo: QueryParam.ObjectType<Todo>;
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
export type ReturnType = QueryResult.ObjectType<Todo>;
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
export interface returnsTodo extends QueryDefinition<returnsTodo.Signature>, VersionBound<$ExpectedClientVersion> {
|
|
928
|
+
__DefinitionMetadata?: {
|
|
929
|
+
apiName: 'returnsTodo';
|
|
930
|
+
rid: 'rid.query.2';
|
|
931
|
+
type: 'query';
|
|
932
|
+
version: '0';
|
|
933
|
+
parameters: {
|
|
934
|
+
/**
|
|
935
|
+
* description: Random desc so we test jsdoc
|
|
936
|
+
*/
|
|
937
|
+
someTodo: {
|
|
938
|
+
description: 'Random desc so we test jsdoc';
|
|
939
|
+
nullable: false;
|
|
940
|
+
object: 'Todo';
|
|
941
|
+
type: 'object';
|
|
942
|
+
__OsdkTargetType?: Todo;
|
|
943
|
+
};
|
|
944
|
+
};
|
|
945
|
+
output: {
|
|
939
946
|
nullable: false;
|
|
940
947
|
object: 'Todo';
|
|
941
948
|
type: 'object';
|
|
942
949
|
__OsdkTargetType?: Todo;
|
|
943
950
|
};
|
|
951
|
+
signature: returnsTodo.Signature;
|
|
944
952
|
};
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
};
|
|
951
|
-
signature: returnsTodo.Signature;
|
|
952
|
-
};
|
|
953
|
-
apiName: 'returnsTodo';
|
|
954
|
-
type: 'query';
|
|
955
|
-
version: '0';
|
|
956
|
-
osdkMetadata: typeof $osdkMetadata;
|
|
957
|
-
}
|
|
953
|
+
apiName: 'returnsTodo';
|
|
954
|
+
type: 'query';
|
|
955
|
+
version: '0';
|
|
956
|
+
osdkMetadata: typeof $osdkMetadata;
|
|
957
|
+
}
|
|
958
958
|
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
959
|
+
export const returnsTodo: returnsTodo = {
|
|
960
|
+
apiName: 'returnsTodo',
|
|
961
|
+
type: 'query',
|
|
962
|
+
version: '0',
|
|
963
|
+
osdkMetadata: $osdkMetadata,
|
|
964
|
+
};
|
|
965
|
+
",
|
|
966
|
+
}
|
|
967
|
+
`);
|
|
968
968
|
});
|
|
969
969
|
test("throws an error when target destination is not empty", async () => {
|
|
970
970
|
helper.minimalFiles.readdir = vi.fn(async () => ["file"]);
|