@proca/cli 3.0.2 → 3.2.0

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/dist/a.d.ts CHANGED
@@ -1 +1 @@
1
- import "cross-fetch/polyfill";
1
+ export {};
package/dist/a.js CHANGED
@@ -1,23 +1,4 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
22
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
23
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -31,30 +12,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
31
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
32
13
  };
33
14
  Object.defineProperty(exports, "__esModule", { value: true });
34
- require("cross-fetch/polyfill");
35
- const urql_serialize_scalars_exchange_1 = __importDefault(require("urql-serialize-scalars-exchange"));
36
- const api_1 = require("@proca/api");
37
- const proca = __importStar(require("./proca"));
38
- const util_1 = require("util");
39
- const main = () => __awaiter(void 0, void 0, void 0, function* () {
40
- const scalarEx = urql_serialize_scalars_exchange_1.default(proca.scalarLocations, api_1.scalarSerializers);
41
- const auth = api_1.basicAuth({ username: 'marcin@cahoots.pl', password: '@xMR39mUflpVmXZKv?8t3u' });
42
- const link = api_1.httpLink('http://localhost:4000', auth, { exchanges: [scalarEx] });
43
- //const {data,error} = await request(link, proca.CurrentUserOrgsDocument, {})
44
- // const {data, error} = await request(link, proca.GetCampaignDocument, {org: "house", id: 9})
45
- const { data, error } = yield api_1.request(link, proca.AliasTestDocument, { name: "onboarding-1" });
46
- /*
47
- const {data, error} = await request(link, proca.UpsertCampaignDocument, {org: "house", campaign: {
48
- name: "api-upsert-test", title: "I can has serilize?",
49
- config: {
50
- someConfig: 123,
51
- make: [1,4,5,"people", "happy"]
52
- },
53
- actionPages: []
54
- }})
55
- */
56
- console.log(util_1.inspect(data, true, 10));
57
- console.error(error);
15
+ const proca_1 = require("./proca");
16
+ const api_1 = __importDefault(require("@proca/api"));
17
+ const foo = () => __awaiter(void 0, void 0, void 0, function* () {
18
+ const c = api_1.default.httpLink("http://localhost:4000");
19
+ const r = c.query(proca_1.AddPageDocument, {});
58
20
  });
59
- main();
60
21
  //# sourceMappingURL=a.js.map
package/dist/a.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"a.js","sourceRoot":"","sources":["../src/a.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gCAA8B;AAC9B,sGAA6E;AAC7E,oCAA2E;AAC3E,+CAAkC;AAClC,+BAA6B;AAG7B,MAAM,IAAI,GAAG,GAAS,EAAE;IACtB,MAAM,QAAQ,GAAG,yCAA8B,CAAC,KAAK,CAAC,eAAe,EAAE,uBAAiB,CAAC,CAAC;IAE1F,MAAM,IAAI,GAAG,eAAS,CAAC,EAAC,QAAQ,EAAE,mBAAmB,EAAE,QAAQ,EAAE,wBAAwB,EAAC,CAAC,CAAA;IAC3F,MAAM,IAAI,GAAG,cAAQ,CAAC,uBAAuB,EAAE,IAAI,EAAE,EAAC,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAC,CAAC,CAAA;IAE7E,8EAA8E;IAG9E,8FAA8F;IAC9F,MAAM,EAAC,IAAI,EAAE,KAAK,EAAC,GAAG,MAAM,aAAO,CAAC,IAAI,EAAE,KAAK,CAAC,iBAAiB,EAAE,EAAC,IAAI,EAAE,cAAc,EAAC,CAAC,CAAA;IAE5F;;;;;;;;;QASI;IAEF,OAAO,CAAC,GAAG,CAAC,cAAO,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,CAAA;IACpC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;AAEtB,CAAC,CAAA,CAAC;AAEF,IAAI,EAAE,CAAC"}
1
+ {"version":3,"file":"a.js","sourceRoot":"","sources":["../src/a.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,mCAAwC;AACxC,qDAA6B;AAG7B,MAAM,GAAG,GAAG,GAAS,EAAE;IACrB,MAAM,CAAC,GAAG,aAAG,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAA;IAC/C,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,uBAAe,EAAE,EAAE,CAAC,CAAA;AAExC,CAAC,CAAA,CAAA"}
@@ -87,7 +87,7 @@ export declare function getActionPage(argv: GetActionPageOpts & FormatOpts, conf
87
87
  } & Pick<admin.PublicOrg, "title" | "name">);
88
88
  } & {
89
89
  __typename: "PrivateActionPage";
90
- } & Pick<admin.PrivateActionPage, "live" | "name" | "id" | "config" | "locale" | "thankYouTemplateRef">) | ({
90
+ } & Pick<admin.PrivateActionPage, "live" | "name" | "id" | "config" | "locale" | "thankYouTemplate" | "thankYouTemplateRef">) | ({
91
91
  __typename?: "PublicActionPage";
92
92
  } & {
93
93
  __typename?: "PublicActionPage";
@@ -132,7 +132,7 @@ export declare function getActionPage(argv: GetActionPageOpts & FormatOpts, conf
132
132
  } & Pick<admin.PublicOrg, "title" | "name">);
133
133
  } & {
134
134
  __typename: "PublicActionPage";
135
- } & Pick<admin.PublicActionPage, "live" | "name" | "id" | "config" | "locale" | "thankYouTemplateRef">)>;
135
+ } & Pick<admin.PublicActionPage, "live" | "name" | "id" | "config" | "locale" | "thankYouTemplate" | "thankYouTemplateRef">)>;
136
136
  interface UpdateActionPageOpts {
137
137
  id: number;
138
138
  name?: string;
package/dist/proca.d.ts CHANGED
@@ -45,7 +45,10 @@ export declare type Action = {
45
45
  actionType: Scalars['String'];
46
46
  contact: Contact;
47
47
  customFields: Scalars['Json'];
48
- /** Deprecated, use customFields */
48
+ /**
49
+ * Deprecated, use customFields
50
+ * @deprecated use custom_fields
51
+ */
49
52
  fields: Array<CustomField>;
50
53
  tracking: Maybe<Tracking>;
51
54
  campaign: Campaign;
@@ -59,6 +62,7 @@ export declare type ActionCustomFields = {
59
62
  actionType: Scalars['String'];
60
63
  insertedAt: Scalars['NaiveDateTime'];
61
64
  customFields: Scalars['Json'];
65
+ /** @deprecated use custom_fields */
62
66
  fields: Array<CustomField>;
63
67
  };
64
68
  /** Custom field added to action. For signature it can be contact, for mail it can be subject and body */
@@ -71,6 +75,8 @@ export declare type ActionInput = {
71
75
  fields?: Maybe<Array<CustomFieldInput>>;
72
76
  /** Donation payload */
73
77
  donation?: Maybe<DonationActionInput>;
78
+ /** MTT payload */
79
+ mtt?: Maybe<MttActionInput>;
74
80
  };
75
81
  export declare type ActionPage = {
76
82
  id: Scalars['Int'];
@@ -78,7 +84,9 @@ export declare type ActionPage = {
78
84
  locale: Scalars['String'];
79
85
  /** Name where the widget is hosted */
80
86
  name: Scalars['String'];
81
- /** Reference to thank you email templated of this Action Page */
87
+ /** Thank you email templated of this Action Page */
88
+ thankYouTemplate: Maybe<Scalars['String']>;
89
+ /** A reference to thank you email template of this ActionPage */
82
90
  thankYouTemplateRef: Maybe<Scalars['String']>;
83
91
  /** Is live? */
84
92
  live: Scalars['Boolean'];
@@ -105,8 +113,10 @@ export declare type ActionPageInput = {
105
113
  name?: Maybe<Scalars['String']>;
106
114
  /** 2-letter, lowercase, code of ActionPage language */
107
115
  locale?: Maybe<Scalars['String']>;
108
- /** A reference to thank you email template of this ActionPage */
109
- thankYouTemplateRef?: Maybe<Scalars['String']>;
116
+ /** Thank you email template of this ActionPage */
117
+ thankYouTemplate?: Maybe<Scalars['String']>;
118
+ /** Supporter confirm email template of this ActionPage */
119
+ supporterConfirmTemplate?: Maybe<Scalars['String']>;
110
120
  /** Extra supporter count. If you want to add a number of signatories you have offline or kept in another system, you can specify the number here. */
111
121
  extraSupporters?: Maybe<Scalars['Int']>;
112
122
  /** JSON string containing Action Page config */
@@ -159,7 +169,6 @@ export declare type AreaCount = {
159
169
  /** count of supporters in this area */
160
170
  count: Scalars['Int'];
161
171
  };
162
- /** Filter campaigns by id. If found, returns list of 1 campaign, otherwise an empty list */
163
172
  export declare type Campaign = {
164
173
  /** Campaign id */
165
174
  id: Scalars['Int'];
@@ -178,8 +187,8 @@ export declare type Campaign = {
178
187
  org: Org;
179
188
  /** Fetch public actions */
180
189
  actions: PublicActionsResult;
190
+ targets: Maybe<Array<Maybe<Target>>>;
181
191
  };
182
- /** Filter campaigns by id. If found, returns list of 1 campaign, otherwise an empty list */
183
192
  export declare type CampaignActionsArgs = {
184
193
  actionType: Scalars['String'];
185
194
  limit: Scalars['Int'];
@@ -187,7 +196,7 @@ export declare type CampaignActionsArgs = {
187
196
  /** Campaign input */
188
197
  export declare type CampaignInput = {
189
198
  /** Campaign unchanging identifier */
190
- name: Scalars['String'];
199
+ name?: Maybe<Scalars['String']>;
191
200
  /** Campaign external_id. If provided, it will be used to find campaign. Can be used to rename a campaign */
192
201
  externalId?: Maybe<Scalars['Int']>;
193
202
  /** Campaign human readable title */
@@ -197,7 +206,22 @@ export declare type CampaignInput = {
197
206
  /** Custom config as stringified JSON map */
198
207
  config?: Maybe<Scalars['Json']>;
199
208
  /** Action pages of this campaign */
200
- actionPages: Array<ActionPageInput>;
209
+ actionPages?: Maybe<Array<ActionPageInput>>;
210
+ /** MTT configuration */
211
+ mtt?: Maybe<CampaignMttInput>;
212
+ };
213
+ export declare type CampaignMtt = {
214
+ __typename?: 'CampaignMtt';
215
+ startAt: Scalars['DateTime'];
216
+ endAt: Scalars['DateTime'];
217
+ messageTemplate: Maybe<Scalars['String']>;
218
+ testEmail: Maybe<Scalars['String']>;
219
+ };
220
+ export declare type CampaignMttInput = {
221
+ startAt?: Maybe<Scalars['DateTime']>;
222
+ endAt?: Maybe<Scalars['DateTime']>;
223
+ messageTemplate?: Maybe<Scalars['String']>;
224
+ testEmail?: Maybe<Scalars['String']>;
201
225
  };
202
226
  /** Campaign statistics */
203
227
  export declare type CampaignStats = {
@@ -226,6 +250,7 @@ export declare type Confirm = {
226
250
  email: Maybe<Scalars['String']>;
227
251
  message: Maybe<Scalars['String']>;
228
252
  objectId: Maybe<Scalars['Int']>;
253
+ creator: Maybe<User>;
229
254
  };
230
255
  export declare type ConfirmInput = {
231
256
  code: Scalars['String'];
@@ -238,12 +263,15 @@ export declare type ConfirmResult = {
238
263
  actionPage: Maybe<ActionPage>;
239
264
  campaign: Maybe<Campaign>;
240
265
  org: Maybe<Org>;
266
+ message: Maybe<Scalars['String']>;
241
267
  };
242
268
  /** GDPR consent data for this org */
243
269
  export declare type Consent = {
244
270
  __typename?: 'Consent';
245
271
  optIn: Scalars['Boolean'];
246
272
  givenAt: Scalars['NaiveDateTime'];
273
+ emailStatus: EmailStatus;
274
+ emailStatusChanged: Maybe<Scalars['NaiveDateTime']>;
247
275
  };
248
276
  /** GDPR consent data structure */
249
277
  export declare type ConsentInput = {
@@ -340,6 +368,14 @@ export declare enum DonationFrequencyUnit {
340
368
  export declare enum DonationSchema {
341
369
  StripePaymentIntent = "STRIPE_PAYMENT_INTENT"
342
370
  }
371
+ export declare enum EmailStatus {
372
+ None = "NONE",
373
+ DoubleOptIn = "DOUBLE_OPT_IN",
374
+ Bounce = "BOUNCE",
375
+ Blocked = "BLOCKED",
376
+ Spam = "SPAM",
377
+ Unsub = "UNSUB"
378
+ }
343
379
  export declare type GenKeyInput = {
344
380
  name: Scalars['String'];
345
381
  };
@@ -379,6 +415,14 @@ export declare type LaunchActionPageResult = {
379
415
  __typename?: 'LaunchActionPageResult';
380
416
  status: Status;
381
417
  };
418
+ export declare type MttActionInput = {
419
+ /** Subject line */
420
+ subject: Scalars['String'];
421
+ /** Body */
422
+ body: Scalars['String'];
423
+ /** Target ids */
424
+ targets: Array<Scalars['String']>;
425
+ };
382
426
  export declare type NationalityInput = {
383
427
  /** Nationality / issuer of id document */
384
428
  country: Scalars['String'];
@@ -411,20 +455,28 @@ export declare type OrgInput = {
411
455
  /** Schema for contact personal information */
412
456
  contactSchema?: Maybe<ContactSchema>;
413
457
  /** Email opt in enabled */
414
- emailOptIn?: Maybe<Scalars['Boolean']>;
458
+ supporterConfirm?: Maybe<Scalars['Boolean']>;
415
459
  /** Email opt in template name */
416
- emailOptInTemplate?: Maybe<Scalars['String']>;
460
+ supporterConfirmTemplate?: Maybe<Scalars['String']>;
417
461
  /** Config */
418
462
  config?: Maybe<Scalars['Json']>;
419
463
  };
420
464
  export declare type OrgUser = {
421
465
  __typename?: 'OrgUser';
422
466
  email: Scalars['String'];
467
+ /** Role in an org */
423
468
  role: Scalars['String'];
469
+ /** Date and time the user was created on this instance */
424
470
  createdAt: Scalars['NaiveDateTime'];
471
+ /** Date and time when user joined org */
425
472
  joinedAt: Scalars['NaiveDateTime'];
473
+ /** Will be removed */
426
474
  lastSigninAt: Maybe<Scalars['NaiveDateTime']>;
427
475
  };
476
+ export declare type OrgUserInput = {
477
+ email: Scalars['String'];
478
+ role: Scalars['String'];
479
+ };
428
480
  export declare type Partnership = {
429
481
  __typename?: 'Partnership';
430
482
  org: Org;
@@ -436,9 +488,9 @@ export declare type PersonalData = {
436
488
  /** Schema for contact personal information */
437
489
  contactSchema: ContactSchema;
438
490
  /** Email opt in enabled */
439
- emailOptIn: Scalars['Boolean'];
491
+ supporterConfirm: Scalars['Boolean'];
440
492
  /** Email opt in template name */
441
- emailOptInTemplate: Maybe<Scalars['String']>;
493
+ supporterConfirmTemplate: Maybe<Scalars['String']>;
442
494
  /** High data security enabled */
443
495
  highSecurity: Scalars['Boolean'];
444
496
  };
@@ -449,7 +501,9 @@ export declare type PrivateActionPage = ActionPage & {
449
501
  locale: Scalars['String'];
450
502
  /** Name where the widget is hosted */
451
503
  name: Scalars['String'];
452
- /** Reference to thank you email templated of this Action Page */
504
+ /** Thank you email templated of this Action Page */
505
+ thankYouTemplate: Maybe<Scalars['String']>;
506
+ /** A reference to thank you email template of this ActionPage */
453
507
  thankYouTemplateRef: Maybe<Scalars['String']>;
454
508
  /** Is live? */
455
509
  live: Scalars['Boolean'];
@@ -464,6 +518,8 @@ export declare type PrivateActionPage = ActionPage & {
464
518
  extraSupporters: Scalars['Int'];
465
519
  /** Action page collects also opt-out actions */
466
520
  delivery: Scalars['Boolean'];
521
+ /** Email template to confirm supporter */
522
+ supporterConfirmTemplate: Maybe<Scalars['String']>;
467
523
  /** Location of the widget as last seen in HTTP REFERER header */
468
524
  location: Maybe<Scalars['String']>;
469
525
  /** Status of action page */
@@ -488,10 +544,15 @@ export declare type PrivateCampaign = Campaign & {
488
544
  org: Org;
489
545
  /** Fetch public actions */
490
546
  actions: PublicActionsResult;
547
+ targets: Maybe<Array<Maybe<Target>>>;
491
548
  /** Campaign onwer collects opt-out actions for delivery even if campaign partner is */
492
549
  forceDelivery: Scalars['Boolean'];
550
+ /** Action Pages of this campaign that are accessible to current user */
551
+ actionPages: Array<PrivateActionPage>;
493
552
  /** List of partnerships and requests */
494
553
  partnerships: Maybe<Array<Partnership>>;
554
+ /** MTT configuration */
555
+ mtt: Maybe<CampaignMtt>;
495
556
  };
496
557
  export declare type PrivateCampaignActionsArgs = {
497
558
  actionType: Scalars['String'];
@@ -520,7 +581,7 @@ export declare type PrivateOrg = Org & {
520
581
  actionPages: Array<ActionPage>;
521
582
  /** Action Page */
522
583
  actionPage: ActionPage;
523
- /** Get campaign this org is leader or partner of by id */
584
+ /** DEPRECATED: use campaign() in API root. Get campaign this org is leader or partner of by id */
524
585
  campaign: Campaign;
525
586
  };
526
587
  export declare type PrivateOrgKeysArgs = {
@@ -545,16 +606,28 @@ export declare type PrivateOrgActionPageArgs = {
545
606
  export declare type PrivateOrgCampaignArgs = {
546
607
  id: Scalars['Int'];
547
608
  };
609
+ export declare type PrivateTarget = Target & {
610
+ __typename?: 'PrivateTarget';
611
+ id: Scalars['String'];
612
+ name: Scalars['String'];
613
+ externalId: Scalars['String'];
614
+ area: Maybe<Scalars['String']>;
615
+ fields: Maybe<Scalars['Json']>;
616
+ emails: Array<Maybe<TargetEmail>>;
617
+ };
548
618
  export declare type Processing = {
549
619
  __typename?: 'Processing';
550
620
  emailFrom: Maybe<Scalars['String']>;
551
621
  emailBackend: Maybe<ServiceName>;
622
+ supporterConfirm: Scalars['Boolean'];
623
+ supporterConfirmTemplate: Maybe<Scalars['String']>;
552
624
  customSupporterConfirm: Scalars['Boolean'];
553
625
  customActionConfirm: Scalars['Boolean'];
554
626
  customActionDeliver: Scalars['Boolean'];
555
627
  sqsDeliver: Scalars['Boolean'];
628
+ eventBackend: Maybe<ServiceName>;
556
629
  eventProcessing: Scalars['Boolean'];
557
- confirmProcessing: Scalars['Boolean'];
630
+ emailTemplates: Maybe<Array<Scalars['String']>>;
558
631
  };
559
632
  export declare type PublicActionPage = ActionPage & {
560
633
  __typename?: 'PublicActionPage';
@@ -563,7 +636,9 @@ export declare type PublicActionPage = ActionPage & {
563
636
  locale: Scalars['String'];
564
637
  /** Name where the widget is hosted */
565
638
  name: Scalars['String'];
566
- /** Reference to thank you email templated of this Action Page */
639
+ /** Thank you email templated of this Action Page */
640
+ thankYouTemplate: Maybe<Scalars['String']>;
641
+ /** A reference to thank you email template of this ActionPage */
567
642
  thankYouTemplateRef: Maybe<Scalars['String']>;
568
643
  /** Is live? */
569
644
  live: Scalars['Boolean'];
@@ -601,6 +676,7 @@ export declare type PublicCampaign = Campaign & {
601
676
  org: Org;
602
677
  /** Fetch public actions */
603
678
  actions: PublicActionsResult;
679
+ targets: Maybe<Array<Maybe<Target>>>;
604
680
  };
605
681
  export declare type PublicCampaignActionsArgs = {
606
682
  actionType: Scalars['String'];
@@ -615,6 +691,14 @@ export declare type PublicOrg = Org & {
615
691
  /** config */
616
692
  config: Scalars['Json'];
617
693
  };
694
+ export declare type PublicTarget = Target & {
695
+ __typename?: 'PublicTarget';
696
+ id: Scalars['String'];
697
+ name: Scalars['String'];
698
+ externalId: Scalars['String'];
699
+ area: Maybe<Scalars['String']>;
700
+ fields: Maybe<Scalars['Json']>;
701
+ };
618
702
  export declare type RootMutationType = {
619
703
  __typename?: 'RootMutationType';
620
704
  /**
@@ -626,6 +710,9 @@ export declare type RootMutationType = {
626
710
  * Action Pages will be removed (principle of not removing signature data).
627
711
  */
628
712
  upsertCampaign: Campaign;
713
+ updateCampaign: Campaign;
714
+ addCampaign: Campaign;
715
+ deleteCampaign: Status;
629
716
  /** Update an Action Page */
630
717
  updateActionPage: ActionPage;
631
718
  /**
@@ -640,6 +727,7 @@ export declare type RootMutationType = {
640
727
  copyCampaignActionPage: ActionPage;
641
728
  addActionPage: ActionPage;
642
729
  launchActionPage: LaunchActionPageResult;
730
+ deleteActionPage: Status;
643
731
  /** Adds an action referencing contact data via contactRef */
644
732
  addAction: ContactReference;
645
733
  /** Adds an action with contact data */
@@ -652,8 +740,10 @@ export declare type RootMutationType = {
652
740
  inviteOrgUser: Confirm;
653
741
  updateOrgUser: ChangeUserStatus;
654
742
  deleteOrgUser: Maybe<DeleteUserResult>;
743
+ /** Update (current) user details */
744
+ updateUser: User;
655
745
  addOrg: Org;
656
- deleteOrg: Scalars['Boolean'];
746
+ deleteOrg: Status;
657
747
  updateOrg: PrivateOrg;
658
748
  /** Update org processing settings */
659
749
  updateOrgProcessing: PrivateOrg;
@@ -675,13 +765,31 @@ export declare type RootMutationType = {
675
765
  acceptOrgConfirm: ConfirmResult;
676
766
  /** Reject a confirm on behalf of organisation. */
677
767
  rejectOrgConfirm: ConfirmResult;
768
+ /** Accept a confirm by user */
678
769
  acceptUserConfirm: ConfirmResult;
770
+ /** Reject a confirm by user */
679
771
  rejectUserConfirm: ConfirmResult;
772
+ upsertTargets: Array<Maybe<PrivateTarget>>;
680
773
  };
681
774
  export declare type RootMutationTypeUpsertCampaignArgs = {
682
775
  orgName: Scalars['String'];
683
776
  input: CampaignInput;
684
777
  };
778
+ export declare type RootMutationTypeUpdateCampaignArgs = {
779
+ id?: Maybe<Scalars['Int']>;
780
+ name?: Maybe<Scalars['String']>;
781
+ externalId?: Maybe<Scalars['Int']>;
782
+ input: CampaignInput;
783
+ };
784
+ export declare type RootMutationTypeAddCampaignArgs = {
785
+ orgName: Scalars['String'];
786
+ input: CampaignInput;
787
+ };
788
+ export declare type RootMutationTypeDeleteCampaignArgs = {
789
+ id?: Maybe<Scalars['Int']>;
790
+ name?: Maybe<Scalars['String']>;
791
+ externalId?: Maybe<Scalars['Int']>;
792
+ };
685
793
  export declare type RootMutationTypeUpdateActionPageArgs = {
686
794
  id: Scalars['Int'];
687
795
  input: ActionPageInput;
@@ -698,14 +806,17 @@ export declare type RootMutationTypeCopyCampaignActionPageArgs = {
698
806
  };
699
807
  export declare type RootMutationTypeAddActionPageArgs = {
700
808
  orgName: Scalars['String'];
701
- name: Scalars['String'];
702
- locale: Scalars['String'];
703
809
  campaignName: Scalars['String'];
810
+ input: ActionPageInput;
704
811
  };
705
812
  export declare type RootMutationTypeLaunchActionPageArgs = {
706
813
  name: Scalars['String'];
707
814
  message?: Maybe<Scalars['String']>;
708
815
  };
816
+ export declare type RootMutationTypeDeleteActionPageArgs = {
817
+ id?: Maybe<Scalars['Int']>;
818
+ name?: Maybe<Scalars['String']>;
819
+ };
709
820
  export declare type RootMutationTypeAddActionArgs = {
710
821
  actionPageId: Scalars['Int'];
711
822
  action: ActionInput;
@@ -727,21 +838,26 @@ export declare type RootMutationTypeLinkActionsArgs = {
727
838
  };
728
839
  export declare type RootMutationTypeAddOrgUserArgs = {
729
840
  orgName: Scalars['String'];
730
- input: UserInput;
841
+ input: OrgUserInput;
731
842
  };
732
843
  export declare type RootMutationTypeInviteOrgUserArgs = {
733
844
  orgName: Scalars['String'];
734
- input: UserInput;
845
+ input: OrgUserInput;
735
846
  message?: Maybe<Scalars['String']>;
736
847
  };
737
848
  export declare type RootMutationTypeUpdateOrgUserArgs = {
738
849
  orgName: Scalars['String'];
739
- input: UserInput;
850
+ input: OrgUserInput;
740
851
  };
741
852
  export declare type RootMutationTypeDeleteOrgUserArgs = {
742
853
  orgName: Scalars['String'];
743
854
  email: Scalars['String'];
744
855
  };
856
+ export declare type RootMutationTypeUpdateUserArgs = {
857
+ input: UserDetailsInput;
858
+ id?: Maybe<Scalars['Int']>;
859
+ email?: Maybe<Scalars['String']>;
860
+ };
745
861
  export declare type RootMutationTypeAddOrgArgs = {
746
862
  input: OrgInput;
747
863
  };
@@ -756,12 +872,14 @@ export declare type RootMutationTypeUpdateOrgProcessingArgs = {
756
872
  name: Scalars['String'];
757
873
  emailBackend?: Maybe<ServiceName>;
758
874
  emailFrom?: Maybe<Scalars['String']>;
875
+ supporterConfirm?: Maybe<Scalars['Boolean']>;
876
+ supporterConfirmTemplate?: Maybe<Scalars['String']>;
759
877
  customSupporterConfirm?: Maybe<Scalars['Boolean']>;
760
878
  customActionConfirm?: Maybe<Scalars['Boolean']>;
761
879
  customActionDeliver?: Maybe<Scalars['Boolean']>;
762
880
  sqsDeliver?: Maybe<Scalars['Boolean']>;
881
+ eventBackend?: Maybe<ServiceName>;
763
882
  eventProcessing?: Maybe<Scalars['Boolean']>;
764
- confirmProcessing?: Maybe<Scalars['Boolean']>;
765
883
  };
766
884
  export declare type RootMutationTypeJoinOrgArgs = {
767
885
  name: Scalars['String'];
@@ -814,14 +932,22 @@ export declare type RootMutationTypeAcceptUserConfirmArgs = {
814
932
  export declare type RootMutationTypeRejectUserConfirmArgs = {
815
933
  confirm: ConfirmInput;
816
934
  };
935
+ export declare type RootMutationTypeUpsertTargetsArgs = {
936
+ targets: Array<TargetInput>;
937
+ campaignId: Scalars['Int'];
938
+ replace?: Maybe<Scalars['Boolean']>;
939
+ };
817
940
  export declare type RootQueryType = {
818
941
  __typename?: 'RootQueryType';
819
942
  /** Get a list of campains */
820
943
  campaigns: Array<Campaign>;
944
+ /** Get campaign */
945
+ campaign: Maybe<Campaign>;
821
946
  /** Get action page */
822
947
  actionPage: ActionPage;
823
948
  exportActions: Array<Maybe<Action>>;
824
949
  currentUser: User;
950
+ /** Select users from this instnace. Requires a manage users admin permission. */
825
951
  users: Array<User>;
826
952
  /** Organization api (authenticated) */
827
953
  org: PrivateOrg;
@@ -829,6 +955,12 @@ export declare type RootQueryType = {
829
955
  export declare type RootQueryTypeCampaignsArgs = {
830
956
  title?: Maybe<Scalars['String']>;
831
957
  name?: Maybe<Scalars['String']>;
958
+ id?: Maybe<Scalars['Int']>;
959
+ };
960
+ export declare type RootQueryTypeCampaignArgs = {
961
+ id?: Maybe<Scalars['Int']>;
962
+ name?: Maybe<Scalars['String']>;
963
+ externalId?: Maybe<Scalars['Int']>;
832
964
  };
833
965
  export declare type RootQueryTypeActionPageArgs = {
834
966
  id?: Maybe<Scalars['Int']>;
@@ -843,6 +975,7 @@ export declare type RootQueryTypeExportActionsArgs = {
843
975
  after?: Maybe<Scalars['DateTime']>;
844
976
  limit?: Maybe<Scalars['Int']>;
845
977
  onlyOptIn?: Maybe<Scalars['Boolean']>;
978
+ onlyDoubleOptIn?: Maybe<Scalars['Boolean']>;
846
979
  };
847
980
  export declare type RootQueryTypeUsersArgs = {
848
981
  select?: Maybe<SelectUser>;
@@ -861,7 +994,8 @@ export declare type SelectActionPage = {
861
994
  campaignId?: Maybe<Scalars['Int']>;
862
995
  };
863
996
  export declare type SelectCampaign = {
864
- id?: Maybe<Scalars['Int']>;
997
+ titleLike?: Maybe<Scalars['String']>;
998
+ orgName?: Maybe<Scalars['String']>;
865
999
  };
866
1000
  export declare type SelectKey = {
867
1001
  id?: Maybe<Scalars['Int']>;
@@ -899,7 +1033,8 @@ export declare enum ServiceName {
899
1033
  Sqs = "SQS",
900
1034
  Mailjet = "MAILJET",
901
1035
  Wordpress = "WORDPRESS",
902
- Stripe = "STRIPE"
1036
+ Stripe = "STRIPE",
1037
+ Webhook = "WEBHOOK"
903
1038
  }
904
1039
  export declare enum Status {
905
1040
  /** Operation completed succesfully */
@@ -919,6 +1054,28 @@ export declare type StripeSubscriptionInput = {
919
1054
  currency: Scalars['String'];
920
1055
  frequencyUnit: DonationFrequencyUnit;
921
1056
  };
1057
+ export declare type Target = {
1058
+ id: Scalars['String'];
1059
+ name: Scalars['String'];
1060
+ externalId: Scalars['String'];
1061
+ area: Maybe<Scalars['String']>;
1062
+ fields: Maybe<Scalars['Json']>;
1063
+ };
1064
+ export declare type TargetEmail = {
1065
+ __typename?: 'TargetEmail';
1066
+ email: Scalars['String'];
1067
+ emailStatus: EmailStatus;
1068
+ };
1069
+ export declare type TargetEmailInput = {
1070
+ email: Scalars['String'];
1071
+ };
1072
+ export declare type TargetInput = {
1073
+ name: Scalars['String'];
1074
+ area?: Maybe<Scalars['String']>;
1075
+ externalId: Scalars['String'];
1076
+ fields?: Maybe<Scalars['Json']>;
1077
+ emails?: Maybe<Array<TargetEmailInput>>;
1078
+ };
922
1079
  /** Tracking codes */
923
1080
  export declare type Tracking = {
924
1081
  __typename?: 'Tracking';
@@ -940,12 +1097,16 @@ export declare type User = {
940
1097
  __typename?: 'User';
941
1098
  id: Scalars['Int'];
942
1099
  email: Scalars['String'];
1100
+ phone: Maybe<Scalars['String']>;
1101
+ pictureUrl: Maybe<Scalars['String']>;
1102
+ jobTitle: Maybe<Scalars['String']>;
943
1103
  isAdmin: Scalars['Boolean'];
944
1104
  roles: Array<UserRole>;
945
1105
  };
946
- export declare type UserInput = {
947
- email: Scalars['String'];
948
- role: Scalars['String'];
1106
+ export declare type UserDetailsInput = {
1107
+ pictureUrl?: Maybe<Scalars['String']>;
1108
+ jobTitle?: Maybe<Scalars['String']>;
1109
+ phone?: Maybe<Scalars['String']>;
949
1110
  };
950
1111
  export declare type UserRole = {
951
1112
  __typename?: 'UserRole';
@@ -1789,10 +1950,10 @@ declare type ActionPageIds_PublicActionPage_ = ({
1789
1950
  export declare type ActionPageIds = ActionPageIds_PrivateActionPage_ | ActionPageIds_PublicActionPage_;
1790
1951
  declare type ActionPageFields_PrivateActionPage_ = ({
1791
1952
  __typename: 'PrivateActionPage';
1792
- } & Pick<PrivateActionPage, 'id' | 'name' | 'locale' | 'config' | 'live' | 'thankYouTemplateRef'>);
1953
+ } & Pick<PrivateActionPage, 'id' | 'name' | 'locale' | 'config' | 'live' | 'thankYouTemplate' | 'thankYouTemplateRef'>);
1793
1954
  declare type ActionPageFields_PublicActionPage_ = ({
1794
1955
  __typename: 'PublicActionPage';
1795
- } & Pick<PublicActionPage, 'id' | 'name' | 'locale' | 'config' | 'live' | 'thankYouTemplateRef'>);
1956
+ } & Pick<PublicActionPage, 'id' | 'name' | 'locale' | 'config' | 'live' | 'thankYouTemplate' | 'thankYouTemplateRef'>);
1796
1957
  export declare type ActionPageFields = ActionPageFields_PrivateActionPage_ | ActionPageFields_PublicActionPage_;
1797
1958
  export declare type ActionPagePrivateFields = ({
1798
1959
  __typename: 'PrivateActionPage';
@@ -1809,7 +1970,7 @@ export declare type OrgPrivateFields = ({
1809
1970
  } & Pick<PrivateOrg, 'config'> & {
1810
1971
  personalData: ({
1811
1972
  __typename?: 'PersonalData';
1812
- } & Pick<PersonalData, 'contactSchema' | 'emailOptIn' | 'emailOptInTemplate'>);
1973
+ } & Pick<PersonalData, 'contactSchema' | 'supporterConfirm' | 'supporterConfirmTemplate'>);
1813
1974
  });
1814
1975
  export declare type KeyFields = ({
1815
1976
  __typename?: 'Key';
@@ -1838,7 +1999,7 @@ export declare type ActionExport = ({
1838
1999
  } & Pick<Tracking, 'source' | 'medium' | 'campaign' | 'content'>)>;
1839
2000
  privacy: ({
1840
2001
  __typename?: 'Consent';
1841
- } & Pick<Consent, 'optIn' | 'givenAt'>);
2002
+ } & Pick<Consent, 'optIn' | 'givenAt' | 'emailStatus' | 'emailStatusChanged'>);
1842
2003
  });
1843
2004
  export declare type ObjectFieldTypes = {
1844
2005
  [key: string]: {