-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* starting queries work * first pass, no tests * refactor * progress * Get objects working * object set support * add obejctset supoprt * remove console logs * remove newlines * remove unsused endpoints file * add 2d agg input support * 3d agg test * a little cleanup * fix empty index files * start addressing PR comments * codegen cleanup * only use provider for object defs * clean up bucket types * a little more codegen cleanup * nullable checks * add changeset
- Loading branch information
Showing
34 changed files
with
1,584 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
"@osdk/legacy-client": minor | ||
"@osdk/shared.test": minor | ||
"@osdk/client.api": minor | ||
"@osdk/generator": minor | ||
"@osdk/client": minor | ||
"@osdk/api": minor | ||
--- | ||
|
||
Add support for queries in 2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
examples-extra/basic/sdk/src/generatedNoCheck/ontology/queries/getTodoCount.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { QueryDefinition } from '@osdk/api'; | ||
|
||
export const getTodoCount = { | ||
apiName: 'getTodoCount', | ||
type: 'query', | ||
version: '0.1.2', | ||
parameters: {}, | ||
output: { nullable: false, type: 'integer' }, | ||
} satisfies QueryDefinition<'getTodoCount', never>; |
2 changes: 2 additions & 0 deletions
2
examples-extra/basic/sdk/src/generatedNoCheck/ontology/queries/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './getTodoCount.js'; | ||
export * from './queryTakesAllParameterTypes.js'; |
111 changes: 111 additions & 0 deletions
111
...ples-extra/basic/sdk/src/generatedNoCheck/ontology/queries/queryTakesAllParameterTypes.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
import { QueryDefinition } from '@osdk/api'; | ||
import { Todo } from '../objects.js'; | ||
export const queryTakesAllParameterTypes = { | ||
apiName: 'queryTakesAllParameterTypes', | ||
description: 'description of the query that takes all parameter types', | ||
displayName: 'qTAPT', | ||
type: 'query', | ||
version: 'version', | ||
parameters: { | ||
double: { description: 'a double parameter', nullable: false, type: 'double' }, | ||
float: { nullable: false, type: 'float' }, | ||
integer: { nullable: false, type: 'integer' }, | ||
long: { nullable: false, type: 'long' }, | ||
attachment: { nullable: false, type: 'attachment' }, | ||
boolean: { nullable: false, type: 'boolean' }, | ||
date: { nullable: false, type: 'date' }, | ||
string: { nullable: false, type: 'string' }, | ||
timestamp: { nullable: false, type: 'timestamp' }, | ||
object: { | ||
nullable: false, | ||
object: 'Todo', | ||
type: 'object', | ||
|
||
__OsdkTargetType: Todo, | ||
}, | ||
objectSet: { | ||
nullable: false, | ||
objectSet: 'Todo', | ||
type: 'objectSet', | ||
|
||
__OsdkTargetType: Todo, | ||
}, | ||
array: { description: 'an array of strings', multiplicity: true, nullable: false, type: 'string' }, | ||
set: { | ||
description: 'a set of strings', | ||
nullable: false, | ||
set: { | ||
type: 'string', | ||
nullable: false, | ||
}, | ||
type: 'set', | ||
}, | ||
unionNonNullable: { | ||
description: 'a union of strings and integers', | ||
nullable: false, | ||
type: 'union', | ||
union: [ | ||
{ | ||
type: 'string', | ||
nullable: false, | ||
}, | ||
{ | ||
type: 'integer', | ||
nullable: false, | ||
}, | ||
], | ||
}, | ||
unionNullable: { | ||
description: 'a union of strings and integers but its optional', | ||
nullable: true, | ||
type: 'union', | ||
union: [ | ||
{ | ||
type: 'string', | ||
nullable: false, | ||
}, | ||
{ | ||
type: 'integer', | ||
nullable: false, | ||
}, | ||
], | ||
}, | ||
struct: { | ||
description: 'a struct with some fields', | ||
nullable: false, | ||
struct: { | ||
name: { | ||
type: 'string', | ||
nullable: false, | ||
}, | ||
id: { | ||
type: 'integer', | ||
nullable: false, | ||
}, | ||
}, | ||
type: 'struct', | ||
}, | ||
twoDimensionalAggregation: { | ||
nullable: false, | ||
twoDimensionalAggregation: { | ||
keyType: 'string', | ||
valueType: 'double', | ||
}, | ||
type: 'twoDimensionalAggregation', | ||
}, | ||
threeDimensionalAggregation: { | ||
nullable: false, | ||
threeDimensionalAggregation: { | ||
keyType: 'range', | ||
keySubtype: 'date', | ||
valueType: { | ||
keyType: 'range', | ||
keySubtype: 'timestamp', | ||
valueType: 'date', | ||
}, | ||
}, | ||
type: 'threeDimensionalAggregation', | ||
}, | ||
}, | ||
output: { nullable: false, type: 'string' }, | ||
} satisfies QueryDefinition<'queryTakesAllParameterTypes', 'Todo'>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
examples-extra/docs_example/src/generatedNoCheck/ontology/queries/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
examples-extra/todoapp/src/generatedNoCheck2/ontology/queries/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.