@arrowsphere/api-client 3.201.0 → 3.202.0-rc-bdj-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.
@@ -1,18 +1,35 @@
1
1
  import { PartnerType } from './company';
2
2
  import { ContactsType } from './contact';
3
+ import { PartnertagType } from './partnertag';
3
4
  import { GraphqlApiProgramLevelType, GraphqlApiProgramType } from './program';
4
5
  export declare type SubscriptionType = {
5
6
  id?: number;
7
+ agreement?: GraphqlApiSubscriptionAgreementType;
6
8
  autoReporting?: boolean;
7
9
  company?: PartnerType;
10
+ ctaValidatedAt?: string;
11
+ demandedAt?: string;
12
+ enabled?: boolean;
8
13
  endedAt?: string;
9
14
  level?: GraphqlApiProgramLevelType;
10
15
  localContact?: ContactsType;
11
16
  orderId?: string;
12
17
  partnerContact?: ContactsType;
13
18
  partnerId?: string;
19
+ partnerTags?: PartnertagType[];
14
20
  program?: GraphqlApiProgramType;
15
21
  startedAt?: string;
22
+ status?: GraphqlApiSubscriptionStatusType;
23
+ updatedAt?: string;
16
24
  userNote?: string;
17
25
  validatedAt?: string;
18
26
  };
27
+ export declare type GraphqlApiSubscriptionStatusType = {
28
+ id?: number;
29
+ name?: string;
30
+ };
31
+ export declare type GraphqlApiSubscriptionAgreementType = {
32
+ id?: number;
33
+ lastVersion?: number;
34
+ total?: number;
35
+ };
@@ -137,10 +137,13 @@ declare type MissingFieldsOfStaffSchema = {
137
137
  };
138
138
  export declare type GraphqlApiStaffSchema = Merge<Schema<GraphqlApiStaffType, boolean>, MissingFieldsOfStaffSchema>;
139
139
  export declare type GraphqlApiContributorRoleSchema = Schema<GraphqlApiContributorRoleType, boolean>;
140
+ declare type MissingFieldsOfSubscriptionSchema = {
141
+ partnerTags?: PartnertagSchema;
142
+ };
143
+ export declare type SubscriptionSchema = Merge<Schema<SubscriptionType, boolean>, MissingFieldsOfSubscriptionSchema>;
140
144
  export declare type ReportStatusSchema = Schema<GraphqlApiReportStatusType, boolean>;
141
145
  export declare type SpecialPriceRateSchema = Schema<SpecialPriceRateType, boolean>;
142
146
  export declare type SubscribedProgramSchema = Schema<SubscribedProgramType, boolean>;
143
- export declare type SubscriptionSchema = Schema<SubscriptionType, boolean>;
144
147
  export declare type UserHistorySchema = Schema<UserHistoryType, boolean>;
145
148
  export declare type WorkgroupSchema = Schema<WorkgroupType, boolean>;
146
149
  export declare type SelectAllResultSchema = {
@@ -1,3 +1,4 @@
1
1
  export * from './entities/subscription';
2
2
  export * from './entities/subscriptionsListResult';
3
3
  export * from './subscriptionsClient';
4
+ export * from './types/subscriptionStatus';
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./entities/subscription"), exports);
18
18
  __exportStar(require("./entities/subscriptionsListResult"), exports);
19
19
  __exportStar(require("./subscriptionsClient"), exports);
20
+ __exportStar(require("./types/subscriptionStatus"), exports);
20
21
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Class SubscriptionsClient
3
3
  */
4
- import { AbstractRestfulClient } from '../abstractRestfulClient';
4
+ import { AbstractRestfulClient, Parameters } from '../abstractRestfulClient';
5
5
  import { SubscriptionData } from './entities/subscription';
6
6
  import { SubscriptionsListResult } from './entities/subscriptionsListResult';
7
7
  export declare type SubscriptionsListPayload = {
@@ -101,4 +101,5 @@ export declare class SubscriptionsClient extends AbstractRestfulClient {
101
101
  list(filters?: SubscriptionsListPayload): Promise<PartnerSubscriptionsListData>;
102
102
  listAdmin(filters?: SubscriptionsListPayload, perPage?: number, page?: number): Promise<SubscriptionsListResult>;
103
103
  addSubscription(filters: SubscriptionCreationData): Promise<CreateSubscriptionData>;
104
+ validate(subscriptionReference: string, parameters?: Parameters): Promise<void>;
104
105
  }
@@ -57,6 +57,10 @@ class SubscriptionsClient extends abstractRestfulClient_1.AbstractRestfulClient
57
57
  async addSubscription(filters) {
58
58
  return this.post(filters);
59
59
  }
60
+ async validate(subscriptionReference, parameters = {}) {
61
+ this.path = `/${subscriptionReference}/validateCTA`;
62
+ return this.post({}, parameters);
63
+ }
60
64
  }
61
65
  exports.SubscriptionsClient = SubscriptionsClient;
62
66
  //# sourceMappingURL=subscriptionsClient.js.map
@@ -0,0 +1,11 @@
1
+ export declare enum SubscriptionStatusEnum {
2
+ ENDED = "Ended",
3
+ ERROR = "Error",
4
+ IN_PROGRESS = "In progress",
5
+ MIGRATION_FAILED = "Migration failed",
6
+ MIGRATION_IN_PROGRESS = "Migration in progress",
7
+ ONGOING_VALIDATION = "Ongoing Validation",
8
+ PENDING_ACCEPTANCE_OF_CTA = "Pending user's acceptance of CTA",
9
+ PENDING_VALIDATION = "Pending validation",
10
+ VALIDATED = "Validated"
11
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionStatusEnum = void 0;
4
+ var SubscriptionStatusEnum;
5
+ (function (SubscriptionStatusEnum) {
6
+ SubscriptionStatusEnum["ENDED"] = "Ended";
7
+ SubscriptionStatusEnum["ERROR"] = "Error";
8
+ SubscriptionStatusEnum["IN_PROGRESS"] = "In progress";
9
+ SubscriptionStatusEnum["MIGRATION_FAILED"] = "Migration failed";
10
+ SubscriptionStatusEnum["MIGRATION_IN_PROGRESS"] = "Migration in progress";
11
+ SubscriptionStatusEnum["ONGOING_VALIDATION"] = "Ongoing Validation";
12
+ SubscriptionStatusEnum["PENDING_ACCEPTANCE_OF_CTA"] = "Pending user's acceptance of CTA";
13
+ SubscriptionStatusEnum["PENDING_VALIDATION"] = "Pending validation";
14
+ SubscriptionStatusEnum["VALIDATED"] = "Validated";
15
+ })(SubscriptionStatusEnum = exports.SubscriptionStatusEnum || (exports.SubscriptionStatusEnum = {}));
16
+ //# sourceMappingURL=subscriptionStatus.js.map
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/ArrowSphere/nodejs-api-client.git"
6
6
  },
7
- "version": "3.201.0",
7
+ "version": "3.202.0-rc-bdj-1",
8
8
  "description": "Node.js client for ArrowSphere's public API",
9
9
  "main": "build/index.js",
10
10
  "types": "build/index.d.ts",
@@ -90,4 +90,4 @@
90
90
  "type-fest": "^2.19.0",
91
91
  "validatorjs": "3.22.1"
92
92
  }
93
- }
93
+ }