@pdc/sdk 0.8.1 → 0.9.2

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.
@@ -4,7 +4,7 @@ export interface ApplicationForm {
4
4
  readonly id: number;
5
5
  opportunityId: number;
6
6
  readonly version: number;
7
- fields?: Array<ApplicationFormField>;
7
+ fields: Array<ApplicationFormField>;
8
8
  readonly createdAt: Date;
9
9
  }
10
10
  export type WritableApplicationForm = Writable<ApplicationForm>;
@@ -4,7 +4,7 @@ export interface ApplicationFormField {
4
4
  readonly id: number;
5
5
  readonly applicationFormId: number;
6
6
  baseFieldId: number;
7
- baseField?: BaseField;
7
+ baseField: BaseField & any;
8
8
  position: number;
9
9
  label: string;
10
10
  readonly createdAt: Date;
@@ -2,9 +2,10 @@ import { Writable } from './Writable';
2
2
  export interface BaseField {
3
3
  readonly id: number;
4
4
  label: string;
5
- description?: string;
5
+ description: string;
6
6
  shortCode: string;
7
7
  dataType: BaseField.DataTypeEnum;
8
+ readonly scope: BaseField.ScopeEnum;
8
9
  readonly createdAt: Date;
9
10
  }
10
11
  export type WritableBaseField = Writable<BaseField>;
@@ -17,4 +18,8 @@ export declare namespace BaseField {
17
18
  Url = "url",
18
19
  Boolean = "boolean"
19
20
  }
21
+ enum ScopeEnum {
22
+ Proposal = "proposal",
23
+ Organization = "organization"
24
+ }
20
25
  }
@@ -12,4 +12,9 @@ var BaseField;
12
12
  DataTypeEnum["Url"] = "url";
13
13
  DataTypeEnum["Boolean"] = "boolean";
14
14
  })(DataTypeEnum = BaseField.DataTypeEnum || (BaseField.DataTypeEnum = {}));
15
+ let ScopeEnum;
16
+ (function (ScopeEnum) {
17
+ ScopeEnum["Proposal"] = "proposal";
18
+ ScopeEnum["Organization"] = "organization";
19
+ })(ScopeEnum = BaseField.ScopeEnum || (BaseField.ScopeEnum = {}));
15
20
  })(BaseField || (exports.BaseField = BaseField = {}));
@@ -1,12 +1,12 @@
1
1
  import { Writable } from './Writable';
2
2
  export interface BulkUpload {
3
- readonly id?: number;
3
+ readonly id: number;
4
4
  fileName: string;
5
5
  readonly fileSize?: number;
6
6
  sourceKey: string;
7
- readonly status?: BulkUpload.StatusEnum;
8
- readonly createdBy?: number;
9
- readonly createdAt?: Date;
7
+ readonly status: BulkUpload.StatusEnum;
8
+ readonly createdBy: number;
9
+ readonly createdAt: Date;
10
10
  }
11
11
  export type WritableBulkUpload = Writable<BulkUpload>;
12
12
  export declare namespace BulkUpload {
@@ -0,0 +1,4 @@
1
+ import { Writable } from './Writable';
2
+ export interface CreatedBy {
3
+ }
4
+ export type WritableCreatedBy = Writable<CreatedBy>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import { Opportunity } from './Opportunity';
2
+ import { Writable } from './Writable';
3
+ export interface OpportunityBundle {
4
+ entries: Array<Opportunity>;
5
+ }
6
+ export type WritableOpportunityBundle = Writable<OpportunityBundle>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +1,8 @@
1
1
  import { Writable } from './Writable';
2
2
  export interface Organization {
3
3
  readonly id: number;
4
- employerIdentificationNumber: string;
4
+ taxId: string;
5
+ employerIdentificationNumber?: string;
5
6
  name: string;
6
7
  readonly createdAt: Date;
7
8
  }
@@ -4,9 +4,9 @@ import { Writable } from './Writable';
4
4
  export interface OrganizationProposal {
5
5
  readonly id: number;
6
6
  organizationId: number;
7
- organization?: Organization & any;
7
+ organization: Organization & any;
8
8
  proposalId: number;
9
- proposal?: Proposal & any;
9
+ proposal: Proposal & any;
10
10
  readonly createdAt: Date;
11
11
  }
12
12
  export type WritableOrganizationProposal = Writable<OrganizationProposal>;
@@ -4,8 +4,8 @@ export interface Proposal {
4
4
  readonly id: number;
5
5
  opportunityId: number;
6
6
  externalId: string;
7
- readonly versions?: Array<ProposalVersion>;
7
+ readonly versions: Array<ProposalVersion>;
8
8
  readonly createdAt: Date;
9
- readonly createdBy?: number;
9
+ readonly createdBy: number;
10
10
  }
11
11
  export type WritableProposal = Writable<Proposal>;
@@ -4,7 +4,7 @@ export interface ProposalFieldValue {
4
4
  readonly id: number;
5
5
  readonly proposalVersionId: number;
6
6
  applicationFormFieldId: number;
7
- applicationFormField?: ApplicationFormField;
7
+ applicationFormField: ApplicationFormField & any;
8
8
  position: number;
9
9
  value: string;
10
10
  readonly isValid: boolean;
@@ -3,9 +3,9 @@ import { Writable } from './Writable';
3
3
  export interface ProposalVersion {
4
4
  readonly id: number;
5
5
  proposalId: number;
6
- applicationFormId?: number;
6
+ applicationFormId: number;
7
7
  readonly version: number;
8
- fieldValues?: Array<ProposalFieldValue>;
8
+ fieldValues: Array<ProposalFieldValue>;
9
9
  readonly createdAt: Date;
10
10
  }
11
11
  export type WritableProposalVersion = Writable<ProposalVersion>;
@@ -4,7 +4,9 @@ export * from './ApplicationFormField';
4
4
  export * from './BaseField';
5
5
  export * from './BulkUpload';
6
6
  export * from './Bundle';
7
+ export * from './CreatedBy';
7
8
  export * from './Opportunity';
9
+ export * from './OpportunityBundle';
8
10
  export * from './Organization';
9
11
  export * from './OrganizationBundle';
10
12
  export * from './OrganizationProposal';
@@ -20,7 +20,9 @@ __exportStar(require("./ApplicationFormField"), exports);
20
20
  __exportStar(require("./BaseField"), exports);
21
21
  __exportStar(require("./BulkUpload"), exports);
22
22
  __exportStar(require("./Bundle"), exports);
23
+ __exportStar(require("./CreatedBy"), exports);
23
24
  __exportStar(require("./Opportunity"), exports);
25
+ __exportStar(require("./OpportunityBundle"), exports);
24
26
  __exportStar(require("./Organization"), exports);
25
27
  __exportStar(require("./OrganizationBundle"), exports);
26
28
  __exportStar(require("./OrganizationProposal"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pdc/sdk",
3
- "version": "0.8.1",
3
+ "version": "0.9.2",
4
4
  "description": "A swagger client for the Philanthropy Data Commons (PDC)",
5
5
  "author": "Open Tech Strategies",
6
6
  "keywords": [
@@ -7,7 +7,7 @@ export interface ApplicationForm {
7
7
  readonly id: number;
8
8
  opportunityId: number;
9
9
  readonly version: number;
10
- fields?: Array<ApplicationFormField>;
10
+ fields: Array<ApplicationFormField>;
11
11
  readonly createdAt: Date;
12
12
  }
13
13
 
@@ -7,7 +7,7 @@ export interface ApplicationFormField {
7
7
  readonly id: number;
8
8
  readonly applicationFormId: number;
9
9
  baseFieldId: number;
10
- baseField?: BaseField;
10
+ baseField: BaseField & any;
11
11
  position: number;
12
12
  label: string;
13
13
  readonly createdAt: Date;
@@ -3,9 +3,10 @@ import { Writable } from './Writable';
3
3
  export interface BaseField {
4
4
  readonly id: number;
5
5
  label: string;
6
- description?: string;
6
+ description: string;
7
7
  shortCode: string;
8
8
  dataType: BaseField.DataTypeEnum;
9
+ readonly scope: BaseField.ScopeEnum;
9
10
  readonly createdAt: Date;
10
11
  }
11
12
 
@@ -20,4 +21,8 @@ export namespace BaseField {
20
21
  Url = 'url',
21
22
  Boolean = 'boolean'
22
23
  }
24
+ export enum ScopeEnum {
25
+ Proposal = 'proposal',
26
+ Organization = 'organization'
27
+ }
23
28
  }
@@ -1,13 +1,13 @@
1
1
  import { Writable } from './Writable';
2
2
 
3
3
  export interface BulkUpload {
4
- readonly id?: number;
4
+ readonly id: number;
5
5
  fileName: string;
6
6
  readonly fileSize?: number;
7
7
  sourceKey: string;
8
- readonly status?: BulkUpload.StatusEnum;
9
- readonly createdBy?: number;
10
- readonly createdAt?: Date;
8
+ readonly status: BulkUpload.StatusEnum;
9
+ readonly createdBy: number;
10
+ readonly createdAt: Date;
11
11
  }
12
12
 
13
13
  export type WritableBulkUpload = Writable<BulkUpload>
@@ -0,0 +1,8 @@
1
+ import { Writable } from './Writable';
2
+
3
+ export interface CreatedBy {
4
+ }
5
+
6
+ export type WritableCreatedBy = Writable<CreatedBy>
7
+
8
+
@@ -0,0 +1,15 @@
1
+ import {
2
+ Bundle,
3
+ } from './Bundle';
4
+ import {
5
+ Opportunity,
6
+ } from './Opportunity';
7
+ import { Writable } from './Writable';
8
+
9
+ export interface OpportunityBundle {
10
+ entries: Array<Opportunity>;
11
+ }
12
+
13
+ export type WritableOpportunityBundle = Writable<OpportunityBundle>
14
+
15
+
@@ -2,7 +2,8 @@ import { Writable } from './Writable';
2
2
 
3
3
  export interface Organization {
4
4
  readonly id: number;
5
- employerIdentificationNumber: string;
5
+ taxId: string;
6
+ employerIdentificationNumber?: string;
6
7
  name: string;
7
8
  readonly createdAt: Date;
8
9
  }
@@ -9,9 +9,9 @@ import { Writable } from './Writable';
9
9
  export interface OrganizationProposal {
10
10
  readonly id: number;
11
11
  organizationId: number;
12
- organization?: Organization & any;
12
+ organization: Organization & any;
13
13
  proposalId: number;
14
- proposal?: Proposal & any;
14
+ proposal: Proposal & any;
15
15
  readonly createdAt: Date;
16
16
  }
17
17
 
@@ -7,9 +7,9 @@ export interface Proposal {
7
7
  readonly id: number;
8
8
  opportunityId: number;
9
9
  externalId: string;
10
- readonly versions?: Array<ProposalVersion>;
10
+ readonly versions: Array<ProposalVersion>;
11
11
  readonly createdAt: Date;
12
- readonly createdBy?: number;
12
+ readonly createdBy: number;
13
13
  }
14
14
 
15
15
  export type WritableProposal = Writable<Proposal>
@@ -7,7 +7,7 @@ export interface ProposalFieldValue {
7
7
  readonly id: number;
8
8
  readonly proposalVersionId: number;
9
9
  applicationFormFieldId: number;
10
- applicationFormField?: ApplicationFormField;
10
+ applicationFormField: ApplicationFormField & any;
11
11
  position: number;
12
12
  value: string;
13
13
  readonly isValid: boolean;
@@ -6,9 +6,9 @@ import { Writable } from './Writable';
6
6
  export interface ProposalVersion {
7
7
  readonly id: number;
8
8
  proposalId: number;
9
- applicationFormId?: number;
9
+ applicationFormId: number;
10
10
  readonly version: number;
11
- fieldValues?: Array<ProposalFieldValue>;
11
+ fieldValues: Array<ProposalFieldValue>;
12
12
  readonly createdAt: Date;
13
13
  }
14
14
 
@@ -4,7 +4,9 @@ export * from './ApplicationFormField';
4
4
  export * from './BaseField';
5
5
  export * from './BulkUpload';
6
6
  export * from './Bundle';
7
+ export * from './CreatedBy';
7
8
  export * from './Opportunity';
9
+ export * from './OpportunityBundle';
8
10
  export * from './Organization';
9
11
  export * from './OrganizationBundle';
10
12
  export * from './OrganizationProposal';